Kyou Hee Lee
Posts: 0
Joined: Tue Jul 16, 2013 10:00 am

How can I access preview frames when using camera?

How can I access preview frames when using camera? Is there a similar function to Android API's onPreviewFrame (byte[] data, Camera camera). I'd like to develop a scanner app like barcode scanner, but scanning other things. So, I need to retrieve preview frames of camera component but don't know hot to do that.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How can I access preview frames when using camera?

Hello! You would need to check if it's possible to do and if so - serach for PhoneGap plugin online as there is no standard method to do that.

Kyou Hee Lee
Posts: 0
Joined: Tue Jul 16, 2013 10:00 am

How can I access preview frames when using camera?

It seems that PhoneGap doesn't offer that kind of method. Is there an alternative way?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How can I access preview frames when using camera?

Another way is to use JS to do that, but it would need to be coded by you.

Kyou Hee Lee
Posts: 0
Joined: Tue Jul 16, 2013 10:00 am

How can I access preview frames when using camera?

Thank you for your help! Can you tell me more? Is there any sample JS code? what keyword can I search with?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How can I access preview frames when using camera?

Hello,

You would have to create a PhoneGap plug-in implements the needed functionality. You can write it using API Android in Java.

Kyou Hee Lee
Posts: 0
Joined: Tue Jul 16, 2013 10:00 am

How can I access preview frames when using camera?

I'd like to make it clear. If I make a PhoneGap plug-in using Android native API in Java, does it still work in iOS device? Also, it can be a hybrid app as well as web app? I'm new to appery but appery seems very flexible!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How can I access preview frames when using camera?

Hello!
[quote:]If I make a PhoneGap plug-in using Android native API in Java, does it still work in iOS device?[/quote] no, it won't work on iOS devices, you would need to create one more plugin for iOS

[quote:]Also, it can be a hybrid app as well as web app?[/quote] you can't use any PhoneGap plugin for web app. For web app you can use only HTML5 features.

Return to “Issues”