1. Download the free trial version

Optimization Tips in Dev Console

Discussion in 'Questions' started by Kevin, May 28, 2013.

  1. Kevin

    Kevin Well-Known Member Licensed User

    I saw the following in my dev console for my apps.

    On the first two, I'm not exactly sure what I need to do. I know I can adjust the minimum SDK target, but I've never fully understood that option. My apps currently work on just about anything (back to 1.6 I believe) and I don't want to affect that. Also, my app shows it is compatible with "large" screens in the dev console but doesn't mention x-large. What do I need to change to set to do that? While not perfect, my apps do make adjustments based on screen size and whether or not it is a phone or tablet.

    Recently a customer told me the app shows as not being compatible with his Asus Transformer Prime but it used to. I know I didn't changed anything and my dev console says it is compatible. It could be a glitch but I just wanted to be sure that I am not blocking my apps from certain devices by not having it configured correctly.

    :sign0163:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The default manifest editor code sets targetSdkVersion to 14. You should keep it in almost all cases.

    The default value of x-large is True. This means that your app should be compatible with any screen size.

    In most cases incompatibilities with tablets are related to permissions such as telephone related permissions.
     
  3. Kevin

    Kevin Well-Known Member Licensed User

    I wonder if I have outdated settings from having an older project?

    Code:
    AddManifestText(
    <uses-sdk android:minSdkVersion=
    "4" />
    <supports-screens android:largeScreens=
    "true" 
        android:normalScreens=
    "true" 
        android:smallScreens=
    "true" 
        android:anyDensity=
    "true"/>)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    'End of default text.
    So I should change the sdk line to:

    Code:
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14" />
    Does minSdkVersion need to be changed? And that won't cause older devices to be incompatible?

    Where does the x-large = true part go?

    My app uses the Phone library but doesn't do anything that would require a phone as opposed to a tablet.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Yes, you should add the targetSdkVersion. minSdkVersion should not be changed. Your app will still be compatible with Android 1.6+ devices.

    You can add android:xlargeScreens="true" in the supports-screen node.
     
  5. Kevin

    Kevin Well-Known Member Licensed User

    Well, after adding these to the manifest I now remember why I didn't do this before... My app relies on menus to access certain features and setting the target sdk that high removes the menu button from newer devices.

    I think I need to finally figure out the action bar but from what I understand, in order for that to work you need to have a visible app title bar and my app doesn't have one (by design). Argh!
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    You can provide a different method to open the menu. Like a button somewhere.
     
  7. Kevin

    Kevin Well-Known Member Licensed User

    In a moment of genius yesterday, that is exactly what I did. :D
     
  8. luke2012

    luke2012 Well-Known Member Licensed User

    Why the menu has been removed ?
     
  9. luke2012

    luke2012 Well-Known Member Licensed User

    Hi Kevin,
    How did you resolved this issue ?
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    In the new Android style the soft menu button appears in the title bar. There will be no soft button if the title bar is hidden.
     
  11. luke2012

    luke2012 Well-Known Member Licensed User

    So the solution is to show the title bar to enable the menu ?
     
  12. Kevin

    Kevin Well-Known Member Licensed User

    You either need to show a title bar or create and show your own "menu" button whenever you would want the user to be able to access menus in your app.
     

Share This Page

Loading...