Hi,
I have a wearable app for Tizen based watches.
I use the Samsung Accessory SDK and it works with a companion app on Android phone.
Normally app works fine, but when I start using Proguard , SAAgent service does not work, it crash with following exception:
2021-10-12 23:17:45.298 2640-18530/? E/JavaBinder: *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
java.lang.RuntimeException: No service descriptions found in Accessory Service configuration XML
at com.samsung.android.sdk.accessory.SAServiceDescriptionParser.parseServiceDescriptions(SAServiceDescriptionParser.java:271)
at com.samsung.accessory.platform.SAFrameworkConnection.registerComponents(SAFrameworkConnection.java:297)
at com.samsung.accessory.platform.SAServiceNativeV2.registerComponent(SAServiceNativeV2.java:117)
at com.samsung.accessory.api.ISAFrameworkManagerV2$Stub.onTransact(ISAFrameworkManagerV2.java:77)
at android.os.Binder.execTransactInternal(Binder.java:1190)
at android.os.Binder.execTransact(Binder.java:1159)
I had other issues with proguard and then I found the information that I had to use following configuration on proguard:
- keepclassmembers class com.samsung.** { *;}
- keep class com.samsung.** { *; }
- dontwarn com.samsung.**
- keepattributes InnerClasses
- keepclassmembers class [Application’s SASocket or SAAgent extended class].** { *; }
- keep class [Application’s SASocket or SAAgent extended class]** { *; }
These helped me to solve the other issues, but now I have the issue with accessoryservices.xml
How can I prevent Proguard spoiling the xml file ?