Brief update

I’ve been busy with other projects, traveling for work, and other tasks, that have cut into my App Inventor posts. Sorry about that!

One task I have been busy with is a project from AV8 Designer LLC to create an aircraft wing tip protection system. The system places proximity sensors on the tips of aircraft wings to detect – and help prevent – collisions with obstacles during aircraft ground movement operations. Aircraft are pushed and pulled around on the ground during all times of the day and night, and during all types of weather. They are frequently squeezed into aircraft hangers and parked extremely close to other aircraft. Unfortunately, this leads to occasional wing tip collisions that are expensive to repair.

The wing tip sensors provide audio and visual alerts of potential collisions and status (with audio and visual display) on Android tablets or smart phones carried by ground crew. The Android app is simple to use but incorporates complex programming to wirelessly communicate with all wing tip sensors. The app and the wireless communication links were implemented using App Inventor, rather than the Android Java SDK.

We took a risk in choosing to use App Inventor. While preliminary experiments were done to verify the concept, we did not know if we could develop the full application in App Inventor. Well, we took the risk and everything worked out great. Using App Inventor we were able to quickly develop – and demonstrate – the user interface and functionality. In doing this project, we proved App Inventor is capable of creating powerful and complex industrial applications. App Inventor can do much more than only educational and gaming applications!

Appy Builder – an alternative to MIT App Inventor, with more features

AppyBuilder is a commercial version of MIT App Inventor that, for a monthly subscription fee, provides access to many additional components and features. Some of these features include monetization services that work with advertising networks to display ads with your apps, plus unique features like SQL Lite and the Android Material Design user interface.  You can also add in-app purchases.

There is also a free version that operates similar to MIT App Inventor. You can set up your free account at the Appy Builder web site or sign up for a subscription account with added features.

AppyBuilder is based on MIT App Inventor – if you know how to use App Inventor, you’ll find AppyBuilder very easy to use. The company behind AppBuilder also does custom app development and mobile web site development.

Click on their “Tell me more” button, and then page down to see the description of features and services, and subscription options.

I’ve played a bit with the “free” version but I could see buying a monthly subscription to access several of their enhanced features. Their lead architect also has a blog including this tutorial on how to use their components to access the web, camera and upload photos to a server using App Builder.

—-

Since I moved the web site from my own server over to the WordPress platform, you will often see posts authored by “Coldstreams”, or sometimes “AppinventorPlus”, rather than my name, EdwardM, that appeared on the old web site. I have 4 separate accounts on WordPress and set them up so that my Coldstreams account can update any of the blogs, including this one. Most of my posts will likely appear with the “Coldstreams” name, but it is still just me 🙂 … EdwardM

Web site migration update and info on next tutorial/sample code

I posted this item last night, but took it off line as I discovered problems with my web site migration. I stayed up much of the night fixing that – and then we had no electrical power most of today due to a wind storm.
—————————
I completed a migration of my coldstreams.com Internet of Things blog to WordPress. This is a test case before I flip the switch on appinventor.pevest.com redirecting to appinventorplus.wordpress.com.

The process was more complex than I expected, especially getting the automatic redirection to the new web site working as intended. However, with that process understood now, the migration of App Inventor 2 – Learn to Code to the new server will hopefully be able to happen soon and go more smoothly. If you would like to learn how to do this and what I had to do, I’ve written this up to help others: https://coldstreams.wordpress.com/2017/04/08/how-to-move-a-self-hosted-wordpress-blog-to-wordpress-com/

Once these migrations are done, I will be able to focus on creating content and no longer have to spend so much time managing servers!

I expect my next tutorial to be on how to sort data in App Inventor.

A reader has a collection of data with both a name, and a score (it is something else but it is like a score) and would like to sort the collection sometimes by name and sometimes by score.

There are several ways to sort data – some are obvious but slow while some are really fast. My goal is to show how to implement a fast sorting algorithm that works with a list of lists.

In this concept, we will have a list of data, where each element in the list is itself a list. Sounds confusing but the idea is that we can store a data record in each list element and lists are how App Inventor stores records. This means our list will look something like:

Chang, 89
John, 86
Daksha, 92
Samantha, 91
Chandra, 90
Johan, 87
Patty, 94

When we sort by name, we want Chandra as name 1, then Chang as name 2, Daksha as name 3 and so on, with the corresponding scores still attached to their names.

We will do this with our sorting code.

Is your Android battery life too short? Some ideas that might fix it

Periodically, my  Nexus 5 phone’s battery life is terrible. On good days, if I don’t use my phone, the battery discharge rate is slow – many hours later, the battery meter says there’s still over 90% of the battery charge remaining. But when it is bad, my unused phone can have its battery drain in 8 hours.

I have found two things to improve improve the battery life on my Google Android Nexus 5.

  • One is to clear the system cache partition – this cache setting is not accessible from Settings.
  • The other is to replace the Android launcher with Nova Launcher, available for free in the Google Play store.

How to Clear the System Cache Partition

To clear the system cache you need to enter a hidden Android start up menu, usually by starting your phone while pressing the power and volume control keys simultaneously. For specific instructions, see this explanation for the Nexus 5 (it might work on your phone too – this does work on my Nexus 5). Another list from a mobile phone service describes how to do this for other phones (I have not tested any of those).

Every few months, the battery life has gotten really bad. But after clearing the system cache partition, the phone returns to normal performance. I hope this works for you.

I noticed this might be related to my installing lots of apps on the phone, over and over again. Some days I’ll install my test app 10 or 20 or 30 or more times. After a few weeks of doing this every day, battery life problems develop. I clear the system cache partition and the phone is fine again.

You can learn more about the Android system partitions by reading this article.

Security: http versus https and access to the appinventor.pevest.com web site

As you may know, http is the old way to access a web site. https is the newer secure method that encrypts data sent to and from the web site.

Last year, Google announced it would rank search results such that web sites accessed via https rank higher than those using http.

This web page has been using http – which is okay since there is nothing secret or controversial about the content here.

However, on 7 March 2017, Firefox will launch an update that will issue a security warning when visiting web sites using http.

Consequently, we need to switch our web sites from http to https which involves paying a fee to buy an SSL security certificate and re-configuring software and servers.

I have successfully converted my coldstreams.com web site to https as a test for the conversion. So far everything looks good.

I will eventually convert the appinventor.pevest.com web site to use https also. I do not have a date for that – it could be next week or the end of the month.  When I do the conversion, their might be a temporary period where you receive a security warning about accessing the web site, depending on how I do that update.

Short update

Just a quick update – I’ve been busy the past several weeks and did not get to complete the tutorials I had thought I would have done by now!

There are several topics I hope to cover soon including how you can store user interface components in App Inventor Lists. Say what?

Yes, you can create a list that contains, say, all the buttons you have on the screen. Why would you want to do that? Well you could use a simple for loop block to change the color of all the buttons simultaneously! And much more.

Another idea I’d like to implement is to modify my GPS app and have it send latitude and longitude coordinates to another phone using SMS messaging (instead of Firebase, as was done in that original version).

I’ve also done a little experimenting with creating Youtube video tutorials – but I have not posted any of these yet. I want them to have the right “feel” and quality before I put them online so I will continue to experiment with some ideas until I get them looking right.

Also, my apologies for not being on the Facebook group page very much. I’ll try to do better. Would you believe I did not even log in to Facebook for two weeks? My personal Facebook news feed (from friends!) has been overrun with angry and hostile political posts that turn off many people, including me. I just lost interest in logging into Facebook only to see a bunch of angry people expressing outrage every day.

I’ll try to better and get logged in this week and caught up. Lots of heavy rain the next few days so what else to do anyway?

Facebook and Twitter posts restored for appinventor.pevest.com

Since 1 December, posts made here did not appear on Facebook or Twitter.

The software that transferred posts from this web site to social media stopped working and was no longer supported. The software developer had, in fact, given 9 months warning that the cross posting software would no longer be supported but I missed that announcement 🙂

I have installed and configured new software which appears to be working. The problem affected 4 web sites that I run so it took some time to find a good solution, test it out, and then roll it out to all of the other web sites too.

Now that this is done, I can get back to more interesting projects. I still have some Bluetooth related projects to finish and post here, plus I hope to post an interesting app that exchanges data between apps on different phones using text messages. I have not written that app yet but it looks straight forward – we hope!

Does your device support Bluetooth LE? Here is how to find out.

See Part 0 for a brief introduction to this series and Bluetooth LE plus our past tutorial series on classic Bluetooth for communicating between Android devices, and between an Android device and an Arduino board with external Bluetooth transceiver.

Note – Bluetooth LE was introduced in the Bluetooth 4.0 specification. As of this writing, the latest version of the specification is 4.2. Bluetooth LE introduced capabilities to support very low power, battery operated devices that are designed to operate for weeks to months on a single battery or battery charge

Does Your Device Support Bluetooth LE?

To find out if your smart phone or tablet can work with Bluetooth LE: Go to the Google Play store and install the free app “BLE Checker” on your Android device. The app is simple – it tells you whether your device supports Bluetooth LE or not and that is all it does.

Devices that support Bluetooth LE will support BLE connections between compatible devices. However, this app does not tell you if your device supports a special BLE feature called “advertisements”. You can use Bluetooth LE without the “advertisements” feature but you will not be able to use all BLE features.

Continue reading

Appinventor.pevest.com web site read in 183 countries around the world!

Wow! I just checked the web server data and the server estimate the http://appinventor.pevest.com web site is now read in 183 countries!

Using the United Nation’s count of 241 countries and territories, that means residents of 58 countries and territories have not visited yet!

But that means people in up to 183 countries are learning how to program Android apps using MIT App Inventor!