Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. pictureForTile.setOnClickListener(new OnClickListener() { //listen for button press
  2.  
  3. @Override
  4. public void onClick(View v)
  5. {
  6. Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
  7. startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);
  8.  
  9. protected void onActivityResult(int requestCode, int resultCode, Intent data)
  10. {
  11. if (requestCode == CAMERA_PIC_REQUEST) //defined as final 1337
  12. {
  13. Bitmap thumbnail = (Bitmap) data.getExtras().get("data");
  14. }
  15. }
  16. }
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement