Issue
Hey I am working with Flutter, My AndroidManifest.xml looks like this. Not able to get merged manifest in android studio. Can you help me in finding out where am I missing exported=" true"
, Playstore is not allowing me to update the app?
I tried to update all the dependencies in pubspec.yaml
but nothing helped. Checking each library for the manifest file is time-consuming. How can I detect which library manifest file needs to be changed?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.grow90.whatsub">
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.PACKAGE_USAGE_STATS"
tools:ignore="ProtectedPermissions" />
<application
android:label="SubSpace"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value=""/>
<activity
android:name=".MainActivity"
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">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_onesignal_default" />
<!-- -->
<!-- <meta-data-->
<!-- android:name="com.onesignal.messaging.default_notification_icon"-->
<!-- android:resource="@mipmap/ic_stat_onesignal_default" />-->
<!-- <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>
</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>
<uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>
<uses-permission android:name="android.settings.APPLICATION_DETAILS_SETTINGS"></uses-permission>
</manifest>
Solution
If you are targeting android 12 or 12+ you must specify "android:exported" property to specify whether or not components of other applications can invoke the service or interact with it — "true" if they can, and "false" if not. When the value is "false"
Default value for this attribute is set to false.
So, if you have any activity, alias, service or broadcast receiver with intent-filter registered in your android manifest file then you must specify the "android:exported" attribute to continue.
Answered By - Jay Mungara
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.