Tutorial by Examples

To take a photo, first we need to declare required permissions in AndroidManifest.xml. We need two permissions: Camera - to open camera app. If attribute required is set to true you will not be able to install this app if you don't have hardware camera. WRITE_EXTERNAL_STORAGE - This permission i...
Add a permission to access the camera to the AndroidManifest file: <uses-permission android:name="android.permission.CAMERA"></uses-permission> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> Xml file : <?xml version=&quot...
First of all you need Uri and temp Folders and request codes : public final int REQUEST_SELECT_PICTURE = 0x01; public final int REQUEST_CODE_TAKE_PICTURE = 0x2; public static String TEMP_PHOTO_FILE_NAME ="photo_"; Uri mImageCaptureUri; File mFileTemp; Then init mFileTemp : public ...
Set High resolution programmatically. Camera mCamera = Camera.open(); Camera.Parameters params = mCamera.getParameters(); // Check what resolutions are supported by your camera List<Size> sizes = params.getSupportedPictureSizes(); // Iterate through all available resolutions and choos...
private static final String TAG = "IntentBitmapFetch"; private static final String COLON_SEPARATOR = ":"; private static final String IMAGE = "image"; @Nullable public Bitmap getBitmap(@NonNull Uri bitmapUri, int maxDimen) { InputStream is = context.getConten...

Page 1 of 1