Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected Boolean doInBackground(Void... params) {
- while (true) {
- camera.takePicture(null, null, new PictureCallback() {
- @Override
- public void onPictureTaken(byte[] data, Camera camera) {
- try {
- file = new File(dir, "test.jpg");
- outputStream = new FileOutputStream(file);
- outputStream.write(data);
- outputStream.close();
- publishProgress();
- } catch (IOException e1) {}
- }
- });
- try {
- Thread.sleep(300000);
- } catch (InterruptedException e) {}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement