[AC-475] Ti.Barcode not working on Android 6
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Resolved |
| Resolution | Needs more info |
| Resolution Date | 2015-11-04T07:27:51.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Appcelerator Modules |
| Labels | n/a |
| Reporter | Be Rushton |
| Assignee | Shak Hossain |
| Created | 2015-10-21T01:06:46.000+0000 |
| Updated | 2015-12-02T08:53:06.000+0000 |
Description
On a device running Android 6, when the app tries to use the camera to scan the message "Sorry, the Android camera encountered a problem. You may need to restart the device." is shown and the camera cannot be used.
Hello, Can you please send us more info? We need a test case, steps to reproduce the issue and your working environment details. Thanks.
Hi, Ti.Barcode use camera , camera ask for permission from the user in Android 6.0. So you need to add permission requesting for android 6 .
Thanksif (Ti.Media.hasCameraPermissions()) { window.open(); } else { Ti.Media.requestCameraPermissions(function(e) { if (e.success === true) { window.open(); } else { alert("Access denied, error: " + e.error); } }); }