0

I have developed a HTML5 webapp for Smartphones, initial roll out being blackberry. Part of its function is too take a photo, then return to a form for more info.

On OS7 (Curve type phone) the app functions perfectly. Take a photo, goes back to form, and displays a little thumbnail of the taken photo using base64. App already packaged and deployed using Bes / Bas

On OS6 (Bold 9700) the camera in the app does not auto shutdown after taking a photo, I have to click the back arrow, which take me back to the form, and the photo is still taken as expected.

I have ready in the quirks of Blackberry on Phonegap

"Application must have key injection permissions to close native Camera application after photo is taken."

I am assuming as this is working on OS7, I already have this. Is there a programmable way / workaround I can make sure the camera closes down after capturing a photo on the older OS or any expert tips to something I may have missed?

Thank you in advance for any replies

MOLEDesign
  • 488
  • 8
  • 20
  • Which version of Phonegap are you using? – Littm Oct 02 '12 at 11:03
  • Cordova 2.0.0 Does 2.1.0 solve this little issue? – MOLEDesign Oct 02 '12 at 13:06
  • I just recompiled using cordova2.1.0.js instead.. takes photo, but still wont close the camera after the picture is taken, I have to click the back arrow. – MOLEDesign Oct 02 '12 at 13:25
  • 1
    @MorganUK yesterday I received a similar error report. The problem is that there's no API to close the camera app and it has to be done with key injection hacks. If Phonegap provides such a feature then it relies on hacks for sure, since it is the only known way. If some OSes/devices prevent the hack from working, there's little to be done. Read here: http://stackoverflow.com/q/10203531/813951 – Mister Smith Oct 03 '12 at 12:14
  • BTW, if you need to use the key injection to close the camera, make sure you have the permissions granted. – Mister Smith Oct 03 '12 at 12:14
  • Permissions are granted, On OS7 onwards it works OK, ironically it also works on OS5, its literally just OS6 where the camera wont shutdown automatically. I will read the article, thanks – MOLEDesign Oct 03 '12 at 13:38

2 Answers2

0

Looks like this issue may be specific to OS6 when compiled with Phonegap, will try compilation on sources other than phonegap and see if it makes a difference.

MOLEDesign
  • 488
  • 8
  • 20
  • Turns out platform OS6 bundle 2391 (6.0.0.534) Platform 6.6.0.200 ,Bold 9700 has an issue shuttong the camera down. After experimenting, its the only build that has an issue. – MOLEDesign Oct 04 '12 at 12:03
  • after a rebuild, and upgrade to version that is identical to working 9700's turns out it may be the model 9780 – MOLEDesign Oct 04 '12 at 13:15
0

I have solved my same issue for os 6. After scanning of QR code, close all player and scanner connection.

You can use-

if (_scanner != null && _scanner.getPlayer() != null) {
    _scanner.getPlayer().close();
}

This will definitely help you.

AnkitRox
  • 534
  • 1
  • 6
  • 16