We tried to get this plugin working on the P10 platform with native apps in both IOS and Android, but this function always returns false.
What is needed to get this plug-in working?
I don't have enough information to help you troubleshoot. Off the top of my head I would guess your native build isn't including the plugin code, and therefore the call always fails. Some blind troubleshooting steps you could take are to republish the plugin application, remove the reference to the plugin in your own application and then add it again and then republish your application.
I would also suggest you take a look at the Field Services sample app we published on the Forge, for the new runtime. This application uses the barcode plugin and you can use it as a code reference and as a litmus test to check the health of the plugin.
Let us know what you find, or any additional info.
I've tried all things you suggested.
But unfortunately nothing worked. We got the "Barcode plugin not available" in the Field Services app.
We have created an app that scans QR codes (currently we have something working with the camera app and the ZXing QR code decoder), but we would like to scan and decode in one action to speed up the scanning process. The app should run native (without Outsystems Now) in both iOS and Android.
Could you point out where to look further?
It indeed looks like something is stopping the plugins from being included in the Native Build. Could I ask you to do one more attempt at solving this?
Please try to:
This will ensure that the platform generates necessary meta-data for the build to include the plugin (it should be fixed for the final version), so when you request the build it will include the plugin in the request.
Please let me know if things were solved through this method.
After changing the plugin's code nothing changed, but then I changed to git plugin json code to use a fork of the tjwoon zbar cordova plugin and deleting and adding the app to my phone, it worked.
Then I changed to plugin code back to the one from tjwoon and again deleted and added the app on my phone and the plugin was still working.
Your suggestion with changing the plugin code did the trick, because I already had uninstalled and installed the app several times on my phone without the result I was hoping for.
I marked your reply as the solution, but it does need the extra comment related to deleting and adding the app to the iphone.
Will do, Remco! Indeed, I mentioned generating the build but was not clear that the device's app needed replacing, or else the same thing would happen.
Glad you solved it and thank you for sharing your solution. Be sure to let us know if you need a hand with anything else!
Btw, for anyone who is still having the same problem, the fix for Beta 2 installations is installing the newest version from the Forge, for the following plugins:
If you have a native app that isn't including any of these plugins, try to install their latest version and generate a new one.