How to restrict app to specific devices ? - android

I am writing a media player application. It is best to see in 10 inch tablet, 7 inch tablet, 5 inch phone. So I wanna restrict my app to install to those devices only. How can I do that?
Here are my current manifest file values
<application
android:hardwareAccelerated="true"
android:allowBackup="true"
android:icon="#drawable/logo_new"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:hardwareAccelerated="true"
android:name="VideoActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

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
The above code automatically filters devices by Play Store.

Related

My android app is not available for tablets on google play

I made an android app for ordering a cab. I uploaded it on goole play and everything was fine until i tried to find the app over a tablet. I cannot find the app on google play. I googled the problem and i put the screen size in the manifest but its still not working.
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true">
<activity
android:name=".splash"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name=".order"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name=".personal"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name=".flight"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
<activity android:name=".details"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"></activity>
</application>
<supports-screens
android:anyDensity="true"
android:xlargeScreens="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
Issue is in "android.permission.CALL_PHONE" permission that might not be available for tablets. You should add additional entry that shows that is not absolutely required feature and then handle that scenario in your code when you are accessing those features.
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
Android documentation for <uses-feature>
You should place screenshots for the Tablet Portion as well as the requirements needed by the Google Play for Tablets.
You should put all requirements for tablet and create .xml file for tablet in app layout folder and Screenshot for tablet. see more from documentation

SDKBOX Unable to login into facebook on an android device

I've used SDKBOX to integrate facebook in my cocos2dx project but I am unable to login into facebook on android device. I think I am missing a minor thing. Can somebody help me on this?
Ps I have so far managed to login and share on ios devices but when i try to do the same thing on android i face issues.
Cocos2dx 3.9
Latest Sdkbox.
Device Nexus 4.
Android Manifest file.
<uses-sdk android:minSdkVersion="9" />
<uses-feature android:glEsVersion="0x00020000" />
<application hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name">
<meta-data android:name="android.app.lib_name" android:value="cocos2dcpp" />
<activity android:configChanges="orientation" android:label="#string/app_name" android:name="org.cocos2dx.cpp.AppActivity" android:screenOrientation="portrait" android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="#string/app_name" android:name="com.facebook.FacebookActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar" /><meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id" />
<provider android:authorities="com.facebook.app.FacebookContentProvider1602801803302391" android:exported="true" android:name="com.facebook.FacebookContentProvider" />
</application>
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
Your AndroidManifest.xml seems fine.
Could you please check Manual Integration For Android and Android Studio section in this link and make sure that all things are there for you ?
Best,
Pabitra

Phonegap Application doesn't show up for Tablet in google Play Store

I would like to publish an App for both, Smartphone's and Tablet's with Phonegap, but my testing-app isn't showing up for Tablets in the Play Store. It's only showing up for Smartphones, altough there are Tablet devices displayed in the device compatibility list with a green Checkmark next to it.
Info:
App is almost empty
No Permissions are set
support-screens has the attributes "largeScreens" and "xlargeScreens" set to true
Manifest File:
<manifest android:hardwareAccelerated="true" android:versionCode="7" android:versionName="1.0.6" android:windowSoftInputMode="adjustPan" package="my.testing.app12345" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<application android:debuggable="false" android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/app_name" android:name="ResolutionTester" android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="19" />
</manifest>
I found out that my app is properly findable in the play store, even for tablets. The message for improving my app by creating a 7" layout for tablet users is still there, but it's installable for tablets trough the play store without problems. Strange...

Friends android devices cannot install my android app, I cant even do it for my own

I recently uploaded my android app to the marketplace https://market.android.com/details?id=com.DGNT yet my friends cannot install it on their devices (says their phone is incompatible). The site even says my own phone is incompatible for my own app, even though i have compiled it through eclipse and sucessfully installed the apk on my phone and tablet. (telus LGE LG-p500h and asus transformer tf101)
Is there something wrong with my app or should i just wait a little longer to see what happens? Ive been told my manifest could have something to do with it so here is what i got.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.DGNT"
android:versionCode="2"
android:versionName="1.01">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name="com.DGNT.MainScreenActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.DGNT.QuickStartActivity"
android:label="Quick Start"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.DGNT.ManagePlayersActivity"
android:label="Manage Players">
</activity>
<activity android:name="com.DGNT.PlayerListActivity"
android:label="Start From Player List"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.DGNT.EditPlayersActivity"
android:label="Edit Players">
</activity>
<activity android:name="com.DGNT.CreditsActivity"
android:label="Credits">
</activity>
<activity android:name="com.DGNT.HelpActivity"
android:label="Help">
</activity>
<activity android:name=".AboutActivity"
android:label="About">
</activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
</manifest>
You should definitely have a <supports-screens /> element in your manifest to list the screen sizes your app is compatible with. Try adding this just after your opening manifest tag:
<supports-screens
android:xlargeScreens="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true" />
That should open up the app for any type of screen. Obviously I'm assuming here that you want it available for any screen size, so tweak as needed! More details here.
Hope that solves it for you

Android application no more compatible on Market

I've developed an App using level API 10 (2.3.3 SDK version), I've published it on Android Market and all has gone fine. My Application has FINE and COARSE location, INTERNET and NETWORK STATE as uses permission.
Next, I've tried to extend compatibility to level API 8 (2.2). After I've published the new apk on market the App results no more compatible with my device (I've a Samsung GT-I9100, with 2.3.6 Android version).
I've tried to delete cache but nothing, my device is no more compatible.
But if I install the apk via file system the App perfectly works.
EDIT:
Here my Android Manifest
<manifest package="com.agora.md" android:versionCode="16" android:versionName="1.1.15" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-sdk android:minSdkVersion="8"/>
<supports-screens android:smallScreens="false" android:largeScreens="true" android:normalScreens="true"/>
<application
android:icon="#drawable/icon_md1"
android:label="#string/app_name" android:name="MDApplication" >
<activity
android:label="#string/app_name"
android:name=".service.activity.MDSplashActivity"
android:screenOrientation="portrait">
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:screenOrientation="portrait" android:label="#string/app_name"
android:name=".service.activity.MDMainActivity" android:launchMode="singleTask">
</activity>
<activity android:name=".service.activity.MDNewsActivity" android:launchMode="singleTask"
android:screenOrientation="portrait"></activity>
<activity android:name=".service.activity.MDMagnificiActivity" android:launchMode="singleTask"
android:screenOrientation="portrait"></activity>
<activity android:name=".service.activity.MDNewsDetailsActivity"
android:screenOrientation="portrait"></activity>
<uses-library android:name="com.google.android.maps"/>
<activity android:name=".service.activity.MDMapActivity" android:launchMode="singleTask"
android:screenOrientation="portrait"></activity>
<activity android:name=".service.activity.MDInfoActivity"
android:screenOrientation="portrait"></activity>
<activity android:name=".service.activity.MDVolantinoActivity"
android:screenOrientation="portrait"></activity>
<activity android:name=".service.activity.MDMapDetailsActivity"
android:screenOrientation="portrait"></activity>
</application>
</manifest>
Someone can help me?
Thanks
UPDATE
After a month I've checked on Market and now, incredibly, my app is visible on the store. I don't now it's ok because I've made no changes from that.
I think it was a mistake of the store or, probably, a bad value in cache that now has been erased.
However, thanks to all for your support
The supports-screens tag is used ONLY by the Android market to filter out devices based on the size of screen the device has. If you don't define a supports-screens tag, then the market doesn't filter them.
However, if you DO define supports-screens any device sizes not listed will default to false.
The Samsung Galaxy SII (your device) I believe is an xlarge screen size. Change your supports-screens tag to the following:
<supports-screens android:xlargeScreens="true" android:smallScreens="false" android:largeScreens="true" android:normalScreens="true" />
(note: I added android:xlargeScreens="true")
After that you should see your app in the market again.
Similar issue here. I don't have the supports-screens tag in my AndroidManifest.xml, but I'm getting incompatibility complaints from users with the Samsung Galaxy S 2 (GT-I9100), Android version 2.3.6. It works with other versions of Android.
Anyone else seen this?

Categories

Resources