GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — AndroidTutorialForBeginners/takePicture.txt at master · doyoga52/AndroidTutorialForBeginners Expand file tree/ Copy pathtakePicture.txtMore file actions 21 lines (17 loc) · 678 Bytes / Copy pathtakePicture.txtFile metadata and controls21 lines (17 loc) · 678 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 // add permission <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> <uses-feature android:name="android.hardware.camera2" android:required="true"></uses-feature> //code void TakePicture(){ Intent intent= new Intent(); intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent,tag); } @Override protected void onActivityResult(int requestCode, int resultCode,Intent data){ if (requestCode==tag && resultCode==RESULT_OK){ Bundle b=data.getExtras(); Bitmap img=(Bitmap)b.get("data"); imageView.setImageBitmap(img); } } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |