Archive for the ‘android’ Category

Download Trek.apk

More fun with Google’s Android App Inventor. This one is a Star Trek Communicator. Use the “open communicator” move to “flip” open the cover, then speak your command. The lights do things, too, so press them to find out.

There’s only a couple of commands active in this. I’m demoing it at the Intuit Tech Forum and will add a new command there, plus I’ll probably play with it more and add commands. Fun!

If you haven’t already done so, you’ll need to install the free Google Text to Speech service. Click here to install it.

Download Trek.apk

Click here to download the TextyDriver application

If you haven’t already done so, you’ll need to install the free Google Text to Speech service. Click here to install it.

It’s inevitable. You’re driving down the road, and you get a text message. What to do, what to do. You can read it – that takes your eyes off the road briefly. But… what if you need to respond? Can you pick up groceries? Make a quick call? Stop and pick up the kids from the mall?

You can text back a response. Dangerous. Trying to type while driving is a pain. Maybe your text message app accepts voice and transcribes it? That’s a little better, but you still have to click on the text field, then find the tiny microphone icon, speak your message, then read it to see if it was correctly transcribed, then press the send button.

Of course, you’re about out of luck if there was a transcription error. You have to try and delete the message and start over.

You could call. But that means more button pressing, locating the contact, getting to the right phone number, pressing the call button.

Enter Texty Driver. Massachusetts, like many states, has outlawed texting while driving – and for good reason! As I wrote above, it’s distracting. So the Texty Driver app is voice command driven. You can setup 3 frequent texters and with one button press, activate the texting sequence.

First, it states the name of the contact you are about to text and tells you to speak your message. When you are finished, just stop talking. The Android operating system on equipped phones, such as my Motorola Droid, will connect to servers and transcribe the message. It’s very accurate and works well even in road-noise environments.

Second, your transcribed message is read back to you. That lets you confirm the accuracy of transcription without looking away from the road. You can respond with “Yes”, “No” or “Cancel”. Yes sends the message, with a voice confirmation. No starts the transcription over, letting you speak your message again. Cancel stops the process.

If the app is kept running, there is an option that lets it speak received messages back to you. If one of the selected contacts responds, the app will convert the message to voice and speak it. However, App Inventor doesn’t currently allow applications to run as background processes, so it won’t speak if something else is running, or if the phone is locked.

Click here to download the TextyDriver application

I’ve been using the App Inventor for Android for a while now. I managed to get in on the private beta, partially on my credentials as an MIT Scratch educator. I’ve taught 3 Scratch classes to kids from elementary to high school. I also follow the App Inventor Google group and came across a few people needing a URL Encoder.

I’d already written a simple URL encoder while testing out a mapping application. It uses the Google Maps staticmap API function to retrieve a map with markers. The markers are created by passing in an address, and although many browsers will accept spaces in URLs, the Image component in App Inventor won’t: you must encode a space either with a plus + character or with the hexadecimal encoding %20.

The newline character “\n” is also encoded, but the routine to test for it is separate from the others as App Inventor doesn’t find the correct location of various characters when you include it.

Here are the blocks for the character codes and their translations, plus some misc variables used in the encode routine. The “chars” block contains $&+,/:;=?@ “<>#%{}|\^~[]‘ and the codes block contains 24262B2C2F3A3B3D3F4020223C3E23257B7D7C5C5E7E5B5D60.

Now the URLEncode routine itself is fairly simple. It loops through each character in the provided text and searches for it in the chars and ctrl strings. If it finds it, it calculates the offset position for the code and adds that to the URL. If it doesn’t find it, then it just adds the character from the provided text. The offset position for each character is ((pos-1)*2)+1.