Questions tagged [mediastore]

The MediaStore provider contains meta data for all available media on both internal and external storage devices.

mediastore
Filter by
Sorted by
Tagged with
1 vote
0 answers
114 views

Exclude cache file to load when using MediaStore

How can I exclude cache file to load when using MediaStore.Files.FileColumns.MEDIA_TYPE_NONE. I am getting cached data plus different data formats like(.pdf,.txt).
girish kumar's user avatar
1 vote
1 answer
706 views

Listing audio and video files in ListView

I've written a small program that lists all audio and video files (present on the SD card) in an android ListView. I'm using CursorLoader inside AsyncTask to query MediaStore and then populating my ...
Vinit Shandilya's user avatar
0 votes
1 answer
95 views

Java library for integrating with external Storage providers

I'm about to integrate Cloudify in my webapp to handle media storage. I was wondering if a java library already exist that abstracts data access/storage and can handle different storage providers ...
spike07's user avatar
  • 829
0 votes
1 answer
378 views

How to query list of all directories with images in it, efficiently?

I need to query MediaStore and get all the bucket names as a list. It is easy to do it and there is tons of questions with answer on stackoverflow however all of the answers are having one big ...
user65721's user avatar
  • 2,883
3 votes
4 answers
6k views

MediaStore list all songs from specific path

I want to get all the songs from one specific path on the device. in a example i want to get all the songs from one specific folder "music" from path: "/mnt/sdcard/music/" , what i need to change in ...
AlexTheLion's user avatar
2 votes
1 answer
2k views

Get the path from Uri in Android Kitkat throws Illegal Argument exception

I'm trying to get the path from uri. it works in devices below kitkat. I googled and found that I need to get the document Id and then query it with the gallery items. And it works. But I'm facing ...
android beginer's user avatar
5 votes
2 answers
3k views

Why I cant't get the video duration from MediaStore?

On one of my device, the following code can't make my video appear in Gallery: File file = new File(path); Uri uri = Uri.fromFile(file); Intent scanFileIntent = new Intent(Intent....
suitianshi's user avatar
  • 3,290
0 votes
1 answer
609 views

Android: How to list mp3 albums

I want to try develop simple android music player. I have this method below to list album title, but it gives duplicate albums list. public void getAlbumList() { //query external audio ...
user2967801's user avatar
1 vote
1 answer
332 views

Android - Is MediaStore ID a safe way to store information about pics/albums?

In my app I store information about an image or an image album by storing it's MediaStore id. Later on I may have to perform operations that require these images/albums. Is the MediaStore id a safe ...
Anonymous's user avatar
  • 4,730
0 votes
1 answer
491 views

How to get path of thumbnail from mediastore in reasonable time to load images in a gridview?

I'm trying to show thumbnails of images from sdcard in a gridview. I'm using universal image loader and image loading is takes reasonable time. My problem is: trying to get all paths for the ...
user65721's user avatar
  • 2,883
0 votes
1 answer
187 views

Pulling EXIF Data from ALL Photos on Device without opening or selecting them

So I'm looking to take EXIF data from all photos on a device without manually opening or selecting the photo from Gallery. So far I've found a ton of ways to pull it from a single photo (with ...
Hulabaloo's user avatar
1 vote
0 answers
821 views

CursorLoader Album Art and Song Title Into Single Cursor

I'm using the mediastore content provider to display information about the music on my device using a cursoradapter in a listview. I am trying to get the artist name, song name, and the album_art to ...
spintron's user avatar
  • 107
2 votes
1 answer
5k views

How to convert audio Mediastore Duration to minutes and seconds?

I'm using the audio player tutorial from androidhive.info and in the SongsManager.java I'm trying to convert duration to minutes and seconds. I've managed to do it but I keep getting a ...
Evans Mauta II's user avatar
3 votes
1 answer
5k views

Getting album art from the audio file Uri

I am trying to get the album art from the audio file Uri, here is my code: // uri is the audio file uri public static Bitmap getSongCoverArt(Context context, Uri uri){ Bitmap songCoverArt = null;...
Neno0o's user avatar
  • 133
2 votes
1 answer
903 views

Android take Photo and load the aviary SKD

I am trying to learning aviary SDK , I have downloaded their sample. What I want to do is to Take a Photo using : Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (...
Thiago's user avatar
  • 13.1k
0 votes
1 answer
115 views

How to delete (non-favorites) audio files that are stored in internal memory in Android?

I have hundreds of songs on the phone and I would like just delete non-favorite songs. Is it possible by code? Using the Android's default music player?
Thiago Silva's user avatar
0 votes
1 answer
181 views

MINI_THUMB_MAGIC usage

I wonder if I can use MINI_THUMB_MAGIC from MediaStore.Images.Media to create the Uri for the thumbnails, for example something like below: "content://media/external/images/thumbnails/" + "kind_mini" ...
feisal's user avatar
  • 593
1 vote
1 answer
204 views

Erroneously multiple values in MediaStore (when only one value is expected)

It seems that the same Album is being split into multiple rows in the MediaStore if the tracks of the album are separated into multiple directories, and results in multiple rows with different values ...
RestInPeace's user avatar
0 votes
1 answer
181 views

NPE when calling a method which is having getContentResolver().query in Android

NullPointerException when calling getPlaylist() method from another activity in Android. The method is supposed to get the audio info then return it using Cursor cursor = getContentResolver().query(...
HUKS's user avatar
  • 319
1 vote
2 answers
2k views

MediaStore returned thumbnail path but File object giving file not exist - Android

I got the thumbnail path of videos using CursorLoader. MediaStore is giving me the thumbnail path. Now When I check for if the thumbnail path exists or not, it's giving me that file not exists. I've ...
AtanuCSE's user avatar
  • 8,890
0 votes
1 answer
883 views

Remove duration limit for low quality video capture intent

I would like to record a video by using just an intent: Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); It needs to be a low quality so I use: intent.putExtra(MediaStore....
draziw's user avatar
  • 321
0 votes
1 answer
6k views

MediaStore.Images.Media is not capable of showing all images, solution

doing a query with MediaStore.Images.Media does not show all images whether it is querying internal content or external content The results (the thumbnails and the location those thumbnails are ...
CQM's user avatar
  • 43.5k
5 votes
2 answers
13k views

Get all photos from Android device android programming

I am trying to fetch all the photos of my android device. I have an onCreate function: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R....
Nishu's user avatar
  • 133
0 votes
2 answers
954 views

How to load the thumbnails for the pictures stored in particular folder (or with IDs)?

I have an activity with a GridView where I want to show thumbnails for images taken with standard camera activity and stored in a particular folder. This activity implements LoaderManager....
Oleksandr Berdnikov's user avatar
5 votes
3 answers
9k views

How to display Song Duration

So Im Using Mediastore to get the Songs Duration but I need to convert them to Seconds I need to format them to HH:MM:SS(Hours:Minutes:Seconds) I Tried Using TimeUnit But didnt work or maybe i didnt ...
ray chamoun's user avatar
58 votes
7 answers
55k views

Android: Picasso load image failed . how to show error message

I am trying to use the picasso library to loading the image store in the mediastore. When I called load(imageview, callback), the picasso call onFail instead of onSuccess. How do I know why the image ...
LittleFunny's user avatar
  • 8,275
0 votes
1 answer
171 views

Fastest way to open list of videos Thumbnails

I would like to know what is the fastest way to read Thumbnail of a video? My problem is that I've had a couple of videos files and I need to get the thumbnail from all of them. For now I'm using : ...
user2235615's user avatar
  • 1,523
0 votes
1 answer
777 views

Android MediaStore Thumbnails doesn't exists

I am trying to use MediaStore to get all images in phone/tablet. I am succesful with that. String[] projection = new String[]{ MediaStore.Images.Media.DATA, MediaStore.Images....
TheLibrarian's user avatar
  • 1,763
0 votes
1 answer
69 views

Android: Mini_Kind and Macro_Kind

May be a simple question. Will the thumbnail of Macro_Kind and Mini_Kind be different on different set of devices e.g. tablet and phone?
LittleFunny's user avatar
  • 8,275
0 votes
1 answer
2k views

get song from folder android

I'm using code below to get all songs from folder, but it's not working because it will only work with such paths: /sdcard/test.mp3, but i need to get songs from folder- eg /sdcard/ How can i do this ...
Jenya Kirmiza's user avatar
1 vote
2 answers
135 views

Why can't I see some of my pictures in the gallery?

I'm trying to read photos existing in the sdcard with MediaStore.Images.Media.DATA but I'm always getting an empty cursor !!! This is the code I'm using for the reading : final String[] columns = { ...
hamza bouzidi's user avatar
0 votes
1 answer
126 views

scanner for music player android

I want to create scanner that is showing only folders that have music in them. i know only how to create query for getting music from path using MediaStore public static QueryTask buildFileQuery(...
Jenya Kirmiza's user avatar
0 votes
1 answer
991 views

how to specify a hidden folder for the projection of a contentprovider

I have an app where the user must specify an image to upload to server. When the user clicks the button to choose the image and specifies an image from the Gallery, it works fine. If the user ...
turtleboy's user avatar
  • 7,998
0 votes
1 answer
406 views

Android Playlists Content not found

public static ArrayList<Song> getPlaylistcontent(Context context, long playlistID) { ArrayList<Song> songs = new ArrayList<Song>(); final String idString = ...
Davlog's user avatar
  • 2,188
3 votes
1 answer
5k views

Sort order in Android list from Mediastore

I need a video gallery on Android sorted by the newest. With the code below, the sorting is with oldest videos on top and newest videos on last. So I need to scroll the entire list before getting the ...
andreasperelli's user avatar
0 votes
1 answer
2k views

Android how to get the only uri of Media Store Image?

I'm trying to get the uri and after parse into path of MediaStore image. I do this to get the uri: Uri img_uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; And after with this function i convert ...
user3805317's user avatar
0 votes
1 answer
362 views

Android how to get path of mediastore?

I'm trying to get the path were android save the images. With this code: String path = MediaStore.Images.Media.insertImage(getContentResolver(), myImage, "Title","Description").toString(); I get the ...
user3805317's user avatar
1 vote
0 answers
1k views

How to launch a playlist in any music app

I have the following code which works for Google Play Music, partly for Poweramp, not at all for stock music player public void playSelectedPlaylist(String plid) { Intent intent = new Intent( ...
Theo's user avatar
  • 2,022
2 votes
0 answers
2k views

Saved image not found by MediaStore

I have converted a ScrollView into a Bitmap image and saved it into external storage. A Toast pops up either saying that the image has been successfully saved or it hasn't. Bitmap bmp = ...
user3801877's user avatar
1 vote
1 answer
4k views

Rename an Image with MediaStore android

After renaming images with file.renameTo(file) they get grayed in gallery and get unavailable. I tried every kind of Intent for rescanning images with no hope at last, some work on older versions some ...
M. Reza Nasirloo's user avatar
1 vote
1 answer
897 views

Get all captured Videos in Android as a list

I am trying to get all video available in gallery with below code, String[] proj = { MediaStore.Video.Media._ID,MediaStore.Video.Media.DATA,MediaStore.Video.Media.DISPLAY_NAME,MediaStore.Video.Media....
Hitesh Dhamshaniya's user avatar
0 votes
0 answers
180 views

Android MediaStore TITLE_KEY is not reliable

I am following the approach i got from this answer. But now new instability comes into play such that, TITLE_KEY is not seems to be as unique as it has to be. Using below code,generated an array list ...
nmxprime's user avatar
  • 1,506
1 vote
2 answers
2k views

Getting Fullscreen thumbnails from the mediastore - Android

I keep getting an Error 'Unsupported kind: 2' when trying to get a FULL_SCREEN_KIND thumbnail from the mediastore. I know that the URI is a valid image (because I am already getting smaller thumbs ...
zsoflin's user avatar
  • 373
4 votes
1 answer
1k views

Android duplicate thumbnail issue

I am creating a custom image and video gallery just like Whatsapp have to allow user to select multiple image/video,so far i am populating and showing thumbnails on gridview.But the result is,on some ...
hardik9850's user avatar
2 votes
1 answer
2k views

android - Get the URI of a video using it's ID (Mediastore)

I have the mediastore id for a video, found like so from a CursorAdapter: Cursor cursor = mGalleryAdapter.getCursor(); cursor.moveToPosition(position); Integer id = cursor.getInt(cursor....
iosjdjoisdfijodjoi893's user avatar
3 votes
0 answers
258 views

Is there a way to associate items of MediaStore.Audio with additional data?

There are two requirements associate some sound properties, e.g. loudness or tempo, with every audio item on Android efficiently query audio items using these properties, e.g. get top most loud ...
vokilam's user avatar
  • 10.2k
1 vote
0 answers
2k views

Listing thumbnails per bucket

I have 2 classes. First is meant for searching for all folders, I mean Bucket list name. Seconds class makes thumbnails. But I need to have thumbnails per bucket. So when I push on my folder it should ...
Paltroth's user avatar
0 votes
1 answer
243 views

Get normal size from MediaStore

I use this code and MediaStore return me bitmapimage with small size. How to use mediastore to get normal size of photo? Someone help me solve the problem? Need some help to solve this problem. ...
romanPotapskyi's user avatar
25 votes
1 answer
8k views

Inserting a video into MediaStore

I'm trying to insert a video into the MediaStore, the same way it's possible to store an image using this method: MediaStore.Images.Media.insertImage(getContentResolver(), imagePath, null, null) ...
Juan Andrés Diana's user avatar
0 votes
1 answer
883 views

android: how to get all folders with names

Hi can somebody help me with my code?? I have a class which should show me folders on my SD card+ folders name, but all folders have same name, but each should have different. How can i implement it?? ...
Paltroth's user avatar

1
15 16
17
18 19
23