Barcode reader in appStudio

Sounds great - I’ll give it a try. I tried to run the sample project for Phonegap Barcode in appStudio - didn’t work. Can you point me to any examples or samples that work? thanks

Can you be more specific about what happened when you tried the PhoneGap Barcode sample?

The barcode PhoneGap plugin works well!

All of the Cordova/Phonegap plug-ins are documented on npm or github.

https://www.npmjs.com/package/cordova-plugin-barcodescanner

Sure. Here is the sample project I am using:

It has the right code in the PhoneGap config.xml file:

To scan barcodes

When I run it in my browser on my laptop, it first says this when it loads:

Then, when I click on the button, it says:

Here is a link to it: https://send.firefox.com/download/4f19975515a910de/#GtElnu0uC–_tM_2Qq_IYA

Thanks -

Cindy

So I had forgotten to build the app using the Run > Make Native App with PhoneGap Build. In appStudio, the bottom left of the window says: add system files. What does this mean?
Is there a next step to ‘run’ it?

After you do Run > Make Native App with PhoneGap Build, you should see this:

I do not see that - no popups nor anything different visually.

Cindy

Did you just load the sample and not make any changes? Restart AppStudio and give it another try.

Did so and got the popup. The QR code opens to this on my iPhone:

I haven’t used PhoneGap before - do I need to set up an account?

Thanks

Cindy

If you’re going to build iOS and Android mobile apps then the easiest way to get started is to utilize a cloud build service. I say easiest because getting a local (laptop/desktop) environment configured is BRUTAL. Plus, if you’re on a windows system you can’t build an iOS app locally… you’re forced to use a cloud system.

Phonegap Build by Adobe is $10 a month and I don’t know if AppStudio gets discounts or anything but its worth doing either way.

The web apps are pretty cool but also very limiting. Phonegap has a lot of power but the environment can be incredibly frustrating because, as George so perfectly put it, the phonegap tool chain is very fragile.

1 Like

Download the file from the link to your desktop, then share it to the device. I usually use Drive for this.

What file and link do you mean?

In the Native Build Status screen (which appears after you upload to PhoneGap Build), there is a link to the apk file. Click on that to download it.

I am not clear on what file to download from which link - and then how to get it to the iPhone to run it. Can you provide more detail?

On the pictured screen below when I click on the link for Android (there is none for iPhone), it brings up a save file window - but the Saved is greyed out. Is this the file that should be saved? Advice?

That link is a file named as shown below. Should I remove the text after the ‘?’ ?
app-debug.3533793.3.apk?X-Amz-Algorithm=AWS4-HM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VKOrCMmGAaKAUHbZ%2FXVBsEYLJ9KUvIL%2Fe0tw2EsgQqY%2FboKjnESpKqYb6VJx5DMDZMoPn%2BN5EcXJULwHy%2FJejn%2B5POEXBiy2TaLRfAnAPaA8kLzS%2B0z2oENFNylkzSaEwTpIsdhtr7fNCZTsHj77dvXKkQdAI%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=b8a629efc4de3f4c08d18bf416086400d1ebe3923229c336fc96b9d9b890486f

Yes, I usually remove that, or simply give the file my own name. This stuff is all generated by PhoneGap and is used to retrieve the file.

OK. Then what do I do with the .apk file?

You need to get it on the device. I usually save it in a Google Drive folder, with Drive also installed on the device.

On the device, open Drive and click on the .apk.

OK - put the file on Drive, clicked on it on my iPhone. Said file type unsupported…

It’s an APK, for Android devices. It won’t work on iOS.

It’s probably time to read the Tech Notes on Distributing your App.

https://wiki.appstudio.dev/Tech_Notes

:slight_smile: all our students have iPhones … thanks anyways.