android-photos

photo share intent in android

◇◆丶佛笑我妖孽 提交于 2019-12-29 01:51:06
问题 Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("image/*"); Uri uri = Uri.parse(pathToImage); shareIntent.putExtra(Intent.EXTRA_STREAM, uri); return shareIntent; i was used above code for sharing image on social sites.when i posting image on facebook only text is posted and image is not coming.how can we get the image and pathtoimage is string variable i am getting sever image path and stored in string

Android: Customize photo size

痞子三分冷 提交于 2019-12-24 08:57:16
问题 I have one application in which mobile capture photo then it upload to the server. I want to check the size of photo first then reduce photo size to some particular size depending on actual photo size. Actually on server it not allow photo which have greater than some particular size (say 200 kb). Or can I restrict the camera to capture photo only in particular size even some one change the setting of camera. lot of question ask here which retrieve width and height of the photo. But I want to

Photo picker. Portrait turns to landscape

 ̄綄美尐妖づ 提交于 2019-12-24 00:22:49
问题 How to pick an image from gallery (SD Card) for my app? I have implemented the second answer (With the downsampling). When I select an image in portrait, the image will be shown in landscape mode.. Does anybody know why this is? And how to fix this? Thanks in advance! P.s. Sorry I've made a new topic out of this but the poster protected his topic against newbies like me :) 回答1: You have to get the exif rotation of the pic, like this and arrange youur bitmap accordingly public static int

Getting videos(non-local) from the Google Photos App

一个人想着一个人 提交于 2019-12-21 05:26:07
问题 With the Google Photos app , I am trying to pick a video, that is not cached on the device. I am using the ACTION_GET_CONTENT intent, to launch the options dialog, and from there I choose the Google Photos app. While selecting local videos, it returns an Uri in this form. content://media/external/video/media/6708 And from that, I query the content provider to retrieve the actual file location, and proceed from there. The file location looks like this. /storage/emulated/0/WhatsApp/Media

android - get images from camera shot

纵饮孤独 提交于 2019-12-12 08:16:31
问题 I am curious as to how to get images from the Gallery/Camera folder in Android. I am looking into the file manager and can't really get a grasp as to where the those images are located in the file system. If I go to File Manager I can't locate the exact location of my taken photos. If I go to Gallery app I see them hanging in the "Camera" folder. A little about what I am trying to accomplish: Get all existing photos, saved at some point and display them on my activity. I am trying to allow

Getting videos(non-local) from the Google Photos App

和自甴很熟 提交于 2019-12-03 15:11:51
With the Google Photos app , I am trying to pick a video, that is not cached on the device. I am using the ACTION_GET_CONTENT intent, to launch the options dialog, and from there I choose the Google Photos app. While selecting local videos, it returns an Uri in this form. content://media/external/video/media/6708 And from that, I query the content provider to retrieve the actual file location, and proceed from there. The file location looks like this. /storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20131102-WA0000.mp4 Now, when I choose an online video, i.e: a video not available on my

photo share intent in android

我只是一个虾纸丫 提交于 2019-11-28 14:32:50
Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); shareIntent.setType("image/*"); Uri uri = Uri.parse(pathToImage); shareIntent.putExtra(Intent.EXTRA_STREAM, uri); return shareIntent; i was used above code for sharing image on social sites.when i posting image on facebook only text is posted and image is not coming.how can we get the image and pathtoimage is string variable i am getting sever image path and stored in string variable.but it is not working.please give any solutions for my above question.? Vaibs_Cool Try this

Google Photos vs Stock Gallery - Intent Picker

我的未来我决定 提交于 2019-11-27 14:52:17
In my app, I allow the user to pick a profile image from their gallery, like so: When You click the first option, on my Android 5.0 device, I get this: If I use the normal Gallery app that is based off the AOSP project, everything works fine and dandy. However, the Photo's app appears to use a different intent. Here is how I handle code for the normal gallery: Intent photoPickerIntent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); photoPickerIntent.setType("image/*"); photoPickerIntent.putExtra("crop", "true"); photoPickerIntent.putExtra(

ViewPager on a view added by WindowManager getting “java.lang.IllegalArgumentException: No view found for id”

筅森魡賤 提交于 2019-11-26 17:08:49
问题 I am implementing a photo viewer which allow user to view photos in full-screen mode from a thumbnail. My current approach is adding inflated view to WindowManager . In the inflated view, there is a ViewPager allowing user switch images. And I got error "java.lang.IllegalArgumentException: No view found for id" Here is the details (a view is inflated in setActivity method and setting adapter for viewPager in openPhoto method): public class PhotoViewer { private static final String TAG =

Google Photos vs Stock Gallery - Intent Picker

牧云@^-^@ 提交于 2019-11-26 16:56:27
问题 In my app, I allow the user to pick a profile image from their gallery, like so: When You click the first option, on my Android 5.0 device, I get this: If I use the normal Gallery app that is based off the AOSP project, everything works fine and dandy. However, the Photo's app appears to use a different intent. Here is how I handle code for the normal gallery: Intent photoPickerIntent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);