FAQ Database Discussion Community


Find real sd card path and write a file

android,android-4.4-kitkat,sd-card
My device is htc one dual sim and for some reason Environment.getExternalStorageDirectory() is my memory of the phone, it's not removable sd card. I tried to find the real sd card path using this: public static HashSet<String> getExternalMounts() { final HashSet<String> out = new HashSet<String>(); String reg = "(?i).*vold.*(vfat|ntfs|exfat|fat32|ext3|ext4).*rw.*"; String...

Most carefull way to concatenate strings in C

c,string,csv,printf,sd-card
My firmware in one cycle per 10 second is moving string to the output (csv file on SD card). The problem is that string sometimes in non-deterministic way is changing adding values that shouldn't be there or put space in the middle. Is this related to sprintf function or dynamic...

Checking SD card health data, if available

sd-card,health-monitoring
I would love to know if a SD card provides something similar to "SMART" information, like harddisks and SSDs. I am interested in checking health information of the SD card in a Raspberry PI, for preventive replacement. My write needs are quite high and physical access to the device is...

Android 4.4.4 Save to SD on Samsung S4

java,android,sd-card
I'm attempting to save files to my SD but i cannot get it to, I even tried moving the app to the SD to see if I can. I don't really care where it ends up on there but this isn;t working: String state = Environment.getExternalStorageState(); File filesDir; if (Environment.MEDIA_MOUNTED.equals(state))...

How to write an Algorithm to see if directory contains a jpg file (subfolders)

android,algorithm,sd-card,directory
i want to see if a certain directory contains a jpg file. What is the best way (one way) to do this? If the directory didnt have any sub folders it would be easy, but now i want to move through directories to find jpg. For ex: public static boolean...

Android : write photo files on SD Card that are viewable in the galery

android,sd-card
I'm trying to found a way (compatible with android kitkat and next) to write photos on the SD Card and make them visible to the gallery app. If I use Environment.getExternalStoragePublicDirectory , samsung devices return a path in internal memory (/storage/emulated/0/ ... ) If I use Context.getExternalFilesDirs , there are...

running on an SD card issue

android,sd-card,android-sdcard
I recently modified all my apps to run on an SD card by specifying android:installLocation="preferExternal" in the Manifest.xml. They tested out just fine on all my test phones. It seems like a no-brainer for an app to allow this. But I notice that most of the apps on my phones...

how i read file PDF in SD card in androide? [duplicate]

android,pdf,sd-card
This question already has an answer here: How to read pdf in my android application? [closed] 4 answers I have a .PDF file saved on my sdcard. I need to read the content of .PDF file and show it in a TextView. Can anyone please tell me how to...

How can i install an app from SD Card to device without the need to check 'Unknown source' option

android,ios,sd-card,android-sdcard
How can i install an app from SD Card to device without the need to check 'Unknown source' option. can the installation from SD card can be done auto? for example: when users inserts SD Card containing only apk, the device auto run the installation permission. Is this possible? Actually...