0

How can I stop the user from sideloading a tablet only application on a phone?

4

2 回答 2

0

There are no mechanisms in the core Android OS to disable the ability to install an application based on the manifest filtration data for features like screen size, these values are only used by Google Play to determine which apps to show on which device. If a user somehow gets ahold of your APK through back channels, you cannot stop them from installing it.

However, after the application is installed, you can make use of technologies like the License Verification Library (LVL) to keep applications that have been improperly installed (i.e. not through Google Play) from being used.

于 2012-12-07T21:41:14.827 回答
0

You want to declare the following in the manifest: (source)

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

Beyond that, just make sure the app is licensed.

于 2012-12-07T21:42:19.273 回答