J Juzer Hussain Active Member Licensed User Longtime User Mar 28, 2025 #1 Hi, While uploading my app bundle gogle gives warning the app will not install on android 12+ if android:exported="true" is not added for all intent filters.for this i am trying to add following in manifest Code: Copy AddManifestText( "<receiver android:name="".resumeservice$resumeservice_BR"" android:exported=""true"">" & CRLF & _ " <intent-filter>" & CRLF & _ " <action android:name=""android.intent.action.BOOT_COMPLETED""/>" & CRLF & _ " </intent-filter>" & CRLF & _ "</receiver>" ) AddManifestText( "<activity android:name="".main"" android:label=""MyMessenger"" " & CRLF & _ " android:screenOrientation=""unspecified"" " & CRLF & _ " android:launchMode=""singleTop"" " & CRLF & _ " android:windowSoftInputMode=""stateHidden"" " & CRLF & _ " android:exported=""true"">" & CRLF & _ " <intent-filter>" & CRLF & _ " <action android:name=""android.intent.action.MAIN""/>" & CRLF & _ " <category android:name=""android.intent.category.LAUNCHER""/>" & CRLF & _ " </intent-filter>" & CRLF & _ "</activity>" ) AddManifestText("<uses-permission android:name=""android.permission.RECEIVE_BOOT_COMPLETED""/>") but on compiling i get error not well formed invalid token. Can anyone help please. Thanks Juzer
Hi, While uploading my app bundle gogle gives warning the app will not install on android 12+ if android:exported="true" is not added for all intent filters.for this i am trying to add following in manifest Code: Copy AddManifestText( "<receiver android:name="".resumeservice$resumeservice_BR"" android:exported=""true"">" & CRLF & _ " <intent-filter>" & CRLF & _ " <action android:name=""android.intent.action.BOOT_COMPLETED""/>" & CRLF & _ " </intent-filter>" & CRLF & _ "</receiver>" ) AddManifestText( "<activity android:name="".main"" android:label=""MyMessenger"" " & CRLF & _ " android:screenOrientation=""unspecified"" " & CRLF & _ " android:launchMode=""singleTop"" " & CRLF & _ " android:windowSoftInputMode=""stateHidden"" " & CRLF & _ " android:exported=""true"">" & CRLF & _ " <intent-filter>" & CRLF & _ " <action android:name=""android.intent.action.MAIN""/>" & CRLF & _ " <category android:name=""android.intent.category.LAUNCHER""/>" & CRLF & _ " </intent-filter>" & CRLF & _ "</activity>" ) AddManifestText("<uses-permission android:name=""android.permission.RECEIVE_BOOT_COMPLETED""/>") but on compiling i get error not well formed invalid token. Can anyone help please. Thanks Juzer
Erel B4X founder Staff member Licensed User Longtime User Mar 30, 2025 #2 The correct syntax is: Code: Copy AddManifestText(anything you like to add. It can span multiple lines ... .. ) No CRLF and no &. Upvote 0
The correct syntax is: Code: Copy AddManifestText(anything you like to add. It can span multiple lines ... .. ) No CRLF and no &.
J Juzer Hussain Active Member Licensed User Longtime User Mar 31, 2025 #3 Erel said: The correct syntax is: Code: Copy AddManifestText(anything you like to add. It can span multiple lines ... .. ) No CRLF and no &. Click to expand... Thanks for the reply Erel, I added these lines and it worked.. Code: Copy SetActivityAttribute(main, android:exported, "true") SetReceiverAttribute(resumeservice, android:exported, "true") SetReceiverAttribute(starter, android:exported, "true") It is to be noted that the android name in xml file shows resumeservice$resumeservice_BR and like wise for starter_BR. This way android:exported="true" is added to the already defined intent. Juzer Upvote 0
Erel said: The correct syntax is: Code: Copy AddManifestText(anything you like to add. It can span multiple lines ... .. ) No CRLF and no &. Click to expand... Thanks for the reply Erel, I added these lines and it worked.. Code: Copy SetActivityAttribute(main, android:exported, "true") SetReceiverAttribute(resumeservice, android:exported, "true") SetReceiverAttribute(starter, android:exported, "true") It is to be noted that the android name in xml file shows resumeservice$resumeservice_BR and like wise for starter_BR. This way android:exported="true" is added to the already defined intent. Juzer