Reputation: 9574
Play Console shows "Supported Devices 0".
Questions
I need the camera functionality, without camera I am ok if it does not show up on play store of that device.
Relevant portions of my Manifest file is as below.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="<mypackagename>">
<!-- Without this Google Play Store will not support any device -->
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<!-- For Options menu call support -->
<uses-permission android:name="android.permission.CALL_PHONE"/>
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- For the background service to run forever -->
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<!-- For Current Location on Driver App -->
<permission
android:name="${manifestApplicationId}.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="${manifestApplicationId}.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- For QR Code -->
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera2"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<!-- Google Cloud Messaging -->
<uses-permission
android:name="${manifestApplicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<!-- This must be set to true, since Google Maps V2.0 needs this -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:name="<mypackagename>.InitializingApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${mapsKey}"/>
<activity
android:name="<mypackagename>.SplashScreen"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="<AppliationName>"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar.Translucent"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name="<mypackagename>.DeviceProvision"
android:label="@string/title_activity_device_provision"
android:screenOrientation="portrait"/>
<activity
android:name="<mypackagename>.PassengerHome"
android:label="@string/title_activity_passenger_home"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"/>
</application>
</manifest>
Edit :
Using <uses-feature android:name="android.hardware.camera2"/>
gives me 0 supported devices.
Using <uses-feature android:name="android.hardware.camera2" required=false/>
gave me full 8900 devices.
What nonsense ? I should be able to only select devices that have a camera. What kinda silly setting is this ?
Also I did not have to wait for publishing to complete, just uploading took the number of supported devices up to 8900.
Upvotes: 0
Views: 1988
Reputation: 542
You get 0 supported devices because you require a non-existing feature. There is no such feature called android.hardware.camera2
.
android.hardware.camera2 is the package that provides the Camera interface. So, thats the package not the features' label.
If your app requires camera, then choose from these features:
<uses-feature android:name="android.hardware.camera"/>
- if back camera required<uses-feature android:name="android.hardware.camera.front"/>
- if front ...<uses-feature android:name="android.hardware.camera.any"/>
- any cam will doSrc: https://developer.android.com/guide/topics/manifest/uses-feature-element.html
Also I did not have to wait for publishing to complete, just uploading took the number of supported devices up to 8900.
Yes, once uploaded play store can access your apk file. So it can run
aapt dump badging <path-to-apk>
and get your requested device feature list. You can try it yourself. Run it from commandline.
Upvotes: 5