问题
How can I stop the user from sideloading a tablet only application on a phone?
回答1:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/13771343/how-to-stop-sideloading-a-tablet-only-app-on-a-handset-in-android