android-camera-intent

onActivityResult returning Intent data.getData(); always Null Only in Marshmallow and Lollipop

老子叫甜甜 提交于 2020-01-11 04:10:07
问题 Read My Whole Code. It is working perfectly on every Phone except Marshmallow and Lollipop . In Marshmallow and Lollipop phones Only problem is coming in data.getData() returning null only in case of Picture Captured . It is working fine if i capture Video .I have 4 cases - Choosing Picture from Gallery and show its thumbnail in Imageview - Working Fine. Capturing Picture from Camera and show its thumbnail in Imageview - NOT WORKING in Marshmallow and Lollipop . Choosing Video from Gallery

Android M Camera Intent + permission bug?

此生再无相见时 提交于 2020-01-08 13:56:13
问题 I'm trying to get my app ready for the new Android M permissions changes and found some weird behaviour. My app uses the Camera intent mechanism to allow the user to get a picture form the camera. But in another activity needs to make use of the camera itself with Camera permission (because of a library dependency card.io that requires this). However with M in the activity that only needs a camera intent when I try to launch the Camera intent I see the following crash (this does not happen if

Android M Camera Intent + permission bug?

我怕爱的太早我们不能终老 提交于 2020-01-08 13:56:03
问题 I'm trying to get my app ready for the new Android M permissions changes and found some weird behaviour. My app uses the Camera intent mechanism to allow the user to get a picture form the camera. But in another activity needs to make use of the camera itself with Camera permission (because of a library dependency card.io that requires this). However with M in the activity that only needs a camera intent when I try to launch the Camera intent I see the following crash (this does not happen if

Uri returned in camera intent is null [duplicate]

情到浓时终转凉″ 提交于 2020-01-07 03:05:39
问题 This question already has answers here : Android camera photo comes back null (2 answers) Closed 4 years ago . I am trying to create and Android application that takes a photo or uploads a photo to the server. My main objective is to get the URI of the photo which is returned in the intent. I have followed the steps from [1]. The problem is that on a phone with Lollipop, version 5.1.1 it works fine and the intent returns the URI of the photo, but on a phone which has Jelly Bean, version 4.2.1

Getting IllegalArgumentException while capturing photo from Camera

让人想犯罪 __ 提交于 2020-01-06 06:56:34
问题 In my project I am using FileProvider.getUriForFile with given provider_paths.xml file: <?xml version="1.0" encoding="utf-8"?> <paths> <external-files-path name="StrengGeheim" path="/" /> </paths> This I added in my AndroidManifest.xml inside tag: <provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android

Android - Status bar hides part of view sometimes

血红的双手。 提交于 2020-01-05 06:33:53
问题 Hi I have previously asked this question but didnt get any solution. I have following problem with Galaxy nexus running android 4.2. I am using camera intent to take photo. If I capture pic in landscape mode and return to activity(activity is in portrait mode with android:screenOrientation="portrait" in manifest) the status bar hides the view. It works well if pic is taken in portrait mode. This happens only with certain devices like Galaxy Nexus and Sony Xperia Neo . I tested it on htc

Android - Status bar hides part of view sometimes

牧云@^-^@ 提交于 2020-01-05 06:33:09
问题 Hi I have previously asked this question but didnt get any solution. I have following problem with Galaxy nexus running android 4.2. I am using camera intent to take photo. If I capture pic in landscape mode and return to activity(activity is in portrait mode with android:screenOrientation="portrait" in manifest) the status bar hides the view. It works well if pic is taken in portrait mode. This happens only with certain devices like Galaxy Nexus and Sony Xperia Neo . I tested it on htc

Android camera saves photo without ExIf

可紊 提交于 2020-01-04 19:06:56
问题 I want to take photo using MediaStore.ACTION_IMAGE_CAPTURE intent, and save with MediaStore.EXTRA_OUTPUT. My code is same as this link: http://developer.android.com/training/camera/photobasics.html However, saved photo has no exif. It has only size information. Here is my log: TAG_APERTURE: null TAG_DATETIME: null TAG_EXPOSURE_TIME: null TAG_FLASH: null TAG_FOCAL_LENGTH: null TAG_GPS_ALTITUDE: null TAG_GPS_ALTITUDE_REF: null TAG_GPS_DATESTAMP: null TAG_GPS_LATITUDE: null TAG_GPS_LATITUDE_REF:

How to capture low resolution picture using android camera

大兔子大兔子 提交于 2020-01-02 07:25:23
问题 I want to capture photo and also save it to my sdcard using android camera.I know its easy but I want to store image in low resolution without telling user go to setting and set low resolution manually. 回答1: What i am gonna write is not good practice to do code but it may full-fill your requirement capture image as you do with normally using android default camera . check the path of that image which just now captured . reduce quality of that image as per requirement using BitmapFactory

onActivityResult getting called as soon as camera intent is sent

若如初见. 提交于 2020-01-02 04:49:08
问题 I am using the camera intent to launch the camera in my app but as soon as the intent gets fired the onActivityResult gets fired and I have not even taken a picture yet. When I do take a picture, select it and return back to my activity the onActivityResult does not get called at all here is how I launch the camera PackageManager pm = getPackageManager(); if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) { Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); File tempDir = new