how to mount the sd card to pc via android application?

by Azreal Yang » Sat, 07 Feb 2009 02:19:49 GMT

Sponsored Links
 i want to access gphone's sd card when the gphone connect to the pc
via usb, but i need click "mount" on there any way
when the gphone connect to pc, then pc can access the sd card?


Other Threads

1. View background question

Does anyone know how to set a View background drawable that clips the
image rather than scaling it (sort of like using a ImageView with wrap-
content instead of fill_parent).

I like to set background drawable and not have it distorted (looks
especially bad when going to landscape orientation).

Is there a way to do this?

Alternatively, is there a way to set an ImageView as a View
background and overlay the other views on it?

Thank you!


2. Accessing SharedPreferences in Services and non-Activities

I have some shared preferences (user_id, email) that I want to access
from services and classes that are not subclassed from Activity.  I
have been trying to implement this today and keep hitting roadblocks.

In particular, when I try to access getSharedPreferences, I get a null
pointer exception.  My code is posted below

My goal here is to allow read access the shared preferences to objects
and (potentially) services that aren't going to be directly exposed to
the user.  Any suggestions/examples that can help me along?

Many thanks,


public class MyPrefs extends Service {
    public static final String PREFS_NAME = "MyPrefs";
    private int user_id;
    private String user_email;
    private String user_password;
    private Editor editor = null;

    private SharedPreferences settings = null;

    public MyPrefs () {

        settings = this.getSharedPreferences(PREFS_NAME,


the this.getSharedPreferences line causes a null pointer exception.


3. SimpleCursorAdapter with rawQuery

4. Unable to do HTTP POST over emulator proxy

5. How I can contribution my Lao localization

6. DNS woes with the emulator

7. Creating a new dictionary for spell correction and word completion