To use the plugin on Android, follow these configuration steps:
1. Update AndroidManifest.xml
Add the INTERNET permission and set the android:launchMode to singleInstance for your MainActivity.
2. Add Proguard Rules
To prevent obfuscation of plugin keys, add the following rule to your proguard-rules.pro file:
3. Configure MainApplication.kt
For advanced event handling (like responding to Accept/Decline from native code), you must create a custom MainApplication.kt and register the event callback. You also need to set a manifestPlaceholder in your app-level build.gradle to point to this class.
<!-- AndroidManifest.xml -->
<manifest...>
<uses-permission android:name="android.permission.INTERNET"/>
<application ...>
<activity ...
android:name=".MainActivity"
android:launchMode="singleInstance">
...
</application>
</manifest>