Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- System.gc();
- String fileName = System.currentTimeMillis()+".jpg";
- String mPathImage = Environment.getExternalStorageDirectory()+ "/" + fileName;
- File file = new File(mPathImage);
- Uri outputFileUri = Uri.fromFile( file );
- Intent mIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
- mIntent.putExtra( MediaStore.EXTRA_OUTPUT, outputFileUri );
- startActivityForResult(mIntent, 1);
- mValue=1;
- try {
- System.gc();
- Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
- startActivityForResult(intent, 1);
- mValue=2;
- }catch(Exception e){}
- try{
- System.gc();
- Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
- intent.setType("*/*");
- startActivityForResult(intent,1);
- mValue=3;
- }catch(Exception e){}
- }
Add Comment
Please, Sign In to add comment