datalogic / cordova-plugin-datalogic

Cordova Plugin for Datalogic Android SDK
0 stars 7 forks source link

Not able to install my app on non DataLogic Devices #5

Closed dbowmanDT closed 5 years ago

dbowmanDT commented 5 years ago

I work for Datatrac, a potential buyer or conduit for potential buyers of Datalogic devices.

We are trying to get this plugin to work with our mobile app as one of the potential integrated scanners that our app can harness.

I have installed the plugin and everything works fine when I install on a Datalogic device. However, I cannot install on a non-Datalogic Android device. This is a must for our customers and for us to recommend this to future customers. I think the change needed is very small. Remove the required library 'com.datalogic.device' as a required library in your plugin.xml. Then make changes in your code to check for the library you need and not do anything if it does not exist. Below is the error I get when trying to install in a non-Datalogic device.

Error: adb: Command failed with exit code 1 Error output: adb: failed to install /code/platforms/android/app/build/outputs/apk/debug/app-debug.apk: Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY: Package couldn't be installed in /data/app/com.datatrac.hybrid.driver-30xpEtPze8nULF0dxWZxtg==: Package com.datatrac.hybrid.driver requires unavailable shared library com.datalogic.device; failing!]

codybrookshear commented 5 years ago

Hi, Thanks for reaching out. I think this is an issue we should try to find a solution to. Would it be okay if we simply remove the required library "com.datalogic.device" from the plugin and leave it up to your app to include it if needed at compile time?

Cody

dbowmanDT commented 5 years ago

I think removing the required library just makes it so that the phone installing the app is not required to have the library. So in theory that would solve our issue.

Apps are typically compiled once for everyone and then put on the app store. There is no conditional compiling for specific phones.

codybrookshear commented 5 years ago

Ok, I have pushed version 0.2.4 to npm. I just set the required flag to false for the library. Please let me know if this resolves your issue.

<uses-library android:name="com.datalogic.device" android:required="false"/>

Thanks, Cody

dbowmanDT commented 5 years ago

Awesome, thanks for the quick turn around. I think that was the right fix because I can install it locally on non-datalogic phones. I am working through some issues getting our app to work through Phonegap's build tool, and will respond with the results.

codybrookshear commented 5 years ago

👍

msingelwa commented 2 years ago

@codybrookshear Hi, do I have to leave the compile version as attached image green or red?

image