简体   繁体   中英

Android : Restrict apk file to install Only in Devices Which Uses HDPI & MDPI images.

I have One Project Which is Already Implemented in IPhone(more than 2 yeas ago). Now i just have that Source code to build this same application in Android. Due to some reason Client Does Not have Image Source Files right Now. So Right Now I just have images with resolution of 320*460 pixels to make application for android.

What Is My Problem : as we does not have high Resoultion images supported for xhdpi supported devices. Client Wants to restrict Application only for HDPI supported Screens not for xhdpi Supported Screens. First I just want to Know that Is it Possible to make apk file Supported only for Devices that Uses HDPI Images? and If Possible How can i do that?

What I have Searched : i have searched in StackOverflow but could not able to get my Problem Solved.

QUESTION : So How can I Restrict my APK file to Install only in Devices which Uses HDPI & MDPI Images. it should not be installed if Device Uses XHDPI images.

Thanks in Advance.

You can add this in your AndroidManifest.xml to restrict your apk file from installing in xlarge screens

<manifest ... >
    <supports-screens android:smallScreens="true"
                      android:normalScreens="true"
                      android:largeScreens="false"
                      android:xlargeScreens="false" />
    ...
    <application ... >
        ...
    </application>
</manifest>

For more information, look at the official documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM