Restricting android app to phone only issue

hello_world

Going through other posts here and the android documentation, I added <compatible-screens> to my android manifest file to restrict my app only to phones. However whenever I try running it on the Nexus 7 tablet, the app shows up on tablet. Below is my android manifest file. Am I missing anything?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.myapp.testapplication" >

    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <compatible-screens>
        <!-- all small size screens -->
        <screen android:screenSize="small" android:screenDensity="ldpi" />
        <screen android:screenSize="small" android:screenDensity="mdpi" />
        <screen android:screenSize="small" android:screenDensity="hdpi" />
        <screen android:screenSize="small" android:screenDensity="xhdpi" />
        <!-- all normal size screens -->
        <screen android:screenSize="normal" android:screenDensity="ldpi" />
        <screen android:screenSize="normal" android:screenDensity="mdpi" />
        <screen android:screenSize="normal" android:screenDensity="hdpi" />
        <screen android:screenSize="normal" android:screenDensity="xhdpi" />
    </compatible-screens>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
CommonsWare

However whenever I try running it on the Nexus 7 tablet, the app shows up on tablet

Sure. If you are manually running the app on the device, it will run.

Quoting the documentation:

The Android system does not read the <compatible-screens> manifest element (neither at install-time nor at runtime). This element is informational only and may be used by external services (such as Google Play) to better understand the application's compatibility with specific screen configurations and enable filtering for users.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Android First App Tutorial Issue

From Dev

Android: Resume app variables after a phone reboot

From Dev

Restricting a user to only one row

From Dev

Restricting access to webpage to administrators only

From Dev

Restricting iOS app use by date

From Dev

How to solve this App bar display issue in windows phone 8 application?

From Dev

Restricting app installations from AppStore only to users with iPhone 5/5s/5c

From Dev

Convert Windows Phone 7 app to eclipse for android

From Dev

Android: Issue with in-app billing

From Dev

Restricting a mobile app to be the only client authorized to use the server API

From Dev

Android : TYPE_CLASS_PHONE keypad issue

From Dev

Memory issue with my Android app

From Dev

Android Ionic App not navigating properly in phone

From Dev

Restricting android app to phone only issue

From Dev

Phonegap - build Android app, issue

From Dev

Android app login and and Signin issue

From Dev

App Certificate Issue Android

From Dev

Restricting a user to only one row

From Dev

Windows phone 7 facebook app authentication issue

From Dev

Restricting iOS app use by date

From Dev

Windows Phone 8.1 App on App Store Issue

From Dev

Eclipse not running app on android phone

From Dev

Restricting a mobile app to be the only client authorized to use the server API

From Dev

Convert Universal app to Windows Phone app only

From Dev

Android studio app running issue

From Dev

JSOUP Parsing issue with android app

From Dev

Route restricting to that user and admin only

From Dev

Android app releases issue

From Dev

Restricting input text to only numbers and with minimum length to 10 for phone number

Related Related

HotTag

Archive