Saturday, September 11, 2010

Historical Revision — v1.4

Well, fun, now I have a better understanding of backwards compatibility and Android versions.

I had asked my friend at work to download my app to show him "all the features," but he couldn't find it in the marketplace. Hmmm. I immediately suspected a firmware version difference. Turns out, he had 2.1, whereas the minSDKVersion tag in my application's manifest file was set to "8" (2.2). "Aha!"—I thought—"I'll simply change the minimum SDK level to 7!" It was a brilliant solution, requiring no programming whatsoever.

It was too good to be true, apparently. I found out later that the app crashed before even opening on 2.1 phones. This, upon further investigation, was caused by one simple new addition: Display.getRotation. In former Android versions, the method was Display.getOrientation. With a bit more research and fiddling, I figured out how to make it work for everyone—even all the way back to Android 1.6! This feat required a few more changes than just the orientation one, but overall nothing too complex. After all, my app is just a pillow, right? How complex could it be?

No comments:

Post a Comment