I am trying to modify image loaded from system gallery and save new version of that image on SD card.
Problem is that saved image is placed at the end of gallery (tested on branded Galaxy Ace 2 and CyanogenMod 7 on Galaxy Ace).
Any idea what is responsible for position of newly saved image?
I've tried even get code from CyanogenMod, but it didn't work.
Related
I need to capture image via my android app, immediately after which I delete image from camera gallery, and store it in my app directory.
This works fine in all android devices with variety of Android vesions (from 4.1.2 to 5.1)
But fails on Motorola 2nd gen phone.
My phone (Moto G) has 2 options to store captured images:
Phone and sdcard.
But images are not getting deleted from the path.
The path is also correct!
Please help.
Do you use the correct permission in your AndroidManifest.xml ?
Maybe images are stored in sdcard ?
Something like <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
I tried this. Perfect work on almost devices.
But doesn't work at Samsung Galaxy 3.
On normal device i have something like content://media/external/images/media/1 in intent.getData() and after using getContentResolver() i have /mnt/sdcard/Android/data/package/.../file.jpg
But on Samsung Galaxy 3 in intent.getData() i have content://com.sec.android.gallery3d.provider/picasa/item/5624862738518543714 and https://lh5.googleusercontent.com/-22xcQIWrlT4/Tg-G29-6jWI/AAAAAAAAAJA/i_FUO3pN1Sc/I/%2525D0%252597%2525D0%2525B0_%2525D0%2525B5%2525D0%2525B4%2525D1%252583.jpg after using Resolver.
What should i do to get normal path on Samsung Galaxy 3?
UPD: i see, in gallery there is available to pick pictures from my Google+ shared pictures. Hm...
So, i think, i will show message for users in this case to pick only local files.
Okay so here's a problem I have.
setRotation() should rotate a captured JPEG image. It works fine on most phones, but somehow doesn't work on Samsung Galaxy S3 and S4.
Here's a question with a proposed soluton:
setRotation(90) to take picture in portrait mode does not work on samsung devices
It involves manipulating the EXIF data, however, the ExifInterface() being used, requires the image to be saved to the phone, and then it uses the absolute file path.
However, I don't want to save the image to the phone, that's one of my main criteria. Any idea, on how to go about this issue?
I'm writing a (230 kb) jpeg file to the location returned by
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath()
Which on my 8.9 Kindle Fire HD is /mnt/sdcard/Pictures and I can see browsing the filesystem via eclipse that the image is saved pretty much instantly and all appears to be well. However when I open the Photos app, there is no sign of the image and it takes a variable amount of time (up to several minutes) for it to appear.
My assumption is that the Photos app checks for new pictures on a timer, is that the case? Is there any way I can notify it of a new image?
I've tried saving to other locations but that doesn't seem to have any impact.
I'm targeting 2nd gen and HD Kindle Fire devices only.
I had a similar problem on a regular Android tablet (so not sure if the Gallery on the Samsung is the same as Photos on the Kindle) but this forced a refresh without waiting or plugging in USB
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse(
"file://"+Environment.getExternalStorageDirectory())));
I will try and confirm that it works on the Kindle Fire HD over the weekend
I need to test a function that needs to picks some images from the gallery of Android JellyBean Emulator.
So I have downloaded from internet using the own browser of the emulator (that is slow as the hell) some images.
The images appears in the downloaded files but not in the Gallery of Emulator.
In the GingerBread emulator when I download an images from the browser these appear automatically in the gallery.
How could I force the emulator to find the images?
In the old emulator the media scanner was enabled, due to large amount of resource needed the new version has the media scanner disabled by default.
If you want to see the images in the gallery,
in the main menu of Jelly Bean Emulator go in:
DevTools->Media Provider and click "Scan SD Card".
In this way you should see the images in the gallery
If doesn't, probably the images saved aren't properly located in SD card,
-use DDMS(you can find it in the Android\android-sdk\tools folder
-Click on device menu and select File Explorer
-Go to mnt\sdcard
-Click the button "Push file into device" to upload images
If I correct, you want some pictures in emulator's gallery. I think you can upload a picture file in DDMS file browser, or using 'adb push' command.