Android targetSdk and the Legacy Soft Menu Button

5 11 2012

At Google I/O 2012, Google made it a point to stress that Android developers should be leveraging the highest API level for the targetSdk attribute in our application’s manifest. They stated that essentially it should be the latest version of Android available. As I hadn’t been doing this in the past, when I got back to the client site I immediately started setting this attribute to the latest version available, API level 16 (Jelly Bean).

What I didn’t realize, is that this attribute determines whether or not the legacy Menu button appears in the soft key button tray for devices that only have soft keys. If your application isn’t up to the design standards that Google recommends for ICS+ and you have legacy menu options in your application, you’ll need to ensure that the API level you specify for targetSdk is no greater than level 10, Gingerbread. If you specify anything above that, your users will lose their ability to use Menu options.

Advertisements