You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Notification Service extension is bundled with Android package and
it uses kotlinx-serialization &
relies on JNA library
There are required steps to take for apps to compile & build properly on release mode, even if they do not use offline payments feature.
kotlinx-serialization
Starting with this 1.8.20 release, the Kotlin K2 compiler has a preview version of the serialization plugin. It's recommended for users to upgrade their Kotlin version to at least 1.8.20 or set up the serialization plugin on their projects explicitly with older versions.
JNA library
JNA relies on specific class and method names to load native libraries and access native code. If these names are obfuscated or removed, it can cause runtime errors and failures in native library loading.
To ensure proper functionality, a Proguard rules needs to be added to explicitly tell R8 compiler to keep certain parts of the JNA library. Here is an example of Proguard rules:
-dontwarn dalvik.system.VMStack
-dontwarn java.lang.**-dontwarn javax.naming.**-dontwarn sun.reflect.Reflection
# JNA
-keep class com.sun.jna.** { *; }-keep class * implements com.sun.jna.** { *; }
# Other
-dontoptimize
These rules ensure that the JNA library's core components are not obfuscated, allowing the library to function correctly. See Shrink, obfuscate, and optimize your app for more information on how and where to add Proguard rules on your app.
The text was updated successfully, but these errors were encountered:
erdemyerebasmaz
changed the title
Add required migration steps for Notification Service extension on Android
Add required configurations for Notification Service extension on Android/Flutter
Jun 20, 2024
erdemyerebasmaz
changed the title
Add required configurations for Notification Service extension on Android/Flutter
Add mandatory configurations for Notification Service extension on Android
Jun 20, 2024
Since Notification Service extension is bundled with Android package and
kotlinx-serialization
&There are required steps to take for apps to compile & build properly on release mode, even if they do not use offline payments feature.
kotlinx-serialization
Starting with this 1.8.20 release, the Kotlin K2 compiler has a preview version of the serialization plugin. It's recommended for users to upgrade their Kotlin version to at least 1.8.20 or set up the serialization plugin on their projects explicitly with older versions.
JNA library
JNA relies on specific class and method names to load native libraries and access native code. If these names are obfuscated or removed, it can cause runtime errors and failures in native library loading.
To ensure proper functionality, a Proguard rules needs to be added to explicitly tell R8 compiler to keep certain parts of the JNA library. Here is an example of Proguard rules:
These rules ensure that the JNA library's core components are not obfuscated, allowing the library to function correctly. See Shrink, obfuscate, and optimize your app for more information on how and where to add Proguard rules on your app.
The text was updated successfully, but these errors were encountered: