Entries Tagged as 'Android'

My First Published Android App: NoteToSelf

Android development , Android 5 Comments »

I haven't been blogging much lately, but that's partly because I was on vacation for a week and partly because I was working on this:

http://www.thoughtdelimited.org/android/notetoself/

It's a fairly simple app built with the standard Android API, but it meets MY need for a note/reminder list that is right there on my Android home screen and lets me see all of my reminders without having to go into the application. And being able to dictate my reminder (I put in the dedicated dictation button because my Swype keyboard doesn't have a key for dictation like the stock Android keyboard does) makes it easy to add a quick note if you can tolerate a mistranslation here or there.

This version is free, so if you have an Android device running 2.1 or higher, feel free to check it out.

Android Application Recommendation: Swype

Android 5 Comments »

Right now, there is a small window of opportunity for Android phone owners to acquire the newest "beta" (honestly, it's about as "beta" as Gmail used to be) version of the Swype virtual keyboard app.  It's only available for a few days for folks willing to register for the "beta" program (which is free) at http://beta.swype.com/.  You can't download it from the Android Market, so once the registration system is closed again you'll have to hope someone hacks the app to make it available (which admittedly happened with the initial beta), or buy one of the Android phones that comes with Swype pre-installed (that is Swype's "official" means of distribution).

So as I said already, Swype is a virtual keyboard app.  Once you install it, you can then use it instead of whatever virtual keyboard came installed and set as the default (ah, the freedom to choose...). What's special about it?  Instead of tapping each key (which you can still do if you want), you swipe/drag your finger across the keyboard from key to key to spell out the word you want to input. Even though you cross over numerous unwanted letters and numbers as you move your finger, it still somehow detects which of the keys you cross over with your fingers are the intended letters (maybe somehow detecting the briefest of pauses or the slight change in direction as you start moving to the next one). If it's not sure what you meant to spell, a list of possible choices pops up and you can tap the correct choice.

You lift your finger to complete a word, and if you start to trace out a new word it adds a space after the previous word automatically. There are also a number of special gestures, such as dragging your finger above the keyboard to capitalize the last letter you selected, and swirling your finger over a letter to enter the letter twice. You can see it in action in the videos on the Swype website.

I've been using Swype for quite a while, and I'm can compose text on my Droid a LOT faster with Swype than I could with the stock Android OR iPod Touch keyboard, and it works for me despite the fact that I sometimes hesitate or "take a wrong turn" because I've forgotten where on the keyboard the next letter is.

I strongly recommend that every Android owner take the opportunity presented by this beta offering and try it out for themselves.

Summary of the Android 2.2 Announcements Made at Google I/O Yesterday

Android development , Android No Comments »

So yesterday, during the first half of the morning keynote at the Google I/O conference, Google made several announcements about the latest version of the Android OS:  version 2.2, codenamed "Froyo."  Here are several links to pages that go through the announcements:

http://android-developers.blogspot.com/2010/05/android-22-and-developers-goodies.html

http://www.dzone.com/links/r/android_22_and_beyond.html

http://www.blog.droidweb.com/2010/05/android-2-2-annoucned-at-google-io-what-it-means-for-you/

A couple of additional notes:

  • One of the announcements was that you could initiate actions on your phone via the "the cloud" (the Internet). In the demo, the presenter's assistant was able to get driving directions on his laptop using the Chrome browser and then send those directions to his Android phone by clicking on a certain link. The presenter said that browser initiated an "intent" on the Android device.

    In Android development, an Intent is a messaging object directed at a component (an Activity, a Service, or a Broadcast Receiver) within an Android application and delivers data to the component. Normally, an Intent can either be explicitly addressed to a specific component by name, or it can be implicitly targeted towards any component whose intent filters make them capable of receiving the intent. I'm curious to see how Google will implement this feature to make sure this capability isn't used maliciously.

  • Another announcement was that Android 2.2 would allow developers and users to install applications on the SD card in the Android phone rather than in the phone's internal memory, something that many Android users have wanted for a long time.  The Android Developer site already has a documentation page up regarding this feature, which I glanced over.

    When they write an application using the API for Android 2.2 (apps written to an earlier API will NOT be movable to the SD card using the features in Android 2.2), developers can specify one of the following install locations within their application's manifest file:

    • "preferExternal": the app will initially be installed to the SD card automatically unless the SD card is full. The user will have the option to move it to internal storage if they like.

    • "auto": Android will determine the best location for the initial installation for the app, but again the user has the option of moving it.

    • "internalOnly": the app can only be installed in the internal memory of the device.

    The drawback to running an application from the SD card is that all application processes currently active on the SD card are killed whenever the user connects their Android device to their computer and chooses to mount the SD card as an external USB drive. Applications that use certain features can break when this situation occurs, and therefore such applications may have the "internalOnly" install setting in place to prevent problems.

    The documentation also points out that applications installed to the SD card will still store any private user data and databases for the application in the internal memory. So the need for a way to back up the application data was still needed even with the SD installation option, hence the announced feature in 2.2 that application data could be backed up to the cloud.

Developing Native Android Applications: Not as Hard As You Might Think

Android development , Android 5 Comments »

Two months ago, my boss asked me to try and build a native Android application based on the mobile website I had created for the university's annual Maryland Day festival. Both he and I are part of an IT initiative in our department tasked with figuring out how best to provide IT services to smartphone users on campus, and while we have in-house expertise in iPhone development, none of us were familiar with what would be involved in building Android applications. So he asked me to give it a shot.

Read more...

HTML 5 Geolocation Functions and Mobile Web Browsers: Show the User Where They Are (Sort Of)

JavaScript , Miscellaneous , Web development , Android 7 Comments »

Every April, the University of Maryland holds a huge open-house event called Maryland Day that draws 60,000+ visitors to the campus to view exhibits highlighting the research conducted at the university and participate in various events and activities. All of the event details are entered into a ColdFusion application, and one of those details is the GPS coordinates (latitude and longitude) of where each event is taking place so visitors to the website can see where the events are located on Google Maps.

Now that smartphones are becoming more prevalent, I wanted to see if it was possible to build a web application that would show the user where they were currently located and then show them on a map how to get from their current location to a particular event.

So I did some research and learned that HTML 5 comes with a Geolocation API. This API allows you to execute Javascript functions within the navigator.geolocation object built into the browser that retrieve the supposed latitude and longitude coordinates of where the browser is located (and, if available, the altitude, heading, and speed at which the browser is moving).

Using the code examples I found on the Gelocation API page on the W3C website and on Oliver Wehren's geolocation demo page, I was able to create my own test page for determining my location and marking it on Google Maps. I then tried using the page with my Motorola Droid, my iPod Touch, and my manager's iPhone.

The default web browsers on all three devices implemented the Geolocation API (my preferred browser on my Droid, the Dolphin Browser, did not). Each of the browsers displayed a confirmation dialog asking for permission to share my location information with the web page (as mandated by the standard), and once I permitted the information to be used, my test page was able to place a marker denoting my location on the map.

However, the location wasn't as accurate as I had hoped. Although the API was coded to accept location data from the on-board GPS system in a mobile device, neither the iPhone nor the Droid seem to provide GPS data to the browser. If I was connected to the campus wireless network, my location was determined via the network topography, and it could be off by as much as 150 feet or so. The accuracy was even worse if I was relying solely on 3G: in that scenario, but the iPhone and the Droid had me located on the side of a state road on the outskirts of campus, a good twenty minute walk from where I actually was. I have no idea what caused both devices to pick that particular spot, as there certainly wasn't a cell tower anywhere near that location.

So I came to the conclusion that while the Geolocation API could be used to determine what town, city, or general area a user was currently in, it wasn't accurate enough (at least with these browsers in these devices) to provide walking or driving directions within a small area, especially given the fact that many of the users for the service I had in mind would only have access to the Internet via a 3G connection.

But if someone knows of a way of increasing the location accuracy of the Geolocation API, a way that doesn't require the end-user to modify their mobile browser in order to make it work, I'd love to hear about it.