I'm trying to write a phonegap plugin to take a picture when viewing an AR world since that feature is still not supported. The plugin is being launched from an onClickInARchitectWorld function. However, it doens't look like the Wikitude plugin releases the camera when it is sent to the background, and neither my plugin or the native camera application are able to access the camera. Is there a work-around to this?
onPause() is being called, but the camera is still inaccesible. Do you know why this might be?
A
Andreas Fötschl
said
almost 10 years ago
Hmm... Almost no more ideas from my end. Could you please check if the sample projects work properly, default camera-app is working and if issue also occurs on other device.
Regards, Andreas
R
Richard
said
almost 10 years ago
I'm not sure that the example programs will be helpful to me. I'm only noticing the problem when using a phonegap plugin that attempts to access the camera. If I manually launch the camera app by first clicking the home button and then the camera there are no problems.
A
Andreas Fötschl
said
over 9 years ago
Hi again! Could you please check if issue still occurs on latest SDK 3.1 and PhoneGap 3.0 ready WikitudePlugin? We're working on more samples for PhoneGap Plugin currently and will ensure to test your scenario then in more detail.
Kind regards, Andreas
R
Richard
said
over 9 years ago
Hi Andreas,
Unfortunately upgrading Wikitude, Phonegap, and the WikitudePlugin did not help my situation.
I've found that I need to call the close() method of the plugin in order to make the camera accessible to my plugin. I would rather call hide(), but it does not seem to release the camera. My goal is to take a picture as quickly as posisble with the user leaving the AR view in a minimal ammoutnt of time. My plugin takes a picture very fast with no visible preview, but the problem is giving camera access to the plugin and back to Wikitude quickly.
Do you have any suggestions on other ways to go about this? Is there any update on when screenshots will be implemented in Wikitude (and whether you'll have the option to show/hide the AR objects while taking one)?
A
Andreas Fötschl
said
over 9 years ago
Hi Richard,
Fortunately a PhoneGap plugin update will be published very soon. It will come with an updated SDK and will even include a snapshot functionality and available very soon on github - within next 2 weeks.
Richard