Showing posts with label sdcard. Show all posts
Showing posts with label sdcard. Show all posts

August 26, 2010

install app to sd card in 2.2 (froyo)

-Go here
--http://developer.android.com/sdk/index.html
and get the SDK for your OS
-Once you download it, unzip it to its own folder, I put it off C:\
-Run the SDK Setup.exe
-Click available Packages, on left, I didn't know what was needed so I installed -EVERYTHING. Although I do suspect that we only need the USB driver, which is at the very bottom.
It will take forever to install.
After it's done installing, I Clicked on Installed Packages, and updated all.


Not done yet.
check that the phone is set up to allow debugging via USB (Settings⇒Applications⇒Development⇒USB debugging)
Plug in your phone
Windows will fail to install the driver.
Go in device manager and and update the newly Yellowed entry, the driver is in:
C:\android-sdk_r06-windows\android-sdk-windows\usb_driver
The driver should install

Start console: "Start"->"Run"->cmd->ENTER

> adb devices
if you see a serial number starting with an "H" that means you got things working, now do the following:
> adb shell pm setInstallLocation 2

This command will push ALL apps to your sd card, to revert back to saving apps to internal memory enter in:


> adb shell pm setInstallLocation 0

Source: install app to sd card in 2.2 (froyo)

May 2, 2010

[Solved] Android: Check if SD card is present



  1. public static boolean isSdPresent() {

  2. return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);

  3. }




Source: Android Snippets: Check if SD card is present.

February 20, 2010

[SOLVED] Android: Save bitmap to location


try {
     
FileOutputStream out = new FileOutputStream(filename);
     bmp
.compress(Bitmap.CompressFormat.PNG, 90, out);
} catch (Exception e) {
    e
.printStackTrace();
}


Android : Bitmap save to location - Stack Overflow.