Reminder: Visit Learn2c.org for the newest App Inventor tutorial content

Reminder: the web page at https://appinventorplus.wordpress.com has moved!

For those still using this old web page, please use the new web address at

learn2c.org

The new address is much easier to remember and to type! Several months of new content appears at learn2c.org that is not present here.

New web address Learn2c.org

To make accessing this web page easier, I created a new web address for my App Inventor “how to” web site:

The name is short for “Learn to Code”. A short URL makes it easy to visit the web site!

I duplicated the old web site at the new address and everything looks the same. The new web site is “live” now although I will still be posting here for a bit.

I will keep you updated on the switch over, perhaps later in the week. But go ahead – check out the new web site – it is up and running now!

By creating a new web site, the two older web sites will remain online. All links from Facebook, Twitter, Google+, Tumblr and personal pages will still work and point back to the original articles from when they were first posted.

 

 

appinventor.pevest.com has moved to appinventorplus.wordpress.com

The old URL http://appinventor.pevest.com automatically redirects to the new URL at https://appinventorplus.wordpress.com

The old RSS newsfeed at appinventor.pevest.com/?feed=rss2 automatically redirects to the new RSS newsfeed at https://appinventorplus.wordpress.com/feed/

If you subscribed to the blog via email, you must re-subscribe by going to the new blog URL and clicking on the Follow link near the top of the rightmost column.

If you read this blog via Facebook or Twitter, you do not need to do anything. Tumblr is not yet configured but will be soon.

Old page links, such as those on the Facebook group page like: http://appinventor.pevest.com/?p=1579

will continue to bring up the old pages, making it easy to access older material.

Most comments – except those entered in the past few days – were migrated to the new blog URL. Comments entered in the past few days (after the content was migrated but before the switch over was completed) appear here but not on the new blog.

Benefits of the new web site

  • FASTER web site access and display of web pages
  • SECURE web site access using https – this prevents Internet Service Providers, government agencies and others from spying on what you are reading online.
  • AUTOMATIC SHARING to Facebook, Twitter, Google+ and soon Tumblr. Previously I had to manually cross post items to Facebook and Google+ – and I was rarely getting caught up with Google+. Now the updates will be automatic!
  • EASIER UPDATES as I consolidate my blogs into WordPress, I will have a single interface to reach any of them, which makes publishing easier and faster.
  • MORE TIME for me as I no longer have to maintain the continuous software updates and debugging of multiple web sites. That means more time to post new App Inventor tutorials!

The only feature we lose – I think – is the summary page that automatically created a 2 or 3 line summary of each post and placed those into a single page.

Migrating this blog to a new web site

After running and managing my own blog software since 1995 – all the way back to the beginning of the web! – I am gradually migrating my blogs to WordPress.com. That means the appinventor.pevest.com web site will be switching over to WordPress.com hosting.

I currently run 5 web sites. Managing all of them with frequent software updates, maintenance, anti-malware screening, anti-spam screening, comment review is too time consuming. Plus, I need to convert them over to https secure web access. In reviewing  this, I realized the era of my hosting my own blogs is coming to an end.

Most of the change over will be transparent. You can visit the preliminary new web site here:

appinventorplus.wordpress.com

When I make the switch from this web site to the new one, I will initially just redirect access to appinventor.pevest.com directly to appinventorplus.wordpress.com. I may eventually set it up so that the appinventor.pevest.com domain name replaces appinventorplus.wordpress.com. I also plan to purchase a monthly WordPress subscription so the WordPress ads will go away.

I have 5 web sites to convert and that takes time too. But once done, I will no longer have to spend so much time on the day to day maintenance of my blogs and web sites.

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.

Part 2: Storing and accessing user interface components as variables

Part 1 showed how to reference and store user interface components as a variable. That tutorial used this method to easily change the background colors of six buttons on screen.

In Part 2, we use this technique to simplify a past tutorial about using a Bluetooth link between and Android device and two Arduino devices.

Continue reading

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.

Part 1: Storing and accessing user interface components as variables

App Inventor programmers routinely store values, such as numbers or text strings (“Hello!”) in variables. For example,

stores the numeric value 6 in to the variable TOTALBUTTONS.

To illustrate by example, here is a global variable named SpecialButton. We can initialize it to anything we want at this point.

Next, inside our app, our blocks code assigns Button1 to the variable SpecialButton. SpecialButton now holds a reference to the actual user interface control Button1.

Since SpecialButton is a variable and not an actual button, we cannot directly use a SpecialButton.Click handler but we can use a feature of App Inventor to do the same thing in a different way. We will see how to do this in this a bit later.

You can store any App Inventor components – a Clock, a Bluetooth device – any component, in a variable.

Why would you want to do that? We will see in the example in this lesson.

This tutorial is in both written form and as an online video.

Continue reading

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?

Bluetooth and The Internet of Things #Bluetooth #Iot #Arduino #STEM #Programming

Yesterday I posted another item in a series of posts about using Bluetooth features in App Inventor. Bluetooth (together with low power wireless technologies such as Zigbee) are significant technologies that make “The Internet of Things” possible. These low power wireless technologies enable all kinds of devices to communicate with each other and with other devices such as Android phones and tablets.

Today, most Bluetooth devices run Bluetooth version 2.1 up through version 4.2, depending on the device. Bluetooth has undergone considerable enhancements and evolution over the years from providing a short range, lower speed serial data link suited for wireless earphones to providing high speed packet data communications over short distances while using very low power.

Bluetooth continues to evolve with Bluetooth version 5.

Bluetooth 5 adds more improvements including:

  • Up to 4x longer range
  • Faster data rates – on par with WiFi for some applications
  • Lower power

However – and this is important, most Bluetooth version upgrades require new hardware, and this is true for Bluetooth 5. To use version 5 features you will need version 5 compatible hardware – which is not yet generally available on Android phones and tablets.

Continue reading