After publishing in the play store they reviewed our app they sent this message to my mail.
Following is the manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="se.thelins"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="mailto" />
</intent>
</queries>
<application
android:label="Thelins"
android:usesCleartextTraffic="true"
android:icon="#mipmap/ic_launcher">
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCFsgpO9RT68LqCGHQ1rzyaf2zrxrUMRS0"/>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<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="thelins" android:host="swish" />
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"/>
</application>
</manifest>
I can't find much about this issue over the internet, If you need any further information please ask in the comments section.
Related
When I upgrade targetSdkVersion to 12, I got AndroidManifest.xml Error
"Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined."
So I added android:exported. but same error.
Please see my AndroidManifest file and tell me where is error...
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.andrei.gototu">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="31" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="31" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<queries>
<intent>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https"/>
</intent>
</queries>
<application
android:name="com.andrei.gototu.MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:networkSecurityConfig="#xml/network_security_config"
android:theme="#style/AppTheme">
<activity
android:name="com.andrei.gototu.MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
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" />
<!-- Redirect URI: "kakao{NATIVE_APP_KEY}://oauth“ -->
<data android:host="oauth" android:scheme="kakao837edjj38e8djj3j4j4je43" />
</intent-filter>
</activity>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground" android:value="false"/>
<!-- Change the resource name to your App's accent color - or any other color you want -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color" android:resource="#android:color/white"/> <!-- or #android:color/{name} to use a standard color -->
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions"/>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher"/>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
How can I remove this error?
Try to add the android:exported="false" in All activites, services and receivers.
<activity
android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Redirect URI: "kakao{NATIVE_APP_KEY}://oauth“ -->
<data android:host="oauth" android:scheme="kakao837edjj38e8djj3j4j4je43" />
</intent-filter>
</activity>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" android:exported="false"/>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" android:exported="false"/>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
I am trying to upload the appbundle to play console but getting this issue.
You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported
I have tried adding
android:exported="false"
but it still throws me same error. Below is my Androidmanifest.xml
`
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ghc.test">
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="testApp"
android:usesCleartextTraffic="true"
android:icon="#mipmap/launcher_icon">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="default-url"
android:value="https://inspireui.com" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="inspireui.com" />
<data android:scheme="http" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="#string/default_notification_channel_id" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#drawable/logo" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="#color/notiColor" />
<!-- Google map and Admod setup -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/api_key"/>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_api"/>
<!-- Facebook Login configuration -->
<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"
android:exported="true"
/>
<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>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
`
Here is my manifest.xml
<?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.mylearning.student">
<uses-feature
android:glEsVersion="0x00020000"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <!-- Needed for Conferences (web audio capture) -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature
android:name="android.hardware.camera"
android:required="false"
tools:replace="required" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false"
tools:replace="required" />
<uses-feature
android:name="android.hardware.screen.portrait"
android:required="false" />
<uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<queries>
<package android:name="us.zoom.videomeetings" />
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.media.action.VIDEO_CAPTURE" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="*/*" />
</intent>
</queries>
<application
android:name=".util.AppManager"
android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/student_app_name"
android:largeHeap="true"
android:logo="#drawable/canvas_logo_white"
android:networkSecurityConfig="#xml/network_security_config"
android:requestLegacyExternalStorage="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/MaterialTheme_Default"
tools:overrideLibrary="com.mylearning.canvasapi"
tools:replace="android:supportsRtl,android:allowBackup,android:label">
<activity
android:name="com.mylearning.student.activity.PDFReaderActivity"
android:exported="false" />
<activity
android:name="com.mylearning.student.activity.LoginActivity"
android:clearTaskOnLaunch="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:label="#string/student_app_name"
android:launchMode="singleTop"
android:theme="#style/LoginFlowTheme.Splash_Student"
android:windowSoftInputMode="stateHidden|adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.mylearning.student.activity.LoginLandingPageActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LoginFlowTheme.NoActionBar" />
<activity
android:name="com.mylearning.student.activity.FindSchoolActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LoginFlowTheme.NoActionBar" />
<activity
android:name="com.mylearning.student.activity.SignInActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LoginFlowTheme.NoActionBar" />
<activity
android:name="com.mylearning.student.activity.NavigationActivity"
android:configChanges="orientation|screenSize"
android:exported="true"
android:label="#string/canvas"
android:launchMode="singleTask"
android:theme="#style/CanvasMaterialTheme_Default"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="com.mylearning.student.ROUTING_ACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.mylearning.student.activity.SettingsActivity"
android:exported="true"
android:theme="#style/CanvasMaterialTheme_Default" />
<activity
android:name="com.mylearning.student.activity.PandaAvatarActivity"
android:exported="true"
android:label="#string/pandaAvatar"
android:theme="#style/CanvasMaterialTheme_Default" />
<activity
android:name="com.mylearning.student.activity.InternalWebViewActivity"
android:configChanges="orientation|screenSize"
android:exported="true"
android:theme="#style/CanvasMaterialTheme_Default" />
<activity
android:name="com.mylearning.student.activity.ViewMediaActivity"
android:configChanges="orientation|screenSize"
android:exported="true"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.mylearning.student.activity.VideoViewActivity"
android:configChanges="orientation|screenSize"
android:exported="true"
android:label="#string/student_app_name"
android:theme="#style/CanvasMaterialTheme_Default" />
<activity
android:name="com.mylearning.student.activity.InterwebsToApplication"
android:configChanges="keyboardHidden|orientation"
android:excludeFromRecents="true"
android:exported="true"
android:label="#string/student_app_name"
android:launchMode="singleTop"
android:theme="#style/Theme.Transparent.NoAnimationOrBackground">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<intent-filter>
<data
android:host="*"
android:scheme="canvas-mylearning" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="sso.mylearning.com"
android:pathPattern="/mylearning/login"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".activity.ShareFileUploadActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:excludeFromRecents="true"
android:exported="true"
android:theme="#style/MaterialTheme_Default.Translucent">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
<data android:mimeType="video/*" />
<data android:mimeType="image/*" />
<data android:mimeType="application/*" />
</intent-filter>
</activity>
<service
android:name=".mobius.common.ui.SubmissionService"
android:exported="false" /> <!-- Widget Items -->
<activity
android:name=".activity.NotificationWidgetRouter"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:label=""
android:theme="#style/Theme.AppCompat" />
<activity
android:name=".activity.WidgetSetupActivity"
android:exported="true"
android:theme="#style/Theme.Transparent">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<activity
android:name=".activity.BookmarkShortcutActivity"
android:exported="true"
android:icon="#drawable/ic_bookmark_shortcut"
android:label="#string/student_app_name"
android:theme="#style/MaterialTheme_DefaultNoTransparency">
<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".activity.StudentLoginWithQRActivity"
android:exported="true" />
<activity
android:name=".activity.StudentViewStarterActivity"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<action android:name="com.mylearning.student.STUDENT_VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".features.documentscanning.DocumentScanningActivity"
android:exported="true"
android:screenOrientation="portrait" />
<service
android:name="com.pandautils.services.NotoriousUploadService"
android:exported="false" />
<service
android:name=".util.FileDownloadJobIntentService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver
android:name=".receivers.InitializeReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver> <!-- Push Notifications -->
<service
android:name=".receivers.StudentPushExternalReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service> <!-- To do widget -->
<receiver
android:name=".widget.TodoWidgetProvider"
android:exported="true"
android:label="#string/todoWidgetTitleLong">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_ENABLED" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.appwidget.action.APPWIDGET_DISABLED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/todo_widget_info" />
</receiver>
<service
android:name=".widget.TodoViewWidgetService"
android:exported="true"
android:permission="android.permission.BIND_REMOTEVIEWS" /> <!-- Grades Widget -->
<receiver
android:name=".widget.GradesWidgetProvider"
android:exported="true"
android:label="#string/gradesWidgetTitleLong">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_ENABLED" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.appwidget.action.APPWIDGET_DISABLED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/grades_widget_info" />
</receiver>
<service
android:name=".widget.GradesViewWidgetService"
android:exported="true"
android:permission="android.permission.BIND_REMOTEVIEWS" /> <!-- Notifications widget -->
<receiver
android:name=".widget.NotificationWidgetProvider"
android:exported="true"
android:label="#string/notificationWidgetTitleLong">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_ENABLED" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.appwidget.action.APPWIDGET_DISABLED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/notification_widget_info" />
</receiver>
<service
android:name=".widget.NotificationViewWidgetService"
android:exported="true"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<service
android:name=".service.StudentPageViewService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" /> <!-- End of Widget Items -->
<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>
</application>
</manifest>
1 confusion I have is 1. Is it nessecery to maintain the package name same as applicationId? As I have different package name and different applicationId.
For some reasons I am unable to refactoring the package name. Is something wrong with the manifest file or it is because of the different package name and applicationId?
What is possible solution? Thanks in advance
My app used to work just fine, its icon displayed when installed in applications and it was uploaded to the Play Store. Now when I install it, it is like invisible, and in the Play Store it just says Uninstall, not open. What would be the reason for this?
Thanks.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="redacted" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:screenOrientation="portrait"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:hardwareAccelerated="true"
>
<activity
android:name=".aboutclass"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="redacted.aboutclass" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="redacted.MainActivity" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"/>
<data android:scheme="https"/>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
</application>
</manifest>
This problem occurs when you include the <data> element in the same intent-filter as your action.MAIN, which does not expect any data.
You could try splitting the intent-filter like this:
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="redacted.MainActivity" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"/>
<data android:scheme="https"/>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
See this previous answer.
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.