sd-card

can android load dll's from sdcard in native mode

牧云@^-^@ 提交于 2019-12-05 09:16:30
I want to port a program I wrote to android. The program is in c++ on windows and linux. The program uses dll's for a plugin architecture. New plugins can be added to the program by downloading a dll which the program loads from a specific folder. My question is... Is it possible to download dlls built for android to a directory on the sdcard then from native code load and use those dll's I think not, external storage is mounted with option noexec. You can load libraries from app's private directory . 来源: https://stackoverflow.com/questions/3170619/can-android-load-dlls-from-sdcard-in-native

Android: How to load image into Bitmap

不问归期 提交于 2019-12-05 07:21:45
问题 I am able to load a resource image, from drawable folder, into a bitmap and even scale fine, however now I have a need to load an image from any stored on the SD-Card and I can see this will allow me to view and select; startActivityForResult(new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI), 1); However so far I have been unable to find out exactly what data is returned and how to load it into a bitmap. UPDATED: This is now what I got; @Override

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

瘦欲@ 提交于 2019-12-05 05:19:35
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 want to set the images for an imageview. ImageView imv = new ImageView(this); imv.setImageURI(Uri.parse("

Accessing Storage on the Nook

社会主义新天地 提交于 2019-12-05 00:51:47
问题 The closest thing to documentation I can find having to do with file storage is this post (see below if you can't access it), but it leaves me with several questions. I would really, really, really like a knowledgeable explanation of what paths map to what storage here, seeing as how we're supposed to hard-code them, and how precisely we're expected to access them. An actual code sample would be superlative. My best guess from messing around with this is that: /sdcard-> maps to the internal

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

懵懂的女人 提交于 2019-12-04 22:46:26
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 imageNumber ) { boolean exception = false; InputStream input = null; OutputStream output = null; if(

I need to be able to store sound files for my application on sdcard

好久不见. 提交于 2019-12-04 21:51:15
I've read a lot of topics but none seem to cover what I need. I basically have a load of sound files and I want to be able to play them in the application from the sdcard. I also want to be able to install them there in the first place when the application is installed. I am using Eclipse with the android SDK and currently my Target project is v1.6 Can anyone help? Thanks MrCloister OK so I found the answer! First we need to get the external Storage Directory to a variable called baseDir. String baseDir = Environment.getExternalStorageDirectory().getAbsolutePath(); Then Create the directory

uploading docx,doc and pdf file to sharepoint online from native android app

馋奶兔 提交于 2019-12-04 18:07:04
I am developing an android app to remotely access sharepoint online.I am able to upload files using http put method and view them but i am not able to open them.I feel i am not specifying the proper content type.Here's my code: try { File sdcard = Environment.getExternalStorageDirectory(); //Get the text file File file = new File(sdcard, "gps.doc"); FileInputStream fIn = new FileInputStream(file); BufferedReader myReader = new BufferedReader( new InputStreamReader(fIn)); String aDataRow = ""; String aBuffer = ""; while ((aDataRow = myReader.readLine()) != null) { aBuffer += aDataRow + "\n"; }

Android emulator sdcard permissions

懵懂的女人 提交于 2019-12-04 13:49:11
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" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="j**.B********

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

谁都会走 提交于 2019-12-04 12:27:02
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(sDeviceVersion=='4.4' || sDeviceVersion=='4.4.4'){ var sPath = 'file:///storage/extSdCard/'; }else if(sDeviceVersion

preventing a crash when someone mounts an Android SD card

你离开我真会死。 提交于 2019-12-04 11:11:46
I have a file open on the SD card. When someone mounts the SD card, it winds up crashing my application. I am trying to register for the ACTION_MEDIA_EJECT broadcast event, and i receive that, but it seems like i'm getting that too late. By the time I get that, it's already crashed my application. Is there any way to get notified before crashing my application? Added some very simple sample code. When I do this, it winds up crashing the service when I turn on USB (MSC mode). Test.java /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) {