Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to publish tablet only Android app with vector drawables

I have created Android application which is targeted to tablet devices only. In AndroidManifest I have set following screen support:

<supports-screens
        android:largeScreens="true"
        android:normalScreens="false"
        android:requiresSmallestWidthDp="600"
        android:smallScreens="false"
        android:xlargeScreens="true" />

All graphics in my are vectors so the XML files are put inside the drawable directory directly. Only bitmaps are the launcher icons which looks like this:

res\mipmap-hdpi\ic_launcher.png
res\mipmap-xxhdpi\ic_launcher.png
res\mipmap-xhdpi\ic_launcher.png
res\mipmap-xxxhdpi\ic_launcher.png
res\mipmap-mdpi\ic_launcher.png

In developer console I'm getting a warning that my application is not designed for tablets properly "Use Assets Designed for Tablet Screens".

I have tried adding mipmap-large-mdpi\ic_launcher.png and mipmap-xlarge-mdpi\ic_launcher.png but it had no effect on the warning.

What can I do, to have my app properly designed for tablets?

like image 392
jnovacho Avatar asked Dec 17 '16 14:12

jnovacho


2 Answers

The same app always works for phone and tablet. Phone and tablet is the same category. But Android TV, wearables are different categories. Google Developer console asks you to provide tablet screen images because tablet requires relatively large images. And these images are bitmaps. so you have to provide bitmap images for the tablet while you publish Apk.

Since VectorAssets look the same in every density (size) screens. But for the bitmaps (eg, ic_launcher.png, Action Bar & Tab Icon, Notification icons), it should be properly designed using Android Studio Asset Manager.

"Use Assets Designed for Tablet Screens" is explicitly stated problems. So, generate all bitmaps using Android Studio Asset Manager.

Eg, to generate (replace your launcher icons): right click on ic_launcher.png" package > new > Image Asset > Change the Asset type to image > and then complete ....

Below image for more clarification.enter image description here

Note: You don't require below lines in AndroidManifest.xml. You can delete whole <supports-screens /> block.

<supports-screens
    android:largeScreens="true"
    android:normalScreens="false"
    android:requiresSmallestWidthDp="600"
    android:smallScreens="false"
    android:xlargeScreens="true" />
like image 111
Uddhav P. Gautam Avatar answered Sep 21 '22 21:09

Uddhav P. Gautam


To get your app filtered for just Tablets running ICS in Google-Play you would do this in your AndroidManifest:

<supports-screens
    android:largeScreens="true"
    android:normalScreens="false"
    android:requiresSmallestWidthDp="600"
    android:smallScreens="false"
    android:xlargeScreens="true" />

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="14" />

To get HoneyComb Tablets as well you simply change your minSdk

<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="14" />
like image 31
Avid Avatar answered Sep 20 '22 21:09

Avid