I had to modify my app for Android 12. The app now runs and notifications come but only within the app itself, prior to this they would be in the notification bar. I fixed areas where it needed the android:exported="true" so it would launch on Android 12. But I'm not getting notifications in the notification bar. Could someone help me point out where I've not added the exported rule or if theres something else I need to do ?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.spliceystudios.apps.esf"
xmlns:tools="http://schemas.android.com/tools">
<queries>
<package android:name="com.google.android.apps.maps" />
</queries>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<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" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/> <!-- BroadcastReceiver permission to listen to the network -->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" /> <!-- Required OpenGL ES 2.0. for Maps V2 -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-feature
android:name="android.hardware.location"
android:required="true" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="true" />
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<application
android:name="com.spliceystudios.apps.esf.AppController"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:networkSecurityConfig="#xml/network_security_config"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:replace="android:icon,android:theme,android:supportsRtl"
>
<activity
android:name="com.spliceystudios.apps.esf.activities.ReportIssueActivity"
android:label="#string/title_activity_report_issue"
android:theme="#style/AppTheme.NoActionBar"></activity>
<uses-library
android:name="org.apache.http.legacy"
android:required="false" /> <!-- Goolge Maps API Key -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/map_api_key0" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/ad_app_id" />
<service android:name="com.spliceystudios.apps.esf.push_notification_firebase.FirebaseMessagingServiceIns"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="com.spliceystudios.apps.esf.push_notification_firebase.FirebaseInstanceIDService"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent"
/>
<receiver android:name="com.spliceystudios.apps.esf.dtmessenger.DCMBroadcastReceiver"
android:exported="true">
<intent-filter>
<action
android:name="android.net.conn.CONNECTIVITY_CHANGE"
tools:ignore="BatteryLife" />
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
</intent-filter>
</receiver>
<activity
android:name="com.spliceystudios.apps.esf.activities.IntroSliderActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.MessengerActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.ReviewsActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.OffersListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.ListUsersActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.InboxActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.wuadam.awesomewebview.AwesomeWebViewActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true"
android:theme="#style/FinestWebViewTheme.Light" />
<activity
android:name="com.spliceystudios.apps.esf.activities.MainActivity"
android:configChanges="uiMode"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.MapDirectionActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.MapStoresListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.AboutActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.ProfileActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.CategoriesActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.ListStoresActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.EventsListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.StoresListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.PeopleListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.CustomSearchActivity"
android:screenOrientation="portrait" />
<activity
android:exported="true"
android:name="com.spliceystudios.apps.esf.activities.SplashActivity"
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="com.spliceystudios.apps.esf.activities.SettingActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.SliderActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.GalleryActivity"
android:screenOrientation="portrait" />
<activity
android:exported="true"
android:name="com.spliceystudios.apps.esf.activities.OfferDetailActivity"
android:screenOrientation="portrait">
<intent-filter android:label="#string/_DP_OFFER_MESSAGE">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_OFFER"
android:scheme="nsapp" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_OFFER"
android:scheme="http" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_OFFER"
android:scheme="https" />
<!-- WITH INDEX -->
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_OFFER_INDEX"
android:scheme="nsapp" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_OFFER_INDEX"
android:scheme="http" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_OFFER_INDEX"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name="com.spliceystudios.apps.esf.activities.StoreDetailActivity"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter android:label="#string/_DP_STORE_MESSAGE">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_STORE"
android:scheme="nsapp" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_STORE"
android:scheme="http" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_STORE"
android:scheme="https" />
<!-- WITH INDEX -->
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_STORE_INDEX"
android:scheme="nsapp" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_STORE_INDEX"
android:scheme="http" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_STORE_INDEX"
android:scheme="https" />
<!-- note that the leading "/" is required for pathPrefix -->
</intent-filter>
</activity>
<activity
android:name="com.spliceystudios.apps.esf.activities.EventDetailActivity"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter android:label="#string/_DP_EVENT_MESSAGE">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_EVENT"
android:scheme="nsapp" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_EVENT"
android:scheme="http" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_EVENT"
android:scheme="https" />
<!-- note that the leading "/" is required for pathPrefix -->
<!-- WITH INDEX -->
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_EVENT_INDEX"
android:scheme="nsapp" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_EVENT_INDEX"
android:scheme="http" />
<data
android:host="#string/_DP_HOST_NAME"
android:pathPrefix="#string/DP_PATH_PREFIX_EVENT_INDEX"
android:scheme="https" />
</intent-filter>
</activity> <!-- Version 2.0 activities -->
<activity
android:name="com.spliceystudios.apps.esf.activities.V2MainActivity"
android:configChanges="uiMode"
android:label="#string/title_activity_v2_main"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name="com.spliceystudios.apps.esf.activities.CustomSearchActivity$LoginActivityV2"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.CustomSearchActivity$ResultFilterActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.customView.AdvancedWebViewActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.customView.PaymentWebViewActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.booking.views.activities.ServiceOptionsActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.booking.views.activities.BookingCheckoutActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.booking.views.activities.BookingListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.booking.views.activities.BookingDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.spliceystudios.apps.esf.activities.FindMyPlaceActivity"
android:screenOrientation="portrait" />
</application>
</manifest>
In your FirebaseMessagingServiceIns / MESSAGING_EVENT section, change the exported value to false
<service android:name="com.spliceystudios.apps.esf.push_notification_firebase.FirebaseMessagingServiceIns"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
and it'll match the guidelines on the Firebase website https://firebase.google.com/docs/cloud-messaging/android/client
Related
I have an apk on Google Play which says that it has 0 supported devices. I tried to put all the features on false, but still no effect.
This is what Google says when I upload the apk:
enter image description here
The code below is what I have in manifest file:
<?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="com.dentasoft.admin"
>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="false"/>
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="false"/>
<!-- Indicates use of Android's VR-mode, available only on Android N+. -->
<uses-feature android:name="android.software.vr.mode" android:required="false"/>
<!-- Indicates use of VR features that are available only on Daydream-ready devices. -->
<uses-feature android:name="android.hardware.vr.high_performance" android:required="false"/>
<application
android:name=".MyApplication"
android:icon="#drawable/ic_launcher_background"
android:label="#string/app_name"
android:roundIcon="#drawable/ic_launcher_background"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"
android:networkSecurityConfig="#xml/network_security_config">
<activity android:name=".tickets.TicketViewActivity"></activity>
<activity
android:name=".tickets.TicketActivity"
android:label="#string/title_activity_tickets"
android:theme="#style/AppTheme" />
<activity
android:name=".LogIn"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".MainMenu"
android:label="#string/title_activity_main_menu"
android:theme="#style/AppTheme" />
<activity
android:name=".messenger.Messenger"
android:label="#string/title_activity_messenger" />
<activity
android:name=".scanner.ActivityScanner"
android:label="#string/title_activity_scanner"
android:parentActivityName=".MainMenu" />
<activity
android:name=".scanner.ActivityScannerResult"
android:label="#string/title_activity_scanner_result">
</activity>
<!--<activity-->
<!--android:name=".scanner.status.ActivityPopUpStatus"-->
<!--android:theme="#style/AppTheme.PopupTheme"/>-->
<activity android:name=".tickets.NewTicketActivity"
android:theme="#style/AppTheme.PopupTheme"/>
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode" />
<activity
android:name=".Starter"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".history.CommandListActivity" />
<activity
android:name=".Notifications"
android:label="#string/title_activity_notifications"
/>
<activity android:name=".history.SearchPopupActivity"
android:theme="#style/AppTheme.PopupTheme"/>
<activity android:name=".scanner.stl.StlActivity"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.stl"
android:scheme="http" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.stl"
android:scheme="https" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.stl"
android:scheme="content" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.stl"
android:scheme="file" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/stl"/>
<data android:mimeType="application/x-stl"/>
<data android:mimeType="application/octet-stream" android:scheme="content"/>
</intent-filter>
</activity>
<activity
android:name=".scanner.stl.gvr.ModelGvrActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:enableVrMode="#string/gvr_vr_mode_component"
android:label="#string/app_name"
android:resizeableActivity="false"
android:screenOrientation="landscape">
<!--
The VR icon to be used in Daydream Home comes in two parts:
a foreground icon and a background icon.
-->
<meta-data
android:name="com.google.android.vr.icon"
android:resource="#drawable/vr_icon" />
<meta-data
android:name="com.google.android.vr.icon_background"
android:resource="#drawable/vr_icon_background" />
<intent-filter>
<category android:name="com.google.intent.category.CARDBOARD" />
<!--
The DAYDREAM category should only be declared by Activities that are Daydream
compatible. Daydream compatible apps should typically use the Daydream
controller APIs directly, however in this sample app we instead rely on
Cardboard trigger emulation.
-->
<category android:name="com.google.intent.category.DAYDREAM" />
</intent-filter>
</activity>
<service
android:name=".floating_heads.ChatHeadService"
android:enabled="true"
android:exported="true" />
<service
android:name=".notifications.NotificationListener"
android:label="#string/service_name"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths" />
</provider>
<uses-library
android:name="com.sec.android.app.multiwindow"
android:required="false" />
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
</application>
</manifest>
I verified the gradle file and I don't have the problem with 'commons-codec:commons-codec:1.+' compilation.
SOLVED (Answer received from Google Support)
The line
<uses-feature android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
is not supported by any device.
I have declared storage permission in the manifest and try to seek user permission for SDK 23 and above. But, I found an issue, I cannot see the added permission in the app settings. I have never come across such situation. Let me know where am I doing wrong. Here are the screen shots.
Manifest File:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kinephonics">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera2.full" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application
android:name=".ui.MyApplication"
android:allowBackup="true"
android:icon="#mipmap/app_icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/app_icon"
android:supportsRtl="true">
<activity
android:name=".ui.LoginActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.kinephonics.com"
android:scheme="http" />
</intent-filter>
</activity>
<activity
android:name=".ui.LandingPage"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".ui.SplashScreen"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.InformationActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".ui.PlayerActivity"
android:screenOrientation="landscape"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".QuizActivity"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name=".ui.AppBaseActivity"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".ui.VideoPlayList"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".ui.ActivityLog"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.LockedContentActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="com.kinephonics.braintree" />
</intent-filter>
</activity>
<activity
android:name=".ui.DictionaryActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="stateHidden" />
</application>
</manifest>
When i execute the application it runs perfect, but the problem is I can not see the icon anywhere on the emulator, i am guessing it has to be something to do with the manifest.
Manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.cade"
android:installLocation="auto"
android:versionCode="1"
android:versionName="CADE Codigos" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="true" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<application
android:icon="#drawable/iconcopia"
android:label="CADE Códigos" >
<!-- android:debuggable="false" -->
<activity
android:name=".codigos.ui.activities.MainActivity"
android:configChanges="keyboardHidden|orientation"
android:label="CADE Códigos"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"
<!-- <category android:name="android.intent.category.BROWSABLE" /> -->
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".codigos.ui.activities.AboutActivity"
android:label="#string/AboutActivity.Title"
android:theme="#android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.EditBookmarkActivity"
android:label="#string/EditBookmarkActivity.Title"
android:theme="#android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.BookmarksListActivity" />
<activity android:name=".codigos.ui.activities.HistoryListActivity" />
<activity android:name=".codigos.ui.activities.DownloadsListActivity" />
<activity android:name=".codigos.ui.activities.AdBlockerWhiteListActivity" />
<activity
android:name=".codigos.ui.activities.BookmarksHistoryActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".codigos.ui.activities.ChangelogActivity"
android:label="#string/ChangelogActivity.Title"
android:theme="#android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.preferences.PreferencesActivity" />
<activity
android:name=".codigos.ui.activities.preferences.HomepagePreferenceActivity"
android:label="#string/HomepagePreferenceActivity.Title"
android:theme="#android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.preferences.SearchUrlPreferenceActivity"
android:label="#string/SearchUrlPreferenceActivity.Title"
android:theme="#android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.preferences.UserAgentPreferenceActivity"
android:label="#string/UserAgentPreferenceActivity.Title"
android:theme="#android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.MobileViewListActivity" />
<activity android:name=".codigos.ui.activities.WeaveBookmarksListActivity" />
<activity android:name=".codigos.ui.activities.preferences.WeavePreferencesActivity" />
<activity
android:name=".codigos.ui.activities.preferences.WeaveServerPreferenceActivity"
android:label="#string/WeaveServerPreferenceActivity.Title"
android:theme="#android:style/Theme.Dialog" />
<provider
android:name=".codigos.providers.ZircoBookmarksContentProvider"
android:authorities="org.cade.codigos.providers.zircobookmarkscontentprovider" />
<provider
android:name=".codigos.providers.WeaveContentProvider"
android:authorities="org.cade.codigos.providers.weavecontentprovider" />
<receiver android:name=".codigos.utils.ProxyChangeReceiver" >
<intent-filter>
<action android:name="android.intent.action.PROXY_CHANGE" />
</intent-filter>
</receiver>
<activity
android:name=".codigos.ui.activities.RequestDataForm"
android:label="#string/title_activity_request_data_form" >
</activity>
</application>
</manifest>
Note
If you need any other piece of information from my application i will post it here as well, thank you very much in advance.
Your main activity needs to have a launcher intent added, something like this.
<activity
android:name=".MainActivity"
android:label="Title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <category android:name="android.intent.category.BROWSABLE" /> -->
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
I have kind of a wierd problem. I have setup my app to be the default launcher for opening files, in the manifest, like the code sample below.
For example if I chose to open a file from the default android download app it looks like this:
Is there a way to let it open in a new app/window such that the download app and my app looks like being two different apps?
MANIFEST FILE
<activity
android:name=".SplashActivity"
android:label="#string/app_name"
android:noHistory="true"
android:screenOrientation="sensorPortrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/pdf" />
<data android:mimeType="text/plain" />
<data android:mimeType="application/rtf" />
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/png" />
<data android:mimeType="image/tiff" />
<data android:mimeType="image/bmp" />
<data android:mimeType="image/gif" />
<data android:mimeType="application/postscript" />
<data android:mimeType="application/msword" />
<data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
<data android:mimeType="application/vnd.ms-powerpoint" />
<data android:mimeType="application/vnd.ms-excel" />
<data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
</intent-filter>
</activity>
Complete manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="princh.princh">
<uses-permission android:name="android.permission.INTERNET" />
//Allows the app to use the internet connection
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
//Allows the app to check the connection status in order to determine whether data can be downloaded.
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
//Allows the app to cache map tile data in the device's external storage area.
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
//Allows the app to use WiFi or mobile cell data (or both) to determine the device's location.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
//Allows the app to use the Global Positioning System (GPS) to determine the device's location to within a very small area.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/princh_launcher_icon"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light.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="AIzaSyD1e3EbexMClXfkyULNViJlOPgeubzZdfI" />
<service
android:name=".network.NetworkManager"
android:exported="false" >
</service>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:screenOrientation="sensorPortrait" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".PrintJobActivity"
android:label="#string/app_name"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name=".SelectPrinterOptionsActivity"
android:label="#string/title_activity_select_printer_options"
android:launchMode="singleTop"
android:parentActivityName=".PrintJobActivity"
android:screenOrientation="sensorPortrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".PrintJobActivity" />
</activity>
<activity
android:name=".PrintRangeActivity"
android:label="#string/title_activity_print_range"
android:parentActivityName=".PrintJobActivity"
android:screenOrientation="sensorPortrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".PrintJobActivity" />
</activity>
<activity
android:name=".ShowPrinterMapActivity"
android:label="#string/title_activity_select_printer_map"
android:parentActivityName=".SelectPrinterOptionsActivity"
android:screenOrientation="sensorPortrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SelectPrinterOptionsActivity" />
</activity>
<activity
android:name=".PrintPreviewActivity"
android:label="#string/title_activity_print_preview"
android:parentActivityName=".SelectPrinterOptionsActivity"
android:screenOrientation="sensorPortrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SelectPrinterOptionsActivity" />
</activity>
<activity
android:name=".OrderInfoActivity"
android:label="#string/title_activity_order_info_activitty"
android:screenOrientation="sensorPortrait">
</activity>
<activity
android:name=".PaymentActivity"
android:label="#string/title_activity_payment"
android:screenOrientation="sensorPortrait"
android:windowSoftInputMode="adjustNothing">
</activity>
<activity
android:name=".OrderDetailsActivity"
android:label="#string/title_activity_order_details"
android:screenOrientation="sensorPortrait">
</activity>
<activity android:name="sdt.brc.android.BarcodeScanActivity"
android:label="#string/app_name">
<intent-filter>
<category android:name="android.intent.category.EMBED" />
</intent-filter>
</activity>
<activity
android:name=".TermsAndConditionsActivity"
android:label="#string/title_activity_terms_and_conditions"
android:screenOrientation="sensorPortrait">
</activity>
<activity
android:name=".SplashActivity"
android:label="#string/app_name"
android:noHistory="true"
android:screenOrientation="sensorPortrait"
android:process=":PrinchProcess">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/pdf" />
<data android:mimeType="text/plain" />
<data android:mimeType="application/rtf" />
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/png" />
<data android:mimeType="image/tiff" />
<data android:mimeType="image/bmp" />
<data android:mimeType="image/gif" />
<data android:mimeType="application/postscript" />
<data android:mimeType="application/msword" />
<data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
<data android:mimeType="application/vnd.ms-powerpoint" />
<data android:mimeType="application/vnd.ms-excel" />
<data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
</intent-filter>
</activity>
<activity
android:name=".JobStatusActivity"
android:label="#string/title_activity_job_status"
android:screenOrientation="sensorPortrait">
</activity>
<activity
android:name=".ShowReceiptActivity"
android:label="#string/title_activity_show_receipt"
android:screenOrientation="sensorPortrait">
</activity>
<activity
android:name=".QRCodeReaderActivity"
android:label="#string/title_activity_qrcode_reader"
android:screenOrientation="sensorPortrait">
</activity>
<activity
android:name=".PrintjobHistoryActivity"
android:label="#string/title_activity_printjob_history"
android:screenOrientation="sensorPortrait">
</activity>
</application>
</manifest>
Add the documentLaunchMode attribute to your Manifest. The default value is none, you probably want to use intoExisting, or always.
You can also take a look at allowTaskReparenting, and taskAffinity for fined control over the tasks and the stack.
I have following code in my Manifest file.
<permission
android:name="com.qpino.mobile.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.qpino.mobile.permission.MAPS_RECEIVE" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
android:name="com.qpino.mobile.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.qpino.mobile.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Network State Permissions to detect Internet status -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-feature android:name="android.hardware.screen.portrait" /> -->
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<!-- End of copy. -->
<application
android:name="com.qpino.QpinoApplication"
android:debuggable="true"
android:hardwareAccelerated="true"
android:icon="#drawable/luncher_icon"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBRl8oReRxt-njD9vATpw2r5DeCayidVaQ" />
<activity
android:name="com.qpino.activities.Splash"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar"
android:windowSoftInputMode="stateAlwaysHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.qpino.activities.LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
<activity
android:name="com.qpino.activities.ParentActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.RegisterActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.DataSafetyActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.CardFilterListActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.BonusFilterListActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.AnferdernActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.QpinoActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.CouponActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.MyCardActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.BonusCardActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.CouponMapActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Light.NoTitleBar" />
<activity
android:name="com.qpino.activities.CouponDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.CardDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.BonusDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.StampActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.CouponListingActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.OptionActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.ProfilActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.WebViewActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.AccountActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.CouponGroupActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.CardGroupActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.BonusCardGroupActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.OptionGroupActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.CardMapActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.BonusMapActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.CouponFilterListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.BarcodeActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.RecommendBonusActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.MyBonusCardActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.FavoriteCouponListingActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.RequestCardActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.AllCardActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.AddNewCardActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.AddCustomCardActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.qpino.activities.MainTabActivity"
android:configChanges="orientation" />
<activity
android:name="com.qpino.scanner.CaptureActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!--
Allow web apps to launch Barcode Scanner by linking to
http://zxing.appspot.com/scan.
-->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="zxing.appspot.com"
android:path="/scan"
android:scheme="http" />
</intent-filter>
<!-- We also support a Google Product Search URL. -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.google.com"
android:path="/m/products/scan"
android:scheme="http" />
</intent-filter>
<!-- And the UK version. -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.google.co.uk"
android:path="/m/products/scan"
android:scheme="http" />
</intent-filter>
</activity>
<activity android:name="com.qpino.scanner.PreferencesActivity" >
</activity>
<activity android:name="com.qpino.scanner.encode.EncodeActivity" >
<intent-filter>
<action android:name="com.google.zxing.client.android.ENCODE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!-- This allows us to handle the Share button in Contacts. -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/x-vcard" />
</intent-filter>
</activity>
<!-- Receiver to receive push messages -->
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.qpino.mobile" />
</intent-filter>
</receiver>
<!-- Service to monitor push message received -->
<service android:name=".GCMIntentService" />
</application>
I am not able to get any supported device.
Can anyone tell me what could be the issue ??
It would be a great help...
Regards,
Rakesh
I got that error once. I think what I did was I reverted back to the old version and re-upload the apk. If that doesn't work, Archive your current version and upload a new version - this will mean you will have to modify you app so that it's the next version up before you can upload a new apk.