My tablet is unsupported for a react-native android app - android

I am using a react-native android app. And my device is not supported because it does not have the required feature: android.hardware.telephony.
Yes, I do not have telephony in my tablet. But, I am not adding this required feature in my manifest. So, where exactly is react-native adding this required feature in the build? And how can I turn it off.
My manifest file is below.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kalhatti.main"
android:versionCode="5"
android:versionName="1.5">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
Thanks.

To allow the app to be installed in tablets, add the following to AndroidManifest:
<uses-feature android:name="android.hardware.telephony" android:required="false" />
Thanks to #GabeSechan for answering in comments.

Related

SecurityException NFC permission required

I have been doing some NFC development on android, and I have hit a brick wall. I launch the app and it immediatly fails with a "Unfortunately,..... has stopped working".
Some quick googling showed I need the put the permission in the manifest. I did that, but lo and behold, I still get the same error!
Here is the start of my manifest:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<uses-permission android:name="android.permission.NFC" />
<uses-sdk android:minSdkVersion="10"/>
<uses-feature android:name="android.hardware.nfc" android:required="true" />
<activity
android:name=".MainActivity"
<!-- rest of the file --->
And the output in logcat:
java.lang.RuntimeException: Unable to resume activity {za.co.fnb.ms.nfcreader/za.co.fnb.ms.nfcreader.MainActivity}: java.lang.SecurityException: NFC permission required: Neither user 10253 nor current process has android.permission.NFC.
What am I doing wrong here?
The section
<uses-permission android:name="android.permission.NFC" />
<uses-sdk android:minSdkVersion="10"/>
<uses-feature android:name="android.hardware.nfc" android:required="true" />
Needs to be outside of your application tag.
Like
<uses-permission android:name="android.permission.NFC" />
<uses-sdk android:minSdkVersion="10"/>
<uses-feature android:name="android.hardware.nfc" android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
...
Read Structure of the Manifest File
<uses-permission>, <uses-sdk>, and <uses-feature> go outside the <application> element:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.commonsware.android.jimmyb"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.NFC"/>
<uses-feature
android:name="android.hardware.nfc"
android:required="true"/>
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="15"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter android:label="#string/app_name">
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<data android:mimeType="vnd.secret/agent.man"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
(from this sample project)
Add these to activities which you use nfc:
<activity
android:name="com.example.example.CLASSNAME"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.nfc.action.TAG_DISCOVERED"/>
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<data android:mimeType="mime/type" />
</intent-filter>
<meta-data android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="#xml/nfc_type"/>
</activity>
And also you have to define permissions before application tag.

Android app is not compatible on any devices after publishing

I have just published my app on google play and found out that none of my testing devices are compatible. Even in the developer consol there is the compatible devices section and under that it says there are 7041 devices and 0 are compatible with my app.
Here is my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="*********************"
android:versionCode="2"
android:versionName="1.1" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18" />
<uses-feature android:glEsVersion="2" android:required="true" android:name="GLES2.0"/>
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="#string/app_id" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.*************************"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:launchMode = "singleInstance"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="#string/app_name"
android:name="com.*************************"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize">
<!-- android:launchMode = "singleInstance">-->
</activity>
<activity
android:label="#string/app_name"
android:name="com.******************************"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize">
</activity>
</application>
Any ideas why this would be having this effect?
here are the permissions my app requires
full network access
view network connections
i am using google play services
Because in manifest you have mentioned
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18" />
which support from 14 to 18. Increase your targetsdk version to 21. min sdk version to 11
( android 3.0 to 4.4)
<uses-sdk
android:minSdkVersion="11" // you can target from android 3.0 as your wish
android:targetSdkVersion="21" />
I managed to get this working after speaking with google support
this line
<uses-feature android:glEsVersion="2" android:required="true" android:name="GLES2.0"/>
should have been
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
i got the fist method from a tutorial but i cant for the life of me remember which one, so just becareful what resources you use because they are not always correct
Use:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="21" />

App dont show in market for tablets

I've done an app and I've tried it on my tablet via USB.
But when I uploaded it to market it didnt show for my pad... :S
I guess the problem is in my manifest...
Here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.thorne.godnattsmamonster"
android:versionCode="2"
android:versionName="1.1" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<uses-permission
android:name="android.permission.CAMERA"
android:maxSdkVersion="19" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="19" />
<uses-permission
android:name="android.permission.VIBRATE"
android:maxSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.thorne.godnattsmamonster.MainActivity"
android:label="#string/app_name"
android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.thorne.godnattsmamonster.BookInterface"
android:label="#string/title_activity_book_interface"
android:screenOrientation="sensorLandscape" >
</activity>
<activity
android:name="com.thorne.godnattsmamonster.SettingsActivity"
android:label="#string/settings"
android:screenOrientation="sensorLandscape" >
</activity>
<activity
android:name="com.thorne.godnattsmamonster.Peekaboo"
android:label="#string/title_activity_peekaboo"
android:parentActivityName="com.thorne.godnattsmamonster.MainActivity"
android:screenOrientation="sensorLandscape">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.thorne.godnattsmamonster.MainActivity" />
</activity>
</application>
</manifest>
What do I need to add?
BR
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
That's your problem there. Some/most tablets don't have external storage. Either use internal storage (in which case you don't need a permission), or try adding android:required="false" to your WRITE_EXTERAL_STORAGE permission. Either way though, you are going to have to go into your code where you are writing to external storage and change it to internal, or handle the case where a tablet doesn't have external storage.

Uploading app - Error getting android:icon atribute

I'm having this problem when I try to upload my app to Google Play:
Failed to run aapt dump badging:
W/ResourceType(32467): No known package when getting value for resource number 0x01080051
ERROR getting 'android:icon' attribute: attribute is not a string value
I have been searching and I know this issue can be caused by the strings file. I found this page but I can't follow the second part because in the first step, I don't get the "type" and the "entry"...
I don't know what should I do... Thanks for help!!
My manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo">
<activity
android:name="com.extremeye.MainActivity"
android:label="#string/app_name"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.extremeye.VisualizadorActivity"
android:label="#string/title_visualizador"
android:screenOrientation="landscape"
android:icon="#drawable/void_icon"
android:configChanges="orientation|keyboardHidden|screenSize">
</activity>
<activity
android:name="com.extremeye.SeleccionActivity"
android:icon="#android:drawable/ic_menu_set_as"
android:label="#string/title_seleccion"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden|screenSize" >
</activity>
<activity
android:name="com.extremeye.InfoActivity"
android:label="#string/title_info"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden|screenSize" >
</activity>
</application>
Turns out that the app icon in my manifest: android:icon="#drawable/app_icon" had corresponding files under /res/drawable-small, /res/drawable-normal, /res/drawable-large and /res/drawable-xlarge but not under /res/drawable. Looks like the automated process of Google Play only looks up /res/drawable. Copying the app icon into this directory.

What does Google Play Store developers console mean?

I want to publish my new app in Play Store but see this message in app panel:
This application is only available to devices with these features,
as defined in your application manifest.
Screen layouts: SMALL NORMAL LARGE XLARGE
Required device features
android.hardware.location
android.hardware.location.gps
android.hardware.location.network
android.hardware.screen.portrait
android.hardware.sensor.accelerometer
android.hardware.touchscreen
This application is available to over 0 devices.
Why it said that my app available to over 0 devices? I have tested on my phone and it works. At least one device :)
My Manifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="..."
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.sensor.accelerometer" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<activity
android:name="MainActivity"
android:configChanges="orientation"
android:label="#string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="ListActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name="SettingsActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name="HelpActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name="AboutActivity"
android:screenOrientation="portrait">
</activity>
</application>
</manifest>
This shows up using IE. Go and look in Firefox, and you will have a large # of devices.

Categories

Resources