Android : How To Force MediaStore To Rescan SD Card
Feb 14, 2009
If I pragmatically store new media files on the SD card, the MediaStore does not know about them until I remove and reinsert the SD card. Is there a way to tell the MediaStore to rescan the SD card without first unmounting the SD card?
View 6 Replies
Dec 16, 2013
I used to use an app but none of them are working after 4.4. how to trigger a rescan manually? I tried rebooting and still doesn't work.
View 5 Replies
View Related
Oct 9, 2012
Besides clearing the media storage, what are the ways to force a rescan? My rescan service seems to have stopped and everything in the gallery is blank. I tried some third party rescan but all fail. GT-N7000
View 1 Replies
View Related
Nov 2, 2009
I've already been searching forums and google groups to find out how to force Media Scanner to rescan the sd-card for media files, but with no luck. So after 2 days of searching i decided to post a question here.
In my app i need to rename media files, change their extension, or to reveal them by changing back their extension, but the changes take effect only after i run Media Scanner from the dev-tools, or remount the image, or reboot the phone/emulator. I've tried using MediaScannerConnection, and it only works when revealing media files, but not refreshing the gallery / music player thumbnails which is the biggest problem in my app development right now.
I've also tried copying files and deleting the old ones, but that has no effect also. Does anyone have any experience with this?
View 2 Replies
View Related
Aug 22, 2010
I don't know if this is a problem with using double twist to sync music then the default player to play it, but i recently wiped all my phones music using double twist media sync program and then put some more music on... after this i went into the default music player and it was very lagy and showed songs that i had removed with double twist but when i went to play them it would play a random song that was on the phone... does anyone know how to get the media player on droid x to rescan your SD card so i can realize that some songs are gone now?
View 1 Replies
View Related
Aug 5, 2010
So my app downloads images at the users' request from an online source. Through a button in the activity, the user can choose to hide or show the images in the gallery. This is easy enough, I just add or remove a .nomedia file as needed. However, I want to rescan media every time so that the change is instant, and requires no further user interaction.
After each image is downloaded, I am using the method at http://www.mail-archive.com/android-developers@googlegroups.com/msg24164.html to scan the specific image into the library. That works great for one image, but when the .nomedia file is added, I really need to be able to scan a whole directory.
I have considered calling the MediaScannerNotifier on each image in the directory, but that just seems clumsy and lazy.
View 1 Replies
View Related
Feb 16, 2010
How can I get the album art from MediaStore?
View 1 Replies
View Related
Sep 27, 2010
I'm trying to query the Android's MediaStore.Images.Media to get the images contained in the device. I get my cursor on the DB like this: Code...
and I get the indices of the columns this way:
int dataIdx = cursor.getColumnIndex(DATA); ... int idIdx = cursor.getColumnIndex(MediaStore.Images.Media._ID);
unfortunately it seems that the column index idIdx is always -1, which means the column doesn't exist. Am I doing something wrong? Is there anyone else experiencing the same?
View 3 Replies
View Related
Sep 23, 2010
i was wondering what apps are safe to move and which ones just wont move. I know system apps and those that use widgets are a no no. But what about Google maps,facebook, gmail, astro and Adobe flash player (12.4) mb?
Maybe we could have a list of what not to move here?
View 2 Replies
View Related
Aug 16, 2010
Anyway I used the ''force apps to sd'' thingy, where you change the install location by connecting your phone to your PC and use commandprompt. You know: Lorin Bute - Home - How to force apps to move to the SD card onFroyo. Everything worked great until recently when the phone became unable to install many apps when microsd was chosen as the install location and some apps still wont install even with the setting set back to default. I can still force already installed apps to move to sd. One other odd thing is that I tried to install a GPS app and the installation failed (with the default install location). Then I quit almost all running processes using the built in process manager and then the install worked. After a reboot I tried to replicate my actions but no matter what I did I could no longer install the same app. My phone's inability to install some apps appears to be completely random. What's worse is that I installed froyo around the same time so maybe it has a part to play in my problem.
View 6 Replies
View Related
Jul 14, 2010
I want to get EA games' NFS, but the file is 100MB. I've moved every non-system app I have to my SD card via Titanium, and I still only have 54MB free on the phone.
Could I back up my current ROM, install a new ROM, download the app, move it to SD using Titanium, copy the files on to my laptop, revert back to my current ROM, and copy the files back onto the SD? (I wouldn't know where to look for all of the files.)
View 3 Replies
View Related
Feb 18, 2014
I do not have enough space on my phone .some app installed on phone and can not move to SD card . can I move them by force to SD card for make free space
View 22 Replies
View Related
Jun 13, 2010
I am trying to move a couple of apps onto my SD card. I know you long press the app you want to move, and select the choice to move it. is TiBu shows the notification of it being moved. I then go back into setting, look at the apps on SD card, and they do not show up. I am running NexBeast FRF57 V0.1.1. My Titanium Backup is at version 3.2.4, I can reboot, still doesnt work. Superuser shows Titanium has permissions, so I am not sure what the deal is.
View 12 Replies
View Related
Aug 20, 2010
My navigation force closes as soon as I open it. When I unmount my SD card the navigation works fine.
View 1 Replies
View Related
Jun 17, 2010
For example if a have two directories /sdcard/Music/Music-1 and /sdcard/Music/Music-2 how can i construct uri to get the files in Music-1 dir for example. I can use MediaStore.Audio.Media.EXTERNAL_CONTENT_URI to get the content of all external storage but how to do the trick only for specific dir.
View 1 Replies
View Related
Aug 13, 2010
I have an app that allows the user to take and save a new picture using the Intent ACTION_IMAGE_CAPTURE. After the user accepts the newly taken picture, I create a ContentValue object to set the picture information, and then I insert the picture into the MediaStore and send a broadcast so that the user can see the photo when opening a picture viewer app such as gallery:
ContentValues newImage = new ContentValues(3);
newImage.put(Media.DISPLAY_NAME, mPicName);
newImage.put(Media.MIME_TYPE, "image/png");
newImage.put(MediaStore.Images.Media.DATA, path);
mPictureUri = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, newImage);
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, mPictureUri));
All of this code works fine. The photo is correctly saved, and I can view the photo using gallery. The problem is that when I view the photo in gallery and select "Details" it shows the photo name as "null." And yes, I know for a fact that the variable mPicName above is not null and always has the correct value.
The odd thing is that, when running my app on my Droid running Android 2.1, when I choose to copy files to/from the phone and my computer, I open up the Droid on my Windows computer, and when I go into my app's created folder for photos and view the new photo, the name is correct. Then, when I disable copying files from the phone/computer and go back into gallery to view the file on my Droid, the name is suddenly correct and is no longer null.
Can someone tell me why the name is null after my code runs, and why the name is correct after viewing the file on my computer rather than on the phone? Is there a way to get the name non-null right when the picture is saved? I'd bet that the name would be correct if I turned my phone off and turned it back on, but I'm not sure how exactly to get force things to work immediately.
View 1 Replies
View Related
Oct 7, 2010
How do i get back the image taken from starting the Intent(MediaStore.ACTION_IMAGE_CAPTURE)?
I need the image to be display as a thumbnail and also be attached to email.
View 2 Replies
View Related
Apr 17, 2010
I am using MediaStore.Images.Media.insertImage(ContentResolver cr, String imagePath, String name, String description) function to insert a newly created image into gallery. System is naming the file by default, but its different than names of pictures taken by original app(Time stamp). Is there easy way to set it up?
View 2 Replies
View Related
Apr 15, 2010
After I've used a MediaStore.ACTION_IMAGE_CAPTURE intent to take a photo, when I try to retrieve the captured image, I sometimes get an out of memory error as shown below. The odd thing is the huge size of the memory trying to be allocated is always reported as 10,077,696 (x99c600). However, the image file is much smaller, typically around 750,000 bytes.Any suggestions on how to get around this problem? I'm testing this on a Nexus One with firmware version: 2.1-update1 and Build number: ERE27. Code...
View 2 Replies
View Related
Jul 15, 2009
I have seen a number of posts from people who had trouble retrieving a full size image from MediaStore.EXTRA_OUTPUT with code...
Should this code work? I mean, should this result in a file containing the picture?
View 4 Replies
View Related
Sep 30, 2009
Is that normal that Images indexed in the MediaStore do not have thumbnails generated until the Gallery app is launched and the user actively navigates to the bucket where the image is stored ?
I think it's quite odd as I thought thulbnails generation was part of media indexing.
View 9 Replies
View Related
Feb 17, 2010
When I take a picture with Androids camera app, it detects the phone's orientation and saves the pic accordingly. So if i take a picture of a building, the roof will be on the topside, whether I hold the phone in landscape position or portrait.
However, when i use
Intent imageCaptureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
to get a picture, the camera app doesn't react to orientation. If i hold the phone vertically (portrait), the resulting pic will be rotated, with said building's roof to the left of the screen.
How can I set the intent so that the camera will take orientation into account? Or can I deduce in some way in what orientation the pic was taken and rotate it myself afterward?
View 1 Replies
View Related
Aug 16, 2010
I'm using MediaStore.Images.Thumbnails in order to show the images the user have. But i'm not able to get an image through its path.
Is there any way to look for an image using the path? Code...
View 1 Replies
View Related
May 7, 2010
I just don't get it: when I use the camera with an intent and also specify an output file, the returned image is always very small on many devices (e.g. Motorola Milestone 2.1, HTC Desire 2.1, Emulator 2.1, Emulator 2.0.1) but not on all (e.g. Nexus One). Here's what I do to bring up the camera app:
private final static String TEMP_PHOTO_FILE = Environment.getExternalStorageDirectory() + "/TEMP_PHOTO.JPG"; ..............
View 1 Replies
View Related
Aug 3, 2010
I'm rather new to android programming and right now I'm playing with the media store for a personal test project. I've run into a couple double-edge problems..
I need to query the mediastore for a list of all music files, simple enough - but i need to restrict the results to certain folders only. I accomplished this (rather easily) using the SQL-*LIKE- where clauses and all's well on this aspect.
I now need a unique (if this were actually using SQL, I could simply use the DISTINCT modifier and be done with this) list of all artists. Now this is based off the songs in a given path. Therefore I cannot filter the list returned from querying the URI:MediaStore.Audio.Artists.EXTERNAL_CONTENT_URI, and adding in where clauses based off the file path as I did in the first step.
So, what this leaves me with is using my initial query and getting a cursor back then stripping the dupes from the cursor (which is where i am now - too slow, especially with 1000+ songs) - based on a query of artists instead of songs, obviously.
Is is possible to override the actual query that fills the cursor, maybe? As in: override the query and filter how the data is initially put into the cursor (remove recursive entries) and return the proper cursor immediately? Content providers and how they were never built with a distinct function is beyond me, but whatever. Is the returned cursor from a URI query command filled in a manner that can be overridden or not? That's what I'm unclear of at the moment on this. I would like to be able to wrap the getContentResolver().query(xxx..)) command directly to remove the entries on cursor fill, if possible - i do async queries and using a single query statement (well, one for the artist query) would be great.
My other alternative thought is to just preload the data and manipulate my view's data by creating a new cursor based off the preloaded dataset (cursor) - which may be the way to go, and if so - would a cursor be the best way to store this data? Also worried about ram with larger libraries.
Maybe there's simply a way to do a DISTINCT query on the URI - I just do not know. I've seen this question (or the ilk there-of) asked many times with no good answers that were meant for a URI as opposed to a SQL back-end.
View 1 Replies
View Related
Nov 22, 2009
Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. Code...
View 9 Replies
View Related
Jan 8, 2010
I managed to figure out how to get the camara application to give me an image, but it is rather tiny, only 18k. Has anyone figured out a reliable way to get a full-sized image returned if you are using a MediaStore.IMAGE_CAPTURE intent?
View 2 Replies
View Related
Mar 2, 2009
I got FileNotFoundException when run this
FileInputStream fileToRead = new FileInputStream(fileName);
here fileName is a string =content://media/external/images/media/6 which is got in sdcard image selection by android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI
any solution?
View 3 Replies
View Related
Mar 16, 2009
I'd been using my own Camera class for taking images and my own database but soon enough I couldn't really keep up with changes and I decided to use the built in camera application in Android to do the job, but I can't seem to get it to save file. What am I missing here? The application seems to save the file but it's just 0 bytes. I looked up the source code of the Camera application and it's looking for the "output" in Extras to save the file.
Public class CameraTest extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);...............
View 5 Replies
View Related
Jan 22, 2010
So our app has the option to take either a picture or a video. If the user takes a picture, we can use the MediaStore.Images.Media.insertImage function to add the new image (via a filepath) to the phone's gallery and generate a content:// style URI. Is there a similar process for a captured video, given that we only have it's filepath?
View 3 Replies
View Related