Will This App Show Up In The Play Store?
I have heard in many places that if my app uses a permission not applicable to a certain device, it will not show up in the play store for that device. Now, in my code, I am playin
Solution 1:
You have to use this way As your permission READ_PHONE_STATE request the
<uses-featureandroid:name="android.hardware.telephony" />
So you need to use this
<uses-featureandroid:name="android.hardware.telephony"android:required="false" />
So play store wont filter your apps for the tablets but make sure you have to do check manually where you are using the functionality of the telephony that device is phone or tablets and have a telephony aceess or not
To check the telephony access device has or not use this check this code
staticpublicbooleanhasTelephony()
{
TelephonyManager tm = (TelephonyManager) Hub.MainContext.getSystemService(Context.TELEPHONY_SERVICE);
if (tm == null)
returnfalse;
//devices below are phones onlyif (Utils.getSDKVersion() < 5)
returntrue;
PackageManager pm = MainContext.getPackageManager();
if (pm == null)
returnfalse;
boolean retval = false;
try
{
Class<?> [] parameters = newClass[1];
parameters[0] = String.class;
Method method = pm.getClass().getMethod("hasSystemFeature", parameters);
Object [] parm = newObject[1];
parm[0] = "android.hardware.telephony";
Object retValue = method.invoke(pm, parm);
if (retValue instanceofBoolean)
retval = ((Boolean) retValue).booleanValue();
else
retval = false;
}
catch (Exception e)
{
retval = false;
}
return retval;
}
For more you can check this blog http://commonsware.com/blog/2011/02/25/xoom-permissions-android-market.html
Post a Comment for "Will This App Show Up In The Play Store?"