Senin, 18 Juli 2011

Several New Android Updates

Android API Level 13 is
Android 3.2 is
Honeycomb
The Android team has posted several new updates in the last few days. The most obvious, which was already rolling out to consumer devices, is the Android 3.2 SDK. This is API Level 13 and is the most recent incremental update to Honeycomb. It's main new features revolve around expanded screen compatibility support. New resource qualifiers are available to developers and official support is in place for devices with screen resolutions of 1024x600 (most frequently found on 7" tablets).

The Android NDK was updated to release 6. This adds support for the x86 Application Binary Interface (ABI). Although it doesn't say as much, we're assuming this is in advance of broad availability of Android applications for Google TV devices, many of which are on Intel x86 platforms (such as the Logitech Revue, which is built around an Intel Atom processor).

The Compatibility Package has been updated to Release 3. This release marks a change from previous releases in that it now has both API Level 4 compatibility classes, several classes that are no longer exclusively for compatibility, but rather add new, useful features for developers. This includes versions of these classes for API Level 13, such that those classes behave more appropriately on the new Honeycomb release (we assume).

This has left us wondering about the future of the Compatibility Package. We've found it incredibly useful and one of the best ideas out of the Android team for adding higher level features that could be implemented on old platforms. What we're wondering is if this will become a pattern? Instead of adding a new, higher level, feature to the base API and then adding compatibility classes, will they start adding such classes directly to the Compatibility Package and now to the the base API? This would ultimately result in more efficient APIs on all SDK levels.

Either way, the Compatibility Package continues to be a very important piece of the Android picture.

Which of these updates is most interesting to you? What new opportunities do they allow for you as application developers. We love to know what you're working on!

Rabu, 13 Juli 2011

Important Android Update Coming: Developers Must Take Action

The Google Android Developer's blog recently posted about a change to Honeycomb. This change is the ability for users to be able to choose to stretch your app or scale your app. This option will be enabled unless you, the developer, specifically sets support for xlarge screens:

<supports-screens android:xlargeScreens="true" />

Or you set the minSdkVersion or targetSdkVersion to API Level 11 or higher. 


If neither of these is true, the user will be give the option to scale your app in a way that may make it look much worse. If you are already doing the right thing with respect to supporting various screen sizes, the scaling mode will make your app look worse. This is because the scaling mode emulates an MDPI normal sized screen. That is, your app will become a pixelated version of what it looks like on the venerable G1. 


Is this what you want? Probably not. You must update your application to avoid this situation, but only if you do not already have xlarge screen support or API Level 11 or higher listed as a target or minimum SDK version.


The update to enable this on some devices rolled out yesterday. Get to it!


Need more resources on how to handle multiple device resolutions?





Jumat, 08 Juli 2011

Motorola Atrix 4G: Connecting to a Mac

Motorola Atrix 4G
When we first got our Atrix 4G test device, we were momentarily dismayed when it didn't just show up in ADB for testing. We had set the USB to debugging mode, all of our other devices connect and work without any trouble. Was this some at&t thing we'd missed?

Luckily, it wasn't. Our Mac is running 10.6.6, which apparently introduced an incompatibility with ADB 1.0.26. Supposedly other configurations just work. We have this configuration, and so can't comment on the others.

Luckily, there's a very simple solution:

None or USB Mass Storage
When the device is connected, choose the "USB connection" item from the notifications, then pick either "USB Mass Storage" or "None." Voila! The phone appears in ADB! Motorola Phone Portal and Windows Media Sync apparently don't work so well with whatever the combination of Mac OS 10.6.6 and ADB 1.0.26 do.


Selasa, 05 Juli 2011

Reader Feedback: Using Your Personal Device for Development

We had an interesting comment come in from a reader recently. In our books, work, and discussions with developers and clients, we always strongly recommend testing applications on real hardware -- as much real hardware as you can feasibly get your hands on.

Why? Won't the Android code just run everywhere?

Sure, the code will run everywhere. The results, however, will not be consistent. It doesn't mean that your app will run properly or as you expect it to. This can be due to different device SDK versions, bugs in your own code, unexpected device differences (such as strange screen resolutions or manufacturer features that modify behavior slightly), and simply device firmware bugs.

Back to the reader comment:

"... because there was no mention if it would have any impact on the device.  What I mean is, will it reload all the device programs and possibly mess up my phone?"

This is a great question. Having done mobile development -- and used personal devices for testing, in addition to piles of test-only devices -- for over a decade, we often forget about such basic things. Once upon a time we worried about such issues - typically we worried most about "bricking" our phones, or causing them to become unusable.

The simple answer with Android is no, writing and deploying apps won't mess up your personal device. Well, no more so than you could mess up your device by installing someone else's poorly written app. The more complex answer is that it could, but it depends on what you're doing. If you're just loading your own applications and running them, even on the debugger, that alone won't cause problems. If you're doing something tricky with your code, going beyond the bounds of the SDK, or other lower level items, you could cause resets, instability, and even data loss -- but simply due to bugs in your code.

One caveat here is that at no time in our books or articles do we recommend rooting your device, which opens it up to higher chances of causing damage. Rooting your device gives you access to underlying systems and services that are made unavailable to developers for good reason. Yes, there can be reasons to root your device, but those who pursue this do so at their own risk. Our general feeling is that testing with rooted devices is not useful, because the majority of users in the world don't root their devices, and that's the environment our apps will run on and therefore the environment our apps should be tested on.

We do recommend backing up your data. For instance, if you're writing an app that reads and writes to the device images and you have a bunch of family photos on the device that you haven't backed up, do so. Same goes for working with contacts, etc. Maybe one of your apps accidentally deletes everything during testing. That wouldn't be any fun, would it? Therefore, your biggest vulnerability when using a personal device is the data, not the device itself.

Further, you can still use your device for purchasing items off the app stores: Android Market, Amazon appstore, and any others you'd like. Again, using a device for development does not require rooting that device, so you can still purchase books and movies that are sometimes blocked on rooted devices.

Finally, even the carriers/operators won't know or care. It's not really any different than loading apps from alternate markets. If you're developing an application that uses a ton of data over cellular connections, you might need to make sure you have a data plan that includes a lot of bandwidth, or unlimited usage, to avoid hefty fees.

Ultimately, our own personal devices are the ones we test or demo apps on the most because they are always with us and are the most convenient. We don't have to sift through boxes of cables and devices if we're using our personal devices.

Senin, 04 Juli 2011

Win a Copy of Our Advanced Android Book!


There's still time! You've got until July 8th to enter to win a copy of our advanced Android development book over at the Android Police website! Just post a comment about an app idea you've got and you'll get a chance to win one of five copies of Android Wireless Application Development, Second Edition!

We look forward to reading your comments and good luck!

(Note: This particular contest appears to available to anyone in the world!)

This book is our most recent in the Developer's Library series and is more advanced than our upcoming title, Sam's Teach Yourself Android Application Development in 24 Hours, Second Edition.
ANDROID BOOK © 2008 Template by:
SkinCorner