I created a program whose main function is to use the API to capture and save in the path that I gave.
But on different phones, nothing happens compared to what I tested on an emulator or a phone with the original Google ROM.
In theory. If I gave the path to the intention, the photo should not be displayed in the default gallery for the phone, but in MOTO Defy the photos were saved both in my path and in the default image directory. And on Samsung, my application unexpectedly crashes when returning from the Intent camera. And only on some phones can I call the menu by pressing the menu button in the camera action. And even some of them save the photo as the size that I set in the camera’s activity settings menu.
I think this is due to the fact that manufacturers have configured ROMs on their phones, so the camera operates in different ways.
Does anyone know how to avoid this situation? Or is there any other way to take photos not intentionally "android.media.action.IMAGE_CAPTURE"?
Below is the code as I take photos.
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(getpath()+"_.jpg")));
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
startActivityForResult(intent, 0);
source
share