MIT has announced that the App Inventor for iOS (Apple iPhone and iPad) has entered beta testing. The Beta test program is currently limited, but is expected to expand in the summer, with a public release next summer.
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.
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.
A previous post introduced the experimental Firebase component in MIT App Inventor. Firebase is a cloud-based database that may be used by App Inventor apps, and which makes exchanging data between users easy. Note: Firebase is experimental and may change in the future. At the present time, there is one Firebase database that is shared by all users. See comments in previous post for more information.
This post uses the GPS location sensors in phones to determine the phone’s position in latitude and longitude. Pressing a button labeled “Send GPS” sends the latitude and longitude coordinates to another phone, which then draws the position on a map. In this way, two phone users can wander about and transmit their location to each other, sending the data through the Firebase cloud database. I named this app “Here I AM!” – pressing the Send GPS tells another user that “I am here!”
To use this app, the exact same app should be running on two separate phones. You can run it on a single phone but obviously, you will not be getting updates from anyone else!
The first time you run this app on Android 6, you will be asked to give permission to use location information. Also, be sure to set Location services to on, in Android Settings.
As you move about, press the Send GPS button. Your latitude and longitude will be sent to Firebase, the other app will be alerted to an updated location, and your location will be displayed on the Google maps on their phone. If they press Send GPS, then their location will be updated on your phone.
The Lat/Long. textbox displays either the latitude, longitude or is prefixed with “THEM:”. “THEM:” means the textbox is showing the other phone’s location; if “THEM:” is not shown, then the textbox is showing your own latitude, longitude.
Press Retrieve GPS to retrieve and display the latitude/longitude value currently stored in Firebase.
Press Show Map to display the last retrieved location on the map.
Last fall, I created a tutorial on adding App Inventor apps to the Google Play Store. That tutorial is still worth reading and is available here.
But I heard from readers that they would like more information about the process of adding an App Inventor app to the Google Play Store. I have created this new tutorial to help with that!
Also – I will soon add videos to accompany these tutorials. Was hoping to have a couple posted today but I have run out of time until next week to get those done.
Sign Up for a Google Play Developer Account
To add apps to the Google Play store, you need a Google Developer Account. Sign up is easy but it does involve a one time (good for life) application fee of US $25.
Go to play.google.com/apps/publish to get started:
Follow the Google directions to set up your account.
Preparing Your App for the Google Play Store
Set the VersionNumber of Your App
In the Designer View, select the Screen1 component. At the bottom of Properties for Screen1, find the VersionCode and the VersionName items.
Readers post questions on the FB page or the blog. Sometimes I can answer them but sometimes I cannot answer them right away. For those that I cannot answer, I add the question to a list of future tutorial ideas. If someone is not sure how to solve a problem, chances are that there are others who may need help with the same issue!
I am beginning to go through my list – watch for more tutorials based on reader questions. Note – I do not have time to solve specific or custom applications. I try to abstract the basic elements of the problem and create a generic solution that can apply to a wide variety of use cases.
ListPicker Text Alignment
A reader asked how to align the text that appears in the ListPicker box. The ListPicker displays a set of items on screen so that the user may select an item from the list. When the list appears on screen, all the items are “left justified” which means they appear on the left side of the screen.
To demonstrate, our ListPicker, below, displays a list of auto manufacturers:
The e-book is now online and available. More information here including links to e-reader software for your Windows or Mac OS X computer.
- App Inventor 2 Graphics, Animation and Charts (Volume 4 e-book and printed book)
Step-by-step guide to graphics, animation and charts
Buy e-book from: Amazon, Google Books, Kobo Books
Price: US$5.99, 227 pages
The e-book includes access to video tutorials that supplement the text. A big thank you to all of you that have found this web site and its tutorials helpful to you and your projects!
UPDATE: Sales of the print version of Volume 4 are being discontinued as of October 18, 2016, due to rampant copyright theft. There are more used copies for sale than the total number of printed books actually sold. Based on sales, readers prefer the e-book version – therefore I am in process of discontinuing sales of the print version. The e-book continues to be available.
Volume 4 of my App Inventor guide books series is now available in e-book and print format. The book also includes video-based tutorials to supplement the text.
Back Cover Description
MIT App Inventor is the fast and simple way to develop Android apps. Using a programming system that runs in your Internet browser, just drag and drop user interface components and link together program functions on screen, and then run your app directly on your Android phone or tablet.
Learn to create apps using simplified interactive image sprites and to control movement using a finger on the screen or by tilting the phone or tablet. Learn how to use the “Canvas” features for drawing, including a unique way to implement traditional animation features.
Includes numerous sample apps, detailed explanations, illustrations, app source code downloads and links to video tutorials.
Volume 4 introduces the use of graphics drawing features, including general graphics features, image sprites, animation and charting. Charting refers to the creation of line, column, scatter plot, and strip recorder charts commonly used in business and finance.
This is volume 4 of a 4 volume set. Volume 1 introduces App Inventor programming, Volume 2 introduces advanced features and Volume 3 covers databases and files.
Visit the web site at appinventor.pevest.com to learn more about App Inventor and find more tutorials, resources, links to App Inventor books and other App Inventor web sites.
Edward Mitchell is an experienced software developer, having worked in Silicon Valley, for Microsoft and other high tech firms. He has taught college and university courses in programming and information systems. He is the author or co-author of a dozen books on software development. He has a B.S. in information and computer science, an M.S. in software engineering, and an M.B.A. degree.
The text is an introduction to the graphics features of MIT App Inventor covering basic graphics and basic animation methods provided by MIT App Inventor, plus creating traditional animation effects using programming methods, and business/science oriented charting. This is not a text about writing games but a book about the graphics features and how to put them to use for practical applications programs.