Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. protected Boolean doInBackground(Void... params) {
  2. while (true) {
  3. camera.takePicture(null, null, new PictureCallback() {
  4. @Override
  5. public void onPictureTaken(byte[] data, Camera camera) {
  6. try {
  7. file = new File(dir, "test.jpg");
  8. outputStream = new FileOutputStream(file);
  9. outputStream.write(data);
  10. outputStream.close();
  11. publishProgress();
  12. } catch (IOException e1) {}
  13. }
  14. });
  15.  
  16. try {
  17. Thread.sleep(300000);
  18. } catch (InterruptedException e) {}
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement