0

Using http://developer.android.com/about/dashboards/index.html I can see that going as far down as Gingerbread/API Level 10 all the way up will give me a range of 99.6%, but I am fairly new to Android development, I have never released an application and have some questions:

  1. In my gradle script I have minSdkVersion as 10, targetSdkVersion as 21, is that right?
  2. In my manifest file for all activities except my starting activity, I have the parentActivityName set. This gives a warning saying parentActivityName is only used from API Level 16, even though I use meta-data with parent activity defined in there. Am I missing something?
  3. If I keep my manifest "as-is" and launch, will users running pre level 16 run into errors navigating back up the activity hierarchy?
  4. Finally I tested my application in an emulator set to API Level 10 and there was no issues except for some minor UI stuff, however there was no way that I could see to press "Back" so I had to end the activity via Android Studio. How do you emulate going back in Gingerbread 2.3? My app does not have an action bar with left caret. Solely uses the phone's back button.
andrewb
  • 2,995
  • 7
  • 54
  • 95

1 Answers1

0

(1) Yes, you should always target the latest API. Source here.

(2) You don't need to specify your parentActivityName in the manifest. To get rid of the warning, you might as well remove the attribute. Source here.

(3) Not if you have set your minSdkVersion to 10, and implemented functionality that corresponds to these API levels. Also, when publishing to Google Market, devices that do not meet up with the minSdkVersion will not be able to download your app.

(4) Android phones always comes with a hardware back button. There is no need for the developer to implement this behavior, except when you want to modify it for your own needs. Source here.

Community
  • 1
  • 1
Marcus
  • 6,697
  • 11
  • 46
  • 89