sd-card

How to iterate through file system directories and files using javascript?

大憨熊 提交于 2019-12-07 13:08:42
问题 I'm using Javascript to write an application that will be used with Phonegap to make an Android application. I'm using the Phonegap File API to read directories and files. The relevant code is shown below: document.addEventListener("deviceready", onDeviceReady, false); // PhoneGap is ready // function onDeviceReady() { window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail); } function onFileSystemSuccess(fileSystem) { fileSystem.root.getDirectory("/sdcard", {create

If my app's installed on the SD card, is the private data there too?

只谈情不闲聊 提交于 2019-12-07 10:18:45
问题 I am presuming that an app's private data, such as SharedPreferences and SQLite databases, live on the phone's internal storage rather than the SD card, even if the app itself is installed on the SD card. I can't find a simple explicit confirmation of this anywhere. Can someone please confirm? 回答1: Yes, private data reside in internal storage. I've tested this by exploring file system on rooted device. If app is "installed" on SD card, only APK file is stored on card in some encrypted form.

Installing android app on sdcard

断了今生、忘了曾经 提交于 2019-12-07 08:43:10
问题 I developed an app which can install on sdcard or in mobile internal memory. I used android:installLocation attribute set to "auto" . Now the problem I am facing is when I run app on device then it shows me move to sdcard button enabled but when I uploaded the app to market and installed it from market then move to sdcard button is not enabled. Any Idea where I am lagging. 回答1: Make sure your app is not copy-protected : The Application Info screen now has either a “move to SD card” or “move

How to read a file directly from a .zip file without extracting it in android

旧时模样 提交于 2019-12-07 01:32:42
问题 I have been working on android for the past few months, now the problem for me is to read a .zip file placed on sdcard. I have successfully done the coding for downloading the .zip file on the sdcard. I have img.zip file downloaded on to the sdcard. This img.zip contains 5 image files. Now instead of unzipping the img.zip can i directly read its content...??? if yes plz help. I saw few examples over internet but they all say to unzip and then use, i want to avoid that part because i simply

java.io.FileNotFoundException (Permission denied) When trying to write to the Android sdcard

爱⌒轻易说出口 提交于 2019-12-06 18:58:21
问题 I am trying to select an image file from the photo gallery and write to the sdcard. Below is the code that results in an exception. It appears to throw this exception when trying to create the FileOutputStream. I have the following line added to the manifest file nested inside the application element. I can't find a solution to the problem: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> public boolean saveSelectedImage( Uri selectedImage, int imageGroup, int

Android: Write a xml on SD-Card

。_饼干妹妹 提交于 2019-12-06 12:30:18
I have a problem with my android-app. I want to save a Data-list in a xml and save it to SD-Card . Here the code fragment from my activity: Button btnActivity = (Button)findViewById(R.id.modul_save); btnActivity.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Handlerlist templist=new Handlerlist(); //default-constructor for handlerlist Parser_Writer temp_parser=new Parser_Writer(); //default-constructor for praser(writing) templist.add_modul(name, abk, 1, 0, "Hallo", room, 1, 2, 3, 1.3, true); //save input-data in the list temp_parser.write_xml(templist)

Uploading android file by name from sd card

二次信任 提交于 2019-12-06 11:47:36
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. Raghunandan 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(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult

Getting the path to SD card

为君一笑 提交于 2019-12-06 09:40:34
Please read the whole post before down-voting and/or marking it as a duplicate! I'm working on an app that reads files from within a specific folder on the user's phone - either from the SD card (if there's one) or from the built in storage. Yes, the "READ_EXTERNAL_STORAGE" is mentioned in the manifest and I'm also handling the permission popup for API>23. I used to simply use File folder = new File(Environment.getExternalStorageDirectory(), "myfolder"); to get the path of the folder that is stored in the built in storage (32gb for an S7) but now I want to get the path to the SD card.

External Storage Path (SD card) for Android 5.1.1 and later with Cordova

纵饮孤独 提交于 2019-12-06 08:18:53
问题 I am working to develop an android APP with cordova,I wanted to create an folder everyday and store a txt file in it. everything I tried is working for the internal memory of each android but not for the External SD card, have a look and help me out, if(sDeviceVersion=='4.0' || sDeviceVersion=='4.0.4'){ var sPath = 'file:///storage/extSdCard/'; }else if(sDeviceVersion=='4.1' || sDeviceVersion=='4.1.2' ||sDeviceVersion=='4.3.1'){ var sPath = 'file:///storage/extSdCard/'; }else if

Android emulator sdcard permissions

て烟熏妆下的殇ゞ 提交于 2019-12-06 07:32:43
问题 I'm using eclipse and trying to get the android emulator to let me write to the sdcard. when I install the app on my phone it prompts to accept the permission required... and the program works. When I try using the emulator to test the app I don't get prompted and using the program results in permission denied. I've tried recreating my avd... and have the sdcard size set to 4Gb. Obviously I have the uses permission line in the AndroidManifest.xml... and here it is: <?xml version="1.0"