-- Android

Android Play Console Upload AAB “android:exported” solution and Update SDK API 31

Step 1;

Change “targetSdkVersion”: 30 to “targetSdkVersion”: 31 in build.gradle file.

Step2:

Add all scopes in AndroidManifest.xml file => android:exported=”true” attribute.

Step3:

For onesignal add below line codes in AndroidManifest.xml file.

<activity android:name="com.onesignal.NotificationOpenedActivityHMS"
         android:noHistory="true"
         android:theme="@android:style/Theme.Translucent.NoTitleBar"
         android:exported="true">
         <intent-filter android:exported="true">
             <action android:name="android.intent.action.VIEW" />
         </intent-filter>
     </activity>

     <receiver android:name="com.onesignal.GcmBroadcastReceiver"
         android:exported="true"/>
     <receiver android:name="com.onesignal.BootUpReceiver"
         android:exported="true">
         <intent-filter android:exported="true">
             <action android:name="android.intent.action.BOOT_COMPLETED" android:exported="true"/>
             <action android:name="android.intent.action.QUICKBOOT_POWERON" android:exported="true"/>

         </intent-filter>
     </receiver>
     <receiver android:name="com.onesignal.UpgradeReceiver" android:exported="true">
         <intent-filter android:exported="true">
             <action android:name="android.intent.action.PACKAGE_REPLACED" android:exported="true"/>
         </intent-filter>
     </receiver>

Check Merged Manifest. There should be no error.

See you!

Yorumla

Yorum