sd-card

Detecting/Verifying SD Card Drive

痴心易碎 提交于 2019-12-08 09:40:19
问题 Is there a way to detect all SD Card drives connected to a Desktop computer? In Windows, SD Cards are visually distinct from other devices like built-in hard drives or similar. Is there a way to tell if a drive is an SD Card drive or not? A Java way of listing all available filesystem roots for example is using the listRoots() method but it cannot tell the filesystem types such as external, internal, OS drive or whatever. Is this even possible in pure Java? Note: I'm not asking to detect the

android mount unmount sd card

旧城冷巷雨未停 提交于 2019-12-08 07:51:53
问题 I am working on an application that scans the sd card. At this time, I am using the emulator of eclipse to test my android application. I have created a virtual sd-card for testing purposes on eclipse. I want to know if there is any way of un-mounting and then mounting the sd card on the emulator (eclipse) so that I can test my application that when the sd-card is unmounted, it should generate a message etc.. Can anyone help me here.. 回答1: It is possible to boot the device without the

Unable to play video in html using webview from sdcard

a 夏天 提交于 2019-12-08 07:02:44
问题 I want to play video in webview from sdcard. I googled but could not get solution.I have tried this way: public class WebActivity extends Activity { private WebView mWebView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.helpview); mWebView =(WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setPluginsEnabled(true); mWebView.getSettings().setAllowFileAccess

Android - Find all internal and external storage

和自甴很熟 提交于 2019-12-08 05:45:25
问题 So I've noticed that from device-to-device, there are many different configurations for internal vs. external. On my Evo there's just internal storage and the external SD card, but on a Droid Incredible from the same year, there's internal storage, internal SD card (~8GB) and external SD card (default 1GB). Presumably there are other configurations as well, and there will be more forthcoming. However, all I can seem to find about enumerating the number of storage media available are things

C# - File Manipulation Galaxy S3 SD Card

拜拜、爱过 提交于 2019-12-08 05:00:57
问题 I am currently trying to write a small program to check my SD card on my Galaxy S3 for music then check my music folder on my computer and copy anything I don't have on my phone to it and vice versa. Currently I am struggling to figure out the path to the SD card. The path windows is displaying when I go there in my file system "Computer\SCH-I535\Card\Music" returns false when attempting to check that files exist at that path. I was hoping some one might be able to help me by telling me how

accessing file on sdcard android

孤者浪人 提交于 2019-12-08 04:09:39
问题 I am new to Android development. I am trying to use the following code to email a file on my motorola milestone through gmail. Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.setType("audio/mp3"); sendIntent.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/king1.mp3"); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject"); sendIntent.putExtra(Intent.EXTRA_TEXT, "this is the email content2"); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/king1.mp3"));

Uploading android file by name from sd card

旧城冷巷雨未停 提交于 2019-12-08 02:41:29
问题 In a previous question (Take screensot and save android) I found out how to save a file to the sd card of an android device and it works properly. Now I need to know how to find the file programatically by name, and then upload the file to facebook or twitter. Currently my biggest issue is just to find the file. 回答1: To get path of file from gallery String filepath; // filepath contains path of the file public void getImage() { // To open up a gallery browser Intent intent = new Intent();

Save Bitmap image to SD card - problem in API 1.5?

只愿长相守 提交于 2019-12-07 22:32:24
问题 Any idea why this is not working on a HTC Hero running on Android API 1.5 ? private static void Save_to_SD (Bitmap bm, String image_name){ String extStorageDirectory = Environment.getExternalStorageDirectory().toString(); String meteoDirectory_path = extStorageDirectory + "/Weather_Belgium"; OutputStream outStream = null; File file = new File(meteoDirectory_path, "/"+ image_name); try { outStream = new FileOutputStream(file); bm.compress(Bitmap.CompressFormat.PNG, 100, outStream); outStream

Append (add) String data to an SD Card text file in an Android application

旧街凉风 提交于 2019-12-07 19:39:17
问题 Just a quick point here. Although my code seems to be okay storing String data etc. in a new file using the standard techniques of writing to a mytext.txt file in an internal or external (SD Card) storage, it is of more use to me for my App to add more data to the same file in the same directory by repeating allowing the user to repeat the process (e.g. a user input and button save) or closing the App and starting over again, so the data permanently remains unless the user chooses to manually

C# - File Manipulation Galaxy S3 SD Card

雨燕双飞 提交于 2019-12-07 13:10:26
I am currently trying to write a small program to check my SD card on my Galaxy S3 for music then check my music folder on my computer and copy anything I don't have on my phone to it and vice versa. Currently I am struggling to figure out the path to the SD card. The path windows is displaying when I go there in my file system "Computer\SCH-I535\Card\Music" returns false when attempting to check that files exist at that path. I was hoping some one might be able to help me by telling me how to properly find the path to the SD Card. I am currently attempting to use C# because I wanted a nice