Camera not working after android 5.0.2 update -
i working on android app using camera (cwac) , worked ok before updating android 5.0.2, after update if take picture camera.takepicture called in cameraview:
postdelayed(new runnable() { @override public void run() { try { camera.takepicture(xact, new picturetransactioncallback(xact), new picturetransactioncallback(xact)); } catch (exception e) { android.util.log.e(getclass().getsimplename(), "exception taking picture", e); // todo out library clients } } }, xact.host.getdeviceprofile().getpicturedelay());
this picturetransactioncallback:
private class picturetransactioncallback implements camera.picturecallback { picturetransaction xact=null; picturetransactioncallback(picturetransaction xact) { this.xact=xact; } @override public void onpicturetaken(byte[] data, camera camera) { camera.setparameters(previewparams); if (data != null) { new imagecleanuptask(getcontext(), data, cameraid, xact).start(); } if (!xact.usesingleshotmode()) { startpreview(); } } }
the problem if run app on android 5.0.2 onpicturetaken picturetransactioncallback never triggered (i ran app debug) on same phone android 4.4.2 onpicturetaken triggered , simplecamerahost.saveimage called. can't find cause of problem.
Comments
Post a Comment