datalogic / react-native-datalogic-module

React Native Datalogic Module for Datalogic Android devices
5 stars 6 forks source link

Wont receive events on Release Build #3

Open akrueger90 opened 3 years ago

akrueger90 commented 3 years ago

Hello,

i got the module working perfectly in my app with debug build. But after I make a release build the scan events aren't registered. The scanner acts normal, but nothing happens in the app. Is there some manifest setting to enable broadcast events. Testing on Skorpio X5 with Android 10

codybrookshear commented 2 years ago

The behavior between debug builds and release builds should not differ. I'll check with others on the team and let them know you are having a problem with this however.

akrueger90 commented 2 years ago

Hey, in the logs I get the same errors mentioned in this android sdk issue. https://github.com/datalogic/datalogic-android-sdk/issues/3

I guess this is ignored in debug but wont work on release build.

camilossantos2809 commented 2 years ago

In my case, I needed to put these lines in the proguard-rules.pro file:

-keep class com.datalogic.cradle.** { *; }
-keep class com.datalogic.decode.** { *; }
-keep class com.datalogic.device.** { *; }
-keep class com.datalogic.extension.** { *; }
-keep class com.datalogic.softspot.** { *; }

More info in: https://datalogic.github.io/android/faq#is-the-datalogic-sdk-compatible-with-proguard-obfuscation