i edited an existing emulator to have an sd card of size 9mb and i added a boolean in the hardware section to support sd card. when i start the app it says "your SD card is full", what do?
First, try making the SD card larger - like, 100 MB - and restarting the emulator. The boolean in the hardware section, IIRC, triggers the preferred location for the application's APK - internal memory or SD card. An APK of 9MB is not that uncommon.
The problem is that your SD card size has been declared too small. Consider the practicability of a user having a 9MB SD card when the whole world is talking in GBs.
Edit the emulator and increase the size, atleast to a hundred as depending upon your application, you might be needing a lot of space.
However, see this post regarding a known issue on SD card size.
Related
HelloEveryone! I want to know some principal thing. Is there exists a method to take a picture (with good resolution) from android device without saving it in hard memory (only in RAM). I tried to:
use TakePicture(shutter, raw, jpg), but resolution of the resulting JPG is very low and RAW working with very few number of devices. Was asked here
give the control to Google Camera, but this way required some temporary file in the hard memory (to write picture)
How can I do this. Or is it impossible? Any help! Thank you!
It depends on your phone. Many phones do not need external sd card because they already have a internal one. So I suggest you check the hardware information of your phone first. If it do not have a external sd card, you can try to use camera2
to take videos and pictures. Pictures and videos can be stored in RAM. But if you want to access the pictures stored in RAM, you need to root your phone first.
When I got a low phone storage error I saw flipboard taken 75mb but programatically I can only see 16mb as the size of data directory.
How to match the size is there something I am missing
I have almost finished writing my app, and i am concerned about the app size. Besides the 876KB res folder and the 1,08 MB assets, the rest of the files in the project are just source code in src (the src is about 80KB). The app can download a ~160KB file from the web. From the app info (in the app settings), says the following:
Total ............5.89MB
App ..............1.79MB
USB Storage app.. 4.09MB
Data ............12.00KB
SD Card.......... 0.00 B
The app is saved on the SD card.
The question is, is there a way to reduce that size? I have already compressed the images I am using and it seems really weird to me that with the size of the folders in the project, the app needs 6 MB of space.
Also, how come the app size is bigger when the app is in the SD card?
Consider using proguard here in your app. With latest tools, proguard is on by default.
Also, do not consider the size of app until you have obfuscated it.
ActionBarSherlock adds about 200KB to your apk size not MBs.
I have created some text files in the SD card, but I am unable to view my files.
I am using this path Environment.getExternalStorageDirectory(); to create files.
I am not getting any exception while creating files.
when I open the DDMS in eclipse I am unable to see my files there also..
If I created the files at
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
then I can see my files at /data folder of the device , but not in SD card itself.
When I click on the gallery icon in my device, I can see only pictures, videos, camera shots folders only but not my files ..
please suggest is that the proper way of creating files in SD card.
thanks.
Environment.getExternalStorageDirectory() doesn't always return the location to an external card. On android tablets (Android 3.0+) this directory is often mounted in the internal memory.
From the docs:
Note: don't be confused by the word "external" here. This directory
can better be thought as media/shared
storage. It is a filesystem that can
hold a relatively large amount of data
and that is shared across all
applications (does not enforce
permissions). Traditionally this is an
SD card, but it may also be
implemented as built-in storage in a
device that is distinct from the
protected internal storage and can be
mounted as a filesystem on a computer.
AFAIK there is no generic way to determine the mountpoint of an sdcard, this is specified by the device manufacturer. For example the ASUS Transformer mounts the external cards in /Removable/MicroSD and /Removable/SD . The "External Storage" directory /sdcard/ is mounted in internal space.
I see how to mount an SD card in the emulator, but I'm not sure how you move files back and forth between the userdata image and the SD card image. Can someone tell me how to do this?
The first thought that comes to my mind is to first transfer the data from the userdata image file to local filesystem and then transfer back from local to sdcard image.
adb pull /data/data/com.example.sample ./sample/
adb push ./sample/ /sdcard/sample/
hope I interpreted your question correctly.