Appinventor app #1: Abilene
I’ll admit, that’s how I felt about 3 hours ago…yes 3 hours ago. My app creation time isn’t getting any shorter but luckily my features are getting richer! I decided to make a different app, I mean the note app was cool but really there wasn’t much I could make out of it to really start to build my skills. SOooOO I decided on an app that would let you find: Food, Shopping, Hotels, and Universities in Abilene and would allow you to have a links and calendar section. 🙂
So step 1: (click to enlarge)
I added the following elements:
- List Picker x2
- Activity Starter x2
- Image x1
- Some horizontal alignment for “design“
Step 2: Block Editor
Step 2 a.
Basically the blue is the defined variable meaning “what does this need to equal?” and this will give you a global variable to use later on (Yeah I spelled categories wrong, I see it 😡 ) The Tan = your list function basically “gimme everything you want to show up as a list here” the orange is obviously the list item.
Step 2 b.
This basically means that when the first screen comes up what do you want it to do? So I said I want it to set my listpicker2 elements to moving (see there’s the global moving block I was telling you about). This will tell the app to pull all the orange blocks from my moving defined variable so that people can use them as a list? Confused? I hope not. This happens for listpicker 1 as well.
Step 2 c.
Ok this is where is can get a bit more difficult…aka…crying baby. Anyway, .DataURI is the command that will call on our listpicker after click action. In the Main.Datauri case this is how it could read to normal humans: (Since I know main.startactivity has been set to open google maps on the android phone) Call up map and then add geo 0,0?q=(that just means maps use local location such as Abilene Texas) then listpicker1selection text which will insert for example “food” into the search on google maps, thus resulting in a search for food in Abilene Texas. Brilliant! But excruciating.
NOW for Links.DataURI:
For human reading: Links.data.uri please grab the list item from the URL global list that is equal to the same position on the list as the one I chose from listpicker2. My global tag “chamberandaff” is what holds my main list like “abilene online!” “Abilene chamber of commerce” etc. (it looks just like the lists in step 2 a.) so when I choose “Abilene Online!” it will go and look on my URL global list (same set up as list 2.a) and pick the one that is in the same position (ie. 4th) and take me there via the browser.
How you launch the browser and the maps activity?
Simple (really), you go to Google’s page and you look for the activity code you want for example maps goes like this:
Property | Value |
Action | android.intent.action.VIEW |
ActivityPackage | com.google.android.apps.maps |
ActivityClass | com.google.android.maps.MapsActivity |
All of the above information is added to the red boxed section on the right side of the design page (not blocks page) that I showed earlier…missed it? Here it is again:
In the picture above you actually do see the exact code I entered to start up the maps, called in my code “main”. The browser tag in my code is called “Links”.
Whew. Now onto the calendar…super easy:
So it’s like “when I click the button I want it to visit links and enter the text www…and after that look to links.startactivity for the code to start the browser. It’s easy once you get the hang of it I promise.
Whew, so I’ve got some more additions to the code that I’d like to make such as cleaning things up a bit and adding some social features like “text your location to someone” and “tours”. I should complete those by the end of this week I hope!
Ok so to view my app you have to have an android phone if you do, feel free to download it by scanning this code with any barcode reader app:
Tell me what you think! If you can’t see it…I’m sorry 😦
Well I felt so bad I videoed it for you. But TAKE NOTE this is not my awesome phone this is an emulator so forgive the laggyness….:)
Haha top gear in the background 🙂
My nOOb lesson for the day: Keep trying even if you feel like you’ll never understand.
Related Articles
- New Year, New Android, New SIP Client (Sipdroid) (technoverseblog.com)
- Android + PacMan + Google Maps = PacMap (androidpolice.com)
- Going Mobile (41latitude.com)
Wow. Originally I thought it looked very easy but as I read on I began to understand how complicated it is/can get. Great post. The app inventor uses a platform very similar to a program I used to own called game creator. It was an engine like the app creator only you put in the sprites, buttons, and could even input small sections of code if you were advanced enough. Its free online if you wanna check it out, might help somehow. Anyway favorite blog yet, the app is great (you did a great job with the limitations) keep up the good work
Thanks! Yes I will for sure check out game creator. Goggles inventor is a lot like lego build too…Hah. I understand the seeming easy comment, heck, that’s why I thought I’d get into it, but alas, its not as easy as it looks. Thank you for the comment! You’ll have to see the full app in action on a phone it runs flawlessly. 🙂 I’m really glad you like my blog, ill do my best to keep it up!