android-gallery

android:selecting multiple images in gallery and starting implicit intent

时光总嘲笑我的痴心妄想 提交于 2019-12-05 05:58:28
How to get the image path of all the selected images or just display them in my app? I am able to start my implicit intent and display it in my imageView when a user selects image in gallery and press share button like shown below ImageView iv=(ImageView)findViewById(R.id.im); iv.setImageUri((Uri)getIntent().getExtras().get(Intent.EXTRA_STREAM)); in manifest file for my activity <intent-filter > <action android:name="android.intent.action.SEND"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="image/*" /> </intent-filter> But i want to select multiple images

fetching images from gallery on android phones with internal storage

微笑、不失礼 提交于 2019-12-05 05:05:31
Hi I am developing an Android Gallery app where I am fetching images from built in gallery and displaying it.I am using the code as below String[] projection = {MediaStore.Images.Thumbnails._ID}; Cursor cursor = getContentResolver().query(MediaStore.Images.Thumbnails.INTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, null); int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID); int size = cursor.getCount(); // If size is 0, there are no images on the SD Card. if (size == 0) { Log.e("size 0","0"); } The Problem is when I run

Syncing photos in Android gallery

北慕城南 提交于 2019-12-05 03:08:34
问题 I've seen a few apps that can sync photos with the Android gallery (such as Picasa), and I'm wanting to create something similar myself, where I would have a remote server with the photos and the users would be able to access these from within separate albums in the gallery (as the aforementioned apps). However, I do not know how this could be achieved, or even where do begin. Does anyone know how I should go about doing this? My Facebook photos in the synced stock gallery app on my Galaxy

Get the position of the current image displayed in Gallery

▼魔方 西西 提交于 2019-12-05 02:19:06
in my application , i have a gallery of pictures, but i want to detect the position of the current image displayed , For example : when i launch my acvitivity, the position is 0, but when i scroll in my gallery,i want to get The position of the Current image displayed , i have tried OnFocusChanged , OnItemClicked , but that works only if i click on an item of my gallery Any ideas ! :( gal.setOnItemSelectedListener(new OnItemSelectedListener(){ @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { //Do something with position } }; You get this callback

Picking an image file from Gallery using FileProvider

戏子无情 提交于 2019-12-04 22:37:12
Compiling for Android N I've faced an issue of FileProvider . I need to let user to pick image from gallery/take picture with camera then crop it to square. I've managed to implement a FileProvider for taking image with camera, but I have serious problem with picking image from gallery. The problem is that in the gallery there are lot of files from different places and I've got the Exception for example: java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/6133-3766/DCIM/100ANDRO/DSC_0035.JPG So the question is, what can I put to file_paths.xml to get

Get last image captured using camera on Android

荒凉一梦 提交于 2019-12-04 19:00:00
I am trying to get the last image captured by the user using a camera app using the following code and display it to the user in my camera app's (like other camera apps do, show a small preview of the last image capture in a corner): String[] projection = new String[]{ MediaStore.Images.ImageColumns._ID, MediaStore.Images.ImageColumns.DATA, MediaStore.Images.ImageColumns.BUCKET_DISPLAY_NAME, MediaStore.Images.ImageColumns.DATE_TAKEN, MediaStore.Images.ImageColumns.MIME_TYPE }; final Cursor cursor = getContentResolver() .query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, null, null

How Can I Get Thumbnails For Picasa Images Selected From The Gallery?

大城市里の小女人 提交于 2019-12-04 15:19:13
I'm working on an application where the user is able to select files, either a new image from the camera, an image from the gallery, or a plain old file. It then shows an icon and the name for the selected item. I have this working with one exception. The gallery application integrates picasaweb pictures. If the user selects a picture from a picasa album, I'm not able to get a thumbnail for it. I'm using the MediaStore.Images.Thumbnails.getThumbnail() method, and it works for other images in the gallery just fine, but for the picasaweb files, I get, regardless of what "kind" of thumbnail I

Images not being saved when picture is taken by camera app that isn't the stock camera

泪湿孤枕 提交于 2019-12-04 14:04:18
I'm currently trying to save images taken from a phone to its gallery, but the code below only works if I choose the stock camera app when the chooser dialog pops up. Whenever I choose another camera app(e.g., the Google camera), the taken picture doesn't get saved any where. To make things even stranger, sometimes the picture does show up in its designated directory in the gallery, but after 15 mins or so, the same goes for when I use the stock camera app: the picture will get saved in the default camera shots directory, but takes quite a bit to show up in its designated directory, if it

Camera intent/Activity - avoid saving to gallery

…衆ロ難τιáo~ 提交于 2019-12-04 10:37:01
问题 I am using the Camera Activity to capture the picture. I call it with the MediaStore.EXTRA_OUTPUT extra parameter. The image is correctly saved to provided path, put it is saved also to the gallery folder, so I can view the image in "Gallery" application - can I avoid this? ... File file = new File(Environment.getExternalStorageDirectory(), "Test.jpg" ); iImageOutputUri = Uri.fromFile( file ); // Start camera intent to capture image Intent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE

Android Automatic Circular Gallery

不打扰是莪最后的温柔 提交于 2019-12-04 10:03:08
问题 I am having gallery widget contains 1-10 images to slide. I know that when I stripe the screen , the images scroll from left to right. I want automatic circular gallery after 10 automatically start by first image, is there any automatic circular adapter or way ??? final Gallery g = (Gallery) findViewById(R.id.gallery); g.setAdapter(new ImageAdapter(this)); Animation animation = AnimationUtils.loadAnimation(this, R.anim.rotate_indefinitely); animation.getInterpolator(); animation.setDuration