How to Restrict Android App to Specific Device Make

How to restrict android app to specific device make?

You don't need to filter your app based on device/manufacturer in the application code, instead you can do it from the android market developer console - https://market.android.com/publish/ just when you publish the app itself.

There is a 'Supported Devices' section on the developer console, which shows you a list of all the devices which can access the android market. You can then filter out devices or manufacturers that are not compatible with your app

This is the section in the main developer console:

This is the section in the main developer console

Here you can exclude devices and/or manufacturers from being able to see your app

Here you can exclude devices and/or manufacturers from being able to see your app

For more information please refer to the Device Availability help page which says:

The Device Availability dialog can help developers in two powerful
ways:

Understand which devices can find your app in Android Market

  1. Device Availability provides a dynamic list of compatible devices based upon
    your manifest settings. For example, if your apk’s manifest specifies
    a large screen size, the console will reflect the supported devices
    that can find your app in Market.

  2. You can also use the dynamic search
    feature to see the devices that your application will not be available
    to. You can search by manufacturer, the design name (E.g. “Passion”),
    or the actual public device name (E.g. "Nexus One"), to see if your
    manifest settings filtered a device. Filter problematic or
    non-compatible devices This feature provides a device-specific
    administration option to developers. When you add a device to the
    “Manually Excluded Devices” list, your app will not be available to
    that excluded device in Market. This is primarily intended to help
    developers provide the best user experience possible, by helping
    developers filter out devices known to have compatibility problems.

How to restrict android app to specific brands?

Use the "Device Catalogue" in the Play Console to exclude all non Samsung devices:

Sample Image

Please note you'll have to regular check and update this list as new devices are released.

How to restrict app to specific devices ?

Try this:

Add the following things on your AndroidManifest.xml before <application> tag :

<supports-screens android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
android:requiresSmallestWidthDp="480"
android:compatibleWidthLimitDp="integer"
android:largestWidthLimitDp="integer"/>

You can also follow the reference links::

http://android-developers.blogspot.in/2011/09/preparing-for-handsets.html

Sample Image

The above code automatically filters devices by Play Store.

How to restrict app to Android phones only

Quoting the documentation:

Because the system generally scales applications to fit larger screens well, you shouldn't need to filter your application from larger screens. As long as you follow the Best Practices for Screen Independence, your application should work well on larger screens such as tablets. However, you might discover that your application can't scale up well or perhaps you've decided to publish two versions of your application for different screen configurations. In such a case, you can use the <compatible-screens> element to manage the distribution of your application based on combinations of screen size and density. External services such as Google Play use this information to apply filtering to your application, so that only devices that have a screen configuration with which you declare compatibility can download your application.

Bear in mind that <compatible-screens> requires you to whitelist every screen size and density that you are supporting (and we get a new density every year or so), and you are limited to the classic screen size buckets (small, normal, large, xlarge). The documentation's sample is missing some densities:

<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>

You will need to add additional elements if are willing to support tvdpi, xxhdpi, and xxxhdpi devices.

Quoting the documentation for <compatible-screens>:

Caution: Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with a screen configuration that you have not listed. You should use it only as a last resort, when the application absolutely does not work with specific screen configurations. Instead of using this element, you should follow the guide to Supporting Multiple Screens to provide scalable support for multiple screens using alternative layouts and bitmaps for different screen sizes and densities.

And bear in mind that marketing terms like "phablet" is ill-defined, and so your app may wind up shipping on some devices that you happen to think is a phablet or that somebody else thinks is a phablet.

How to restrict App for specific Android versions in Google Play Console

In the play console you can only block apps for regions or specific devices.

If you really can't upload updates your best bet is to start excluding devices of which you know they have received an Android 7 update. Not recommended.

Blocking an app for an API level will require a deploy since it's done in the manifest file (in gradle config).

<manifest xmlns:android="http://schemas.android.com/apk/res/android" ... >
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" />
...
</manifest>

From Supporting Different Platform versions.

An overview of all the current API levels can be found at What is API level.

When configured in Gradle it will look similar to the following snippet of a your_app_module/build.gradle file. Note that in the final result, the compile APK this will be part of the manifest.

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "your.app.id.here"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "0.1.0"
}

How to limit my paid app for only one device on same account in Android and iOS

What you seem to need to do, is to get the device_ID and pair it with the account.That shouldn't be hard.

You get the device ID when your customer registers ,than at login you check the login credentials AND the device ID...

Here's pretty much all you need regarding the device ID (not the login,I trust you can handle it yourself)

How to get unique device hardware id in Android?



Related Topics



Leave a reply



Submit