Android Question Error adding Manifest code

Multiverse app

Active Member
Licensed User
Longtime User
I need to import the following code into the Manifest Editor but I can't find a way through adding the code into the Manifest.

Seems pretty straightforward (The docs)-
B4X:
<!--Statistic Start-->
<provider android:name="com.elephant.data.ElephantDataProvider"
android:authorities="${applicationId}.elephantprovider"
android:exported="true" android:multiprocess="false" />
<receiver android:name="com.elephant.data.ElephantBroadcastReceiver"
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<!--Statistic END-->

What I added-
B4X:
AddApplicationText(
<provider android:name="com.elephant.data.ElephantDataProvider"
android:authorities="${applicationId}.elephantprovider"
android:exported="true" android:multiprocess="false" />
<receiver android:name="com.elephant.data.ElephantBroadcastReceiver"
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
)


I get "AndroidManifest.xml:67: error: Error parsing XML: not well-formed (invalid token)" error.

I've also tried to replace "${applicationId}" with my app package id, and "$PACKAGE$" but still get the same error.


Any help would be greatly Appreciated,
Thank you!
 

Multiverse app

Active Member
Licensed User
Longtime User
The following does not throw an error. Not sure if it works perfectly though.

B4X:
AddApplicationText(
    <provider android:name="com.elephant.data.ElephantDataProvider"
    android:authorities="${applicationId}.elephantprovider"
    android:exported="true"
    android:multiprocess="false" />


    <receiver android:name="com.elephant.data.ElephantBroadcastReceiver" />
    <intent-filter>
        <action android:name="android.intent.action.PACKAGE_ADDED" />
        <action android:name="android.intent.action.PACKAGE_REMOVED" />
        <data android:scheme="package" />
    </intent-filter>
)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top