Unlocked Android Dev Phone on AT&T
Can you use your Android Developer Phone with AT&T? Andrew provides a detailed experience report.
Short answer: yes.
Can you use your Android Developer Phone with AT&T? Andrew provides a detailed experience report.
Short answer: yes.
I released State Capitals version 1.0.2 tonight. This is an Android flash-card app for U.S. State Capitals.

To find it, just go to the Android Market and search for “State Capitals”.
This release does not add any new features. Instead, I focused on:
The animation is the biggest visible change. In the old version, a fling gesture moved to the previous or next card. My approach was:
If you’ve used the app, you also know I spin the card around using an animation. Every time onDraw(…) was called, I’d paint the card border, the state bitmap, and the text on top of the state. This made the code very inefficient.
In the new version, you can slide your finger on the screen, and the card moves with your finger. You also see the previous or next card directly adjacent to the current card.

I also generate a bitmap for the entire screen, and cache that bitmap. So when an animation occurs, I simply paint the cached bitmap.
Finally, I eliminated many memory allocations. For example:
If you want to learn more, check out “Google I/O 2009 – Writing Real-Time Games for Android”.
My focus on reduced object allocation is a direct result of watching that video, and it made a huge improvement to my app.
Last week I installed a goofy app “Arnold Soundboard for Android” from Swiss Codemonkeys. I shouldn’t have, because the app requested network access.
Today, I received what appeared to be an SMS message. It had a little “thumbs-up” icon, and it said something like “A friend recommended an app!”. Clicking on the link brought me to the Android Market link for the Horoscope Widget, also from Swiss Codemonkeys.
I strongly suspect this message came from the Arnold Soundboard app, but I can’t really prove that. I did report it as a possible malicious app, and I recommend people avoid apps from Swiss Codemonkey. (or any other apps that request network access even when they don’t do anything network related).
If you are an application author, feel free to advertise your other apps. But don’t send messages pretending to be “recommendations” from alleged “friends”.
By the end of 2009, Google predicts there will be at least 18 Android phones. This is great news, but it also means developers must create apps that work on a wide range of devices. Each phone may have a different screen resolution, support different sensors, and could report a different User Agent string when accessing web sites.
Create an online, interactive Android device database. This web site will list every Android device, along with complete specifications. The site should use AJAX so visitors can sort, search, and filter efficiently. Using this site, people can see:
Part of this project involves a client application running on Android. This application will inspect all of the phone’s features and upload them automatically to the Android device database web site. For example:
This information is easy to gather, and can be POSTed to the web site as XML or JSON. Once submitted, the information is automatically entered into the phone database along with the User Agent the phone sent.
I don’t have time to create this app (I’m working on something else). If I did have time, here is how I’d do it:
This is a technically easy project. The main challenge I anticipate is fighting bogus submissions and spam. You could implement a moderation queue for any new submissions. Once someone with a T-Mobile G1 submits the first report, all subsequent submissions from identical phones should be identical, and would thus be automatically ignored.
You may need to moderate and approve brand new submissions from phones that are not yet recorded in the database.
It might be nice if people could post pictures of each phone on the web site. This would be a manual process, as the phone software cannot take a picture of itself.
So what do you think? Is anyone interested in creating this application?
Is Telegraph.co.uk a real web site, or is it a parody site like The Onion? Let’s take a look at some claims made in this article about the Vodafone Magic phone.
Vodafone’s new flagship is superb – Apple should be worried – yet the packaging for the HTC Magic is discreet.
OK. Apple should be worried..about what? Let’s see.
…whereas the Storm endured weeks of teething troubles prior to evolving into the best business handset on the market, the Magic weaves its spell from the moment you turn it on.
Does this phone offer Exchange support? Because without that, it’s not going to make inroads into the “business market”.
The handset also lacks a standard jack for headphones; an adaptor, however, is included in the box.
WTF? Another stupid non-standard headphone jack. Awful. Carrying an extra adapter is a pain. I have used headphones with my G1 exactly zero times. It needs a standard jack.
Three aspects are particularly impressive: the first is the touchscreen, which works as effectively as the iPhone’s, and consequently is among the best on the market.
Absolute horse shit. Ask any parent who has these two things in his or her house:
Multitouch is essential. A single touch screen isn’t even in the same league as iPhone. A toddler knows this intuitively. Watch them pinch the screen when viewing photos and playing games on an iPhone.
I have handed my G1 to family members and friends, and when they go into a picture, web page, or map…they instinctively try multitouch gestures.
I love Android, but let’s not be naive about how these phones stack up against the iPhone.
Yesterday, I posted this picture from the Snake game on my G1 phone:
I received this comment from Alex:
Snake with open/close is a memory leak . As a weather has nothing to do with Android just bad app.
Here is how I duplicate the bug:
Just repeat steps 2-3 a few times until it crashes, it usually takes a few tries. Is this a memory leak, as Alex suggests?
As you can see, this is an ArrayIndexOutOfBoundsException, not a memory leak. Here is the complete stack trace:
java.lang.ArrayIndexOutOfBoundsException
at com.example.android.snake.TileView.setTile(TileView.java:150)
at com.example.android.snake.SnakeView.updateApples(SnakeView.java:434)
at com.example.android.snake.SnakeView.update(SnakeView.java:405)
at com.example.android.snake.SnakeView.setMode(SnakeView.java:336)
at com.example.android.snake.SnakeView.onKeyDown(SnakeView.java:279)
at android.view.KeyEvent.dispatch(KeyEvent.java:718)
at android.view.View.dispatchKeyEvent(View.java:3154)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:734)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:734)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:734)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1589)
at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1084)
at android.app.Activity.dispatchKeyEvent(Activity.java:1856)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1560)
at android.view.ViewRoot.deliverKeyEvent(ViewRoot.java:1616)
at android.view.ViewRoot.deliverTrackballEvent(ViewRoot.java:1508)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1201)
at android.os.Handler.dispatchMessage(Handler.java:88)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3739)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
at dalvik.system.NativeStart.main(Native Method)
I find that most Android bugs occur when Activities pause and resume. Changing screen orientation is a great way to crash many applications. That’s because orientation changes trigger lifecycle events. These events will occur at inopportune moments, such as when you receive phone calls or the user hits the Home button.
Applications that do not properly react to onPause(), onResume(), and other such methods will eventually fail.
You can use the UI/Application Exerciser Monkey to stress test your application. In the emulator, you can simulate incoming phone calls, which will pause the current Activity. You should also open and close the keyboard — repeatedly — while your application is performing tasks.
In summary, you need to brutalize your applications. Try really, really hard to break them. Android is a challenging environment because you must carefully manage threads, react to a complex series of lifecycle events, and deal with limited resources.
A few minutes ago I tried to take a picture with my G1 phone. My phone failed:
So I grabbed my Canon PowerShot SD1100 camera and snapped the picture shown above. My Canon camera never shows a “Force Close” error. It just works. I expect the same user experience from my phone. Is that an unreasonable expectation?
Here is the Weather Channel Android application, one of the most popular apps in the Android Market. It Force Closes becomes unresponsive from time to time. To get this picture, I simply tapped the tabs quickly:
Next I opened the Snake game. I opened and closed the phone a few times and…well, you know what’s coming next:
This is not good enough.
This example is a bit simpler than the bouncing ball demo I posted ten days ago. When you tap the screen, a bubble appears. This bubble grows until it pops. Tapping several times makes several bubbles.
Android Bubbles Example from Eric Burke on Vimeo.
Goals:
The pop sounds like crap on the phone, even worse in the video. You can find the original popping sound on freesound.org. I clipped the sound (using Audacity) to make it play faster, I suspect it can be improved with some work.
You can find the source code for BubblesModel.java and BubblesActivity.java on GitHub.
This app still has a serious bug, described in this Android Developer’s Post. Let me know if you know how to fix this!
Aside from that bug, this is not production-ready code. It is pretty sloppy with memory, copying a List of Bubble objects on each iteration of the game loop. I opted for brute force synchronization just to make it work. For a real game, I’d spend more time on fine-tuned locking and sharing objects to minimize garbage collection.