Google Abandons Maps for Adobe Flash/Air

On September 2, 2011, Google announced it was deprecating the Google Maps API and actively encouraging users to migrate to JavaScript Maps API v3. While abandoning support for the Flash API comes as a bit of a shock, it is not completely unexpected, as Google has not released an update for the API in the last year and support for issues related to the Adobe Air version had deteriorated. As a silver lining, Google’s depreciation policy indicates the product will continue to function for three years until September of 2014.


Disappointed with Adobe

As JavaScript has radically evolved over the last few years, it is understandable that Google wants to settle on a single, browser-independent platform for its Google Maps API. In fact, the more I ponder the loss of Google Maps on the Flash/Air platforms, the more I am disappointed with Adobe for the current Flash situation. Following the release of Flash Builder 4, Adobe decided to take Flex in a different direction, one I objected to in my review of Flash Builder 4, focusing more on wooing designers than developers with its new skinning interface. In fact, prior to Flash Builder 4, I encouraged Java developers to learn Flex given the similarities in syntax and the richer user interface than Swing/JavaFX. These days, I do not encourage anyone to learn Flex, as the current API is erratic and future of Flash/Air is unknown.

The Future(?) of Adobe Flash and Adobe Air

The loss of Google Maps for Flash/Air feels like another nail in the coffin for Adobe Flash. Flex developers may recall that Adobe launched Air more than three years ago as a stand-alone Flash application platform. Adobe Air provides a run-time environment, similar to the Java JRE, that offers developers a richer feature set and more customization than a standard web-based Flash application allows. Unfortunately, with the growing mobile market, Adobe has virtually abandoned all efforts to market the Adobe Air platform. In fact, I can count on one finger the number of individuals, myself included, who I know have the Adobe Air runtime installed.

Final Thoughts

The last few years has seen the rise of mobile platforms in a big way, so much so that proprietary web platforms like Flash, Silverlight, and others have fallen by the wayside. I think Adobe’s biggest mistake regarding Flash in the last few years was in not actively pushing Adobe Air as a general purpose platform. Despite adding a number of Flash-specific features in the latest CS5.5 release, Adobe has not done a lot to encourage developers to stick with the platform. The loss of Google Maps for Flash may be just one in a series of events that leads to the end of the Flash platform as we know it.

jeanne’s attempt at pomodoro

When I work at home on personal computer projects, I have one of two problems:

  1. getting distracted from my main task by other computer things or other items that need doing around the house
  2. getting so absorbed in my task that I forget to look away from the computer causing me to get a headache and need to stop
Neither of these is an issue at work and I can usually get a couple hours of personal project stuff done on a given weekend day before it becomes a big problem.  Which is all the time I usually have anyway.  One weekend was different.  I was technical proofreading a 300-400 page book (The Well Grounded Java Developer) and needed to get a lot done in a short time.  I blocked out my weekend to have 15-20 hours to do it.  Then all I needed was focus.
I’d read about Pomodoro and decided it to try it with this particular project.  (which is evidence of problem #1 – I was experimenting with Pomodoro when I should be reading.)
Installing software
First I installed the GNU pomodairo app.  Including the download of Adobe AIR itself, this took less than ten minutes.  I added my tasks and kicked it off.
How it went
The beginning two Pomodoros were the toughest.
  1. On the first one, I got water 2 minutes before the break. I needed to trust it and wait longer.  The sound was a bit jarring.  I only read 3 pages (and played with an example.)  Not much momentum yet.
  2. On the second one, I worked a whole pomodoro but only read one page (and fiddled with examples).  I did get in the zone although I could have stayed there longer.  I took a break anyway to avoid burnout.  I did successfully wait out the Pomodoro to check my e-mail (which I noticed because gmail automatically pulls mail and I needed to refer to one as part of my task).  I learned the tool shows your pomodoro as interrupted if you don’t click the right button at the end of a Pomodoro.
  3. On the third one I was starting to feel the flow.  That time I did get fully into what I was doing in 25 minutes and got two tiny chores done during the break.
  4. At this point, it started working.  I got absorbed during every Pomodoro.
My stats weren’t correct.  I lost two pomodoros on the second chapter I read. I think it was because I didn’t explicitly select the next task when I finished the first one.  But the stats didn’t matter.  What mattered is that I was able to get focus and momentum going.  And I didn’t have a headache at the end of the day.
Conclusion
I’m not sure if it was the Pomodoros themselves that helped me or the fact that I was doing something different so felt obligated to be responsible.  Hmm.  That sounds like a good question to post on productivity.stackexchange.com.  Did so here.

Android Development Gotchas

Android Development Gotchas

This isn’t designed to be a definitive list of unexpected occurrences while developing for Android, but it is a list that I scratched down while I was picking up some skill for myself. It won’t save you from every issue but there may be cases where you can stop and think “Yeah, Dave told me that would happen”.

My development environment included Eclipse 3.5 with the Google ADT plugin and all testing was against a rooted HTC Desire and unroot Samsung Galaxy SII both running Android 2.2, development code targeted Android 2.1. Problems may be an issue with ADT, HTC, Samsung, Android 2.1 or 2.2, rooting or the specific hand sets 🙂

Java 1.6 on a Dell XPS 1530 running Ubuntu 10.10, if that matters.

Virtual Devices

I found these too slow and unusable.

Early on in development I gave up trying to use the the ADT virtual devices and tested directly against the target hardware devices. Luckily for me the application was for internal use only and would be released to specific clients with specific handsets, but I was disappointed at how slow the VMs were start and how slow they ran. The develop-deploy-test cycle was just too slow using the ADT.

Virtual Devices Cannot Support Bluetooth

ADT Virtual Devices cannot support Bluetooth, and as our application includes Bluetooth communication this was another reason ADT development was excluded.

Inconsistent Bluetooth Support Between Vendors

This was a strange one to us, and not one that we have (to this point) been able to resolve although my guess is that it is a problem with the HTC code.

Our application involved having a file sent to the phone using OBEX over Bluetooth. No problems so far. Pair the devices, enter the code, initiate the file transfer.

The Samsung Galaxy SII displayed the preferred behaviour, where the incoming file prompt the phone user to accept the file, but also provides a checkbox to always accept files from this device. If you don’t select the checkbox then you are prompted each time a file arrives, but you are still able to check the box later on.

When the first file arrives, HTC Desire asks if you want to allow the remote device to synchronize contacts, and whether you always want to allow this. If you don’t allow this, you aren’t able to get to the next step where you accept the file. If you don’t accept contact swap all the time you’ll be prompted each time. Regardless of whether you swap contacts or not, you must accept each file as it comes in. Accepting every file manually is not our preferred behaviour.

Android Apps Run on a Single Thread

Some of this cuts into Android’s Handlers, task scheduling and communication across threads, but it may come as a surprise during development that all standard processing occurs on a single Thread. This is something that you’ll want to play with and become familiar with as it may be surprising that UI performance is impacted by Runnables and Services.

I do recommend you have a play.

Creating new Threads is one option, although Android’s AsyncTask is the preferred mechanism for truly asynchronous processing that doesn’t freeze the GUI.

… and that Thread is a UI Thread

Following on from the previous point, the main thread is a UI thread and that that thread is only active when the UI is active. Sort of. Check the Android fundamentals processes and threads page, but just be aware that if you want something to process while (for example) the screen is locked, you need to be aware of the processing thread.

Beware Empty Elements in XML Layouts

If you’re like me, you like tidy XML and prefer an empty element (where applicable) to an element which is not ’empty’ but has no child elements.

	<!-- this element has no children -->
	<ListView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@android:id/list"></ListView>
	<!-- this is an empty element -->
	<TextView android:id="@android:id/empty" style="@style/EmptyContent" android:text="@string/emptyResponseEntries" />

In this example, the TextView is empty and causes no problems, but the ListView will. If you make the ListView an empty XML element, you can write items to the List, but they won’t show up on the screen. There won’t be any error reported, it just won’t show up.

Can’t Read Property Defaults

Property defaults were also something I found perplexing. If you specify a properties.xml file, each property is able to define a default value. Likewise when reading properties via the SharedPreferences you can specify a default value if the property doesn’t exist, but the two default values aren’t related. You can’t read the default value as defined in the preferences.xml file for use elsewhere, the API doesn’t provide access.

Note that recommended properties management is via the PreferenceFragment

Notifications Can Be Empty

I found this one amusing. It is possible to create an empty Notification using new Notification(), specify a notification sound, and annoy users without providing any indication of where the annoying sounds are coming from.