How to mount SD as USB mass storage programmatically

by telematics » Fri, 06 Mar 2009 05:13:54 GMT


Sponsored Links
 Is there anyone know how to mount the SD as USB mass storage from an
android app programmatically when it is connected to a PC? It is
unacceptable for the use case I am working on to ask the user to go to
the "notification" screen to manually click "mount" button. Your help
will be highly appreciated.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Google analytics install referrer problem

I needed to track install information, so i used
com.android.vending.INSTALL_REFERRER intent for google
analytics:
http://code.google.com/mobile/analytics/docs/android/

I have put that intent into manifest as following:

<receiver android:name="com.mycompany.MyReceiver"
android:exported="true">
  <intent-filter>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>
</receiver>


Inside MyReceiver class, i've implemented:

        public void onReceive(Context context, Intent intent) {
            String referrer =
URLDecoder.decode(intent.getStringExtra("referrer"));
            Log.d(TAG, referrer);

            com.google.android.apps.analytics.AnalyticsReceiver
receiver = new com.google.android.apps.analytics.AnalyticsReceiver();
            receiver.onReceive(context, intent);
         }

Then i installed app using generated at
http://code.google.com/mobile/analytics/docs/android/#android-market-tracking
url, and got this in log:

DEBUG/TestApplication(31977):
utm_source=androidmarket&utm_medium=device&utm_campaign=search&utm_term=pname:com.mycompany.test.market&rowindex=0&hl=en&correctedQuery=
WARN/googleanalytics(31532): Badly formatted referrer missing
campaign, name or source
WARN/googleanalytics(31532): Badly formatted referrer, ignored

So, instead of referral data that was given at url generation, i've
got data which looks like i was searching for my app at Market

Does anyone have this kind of trouble, or knows how to help?




-- 

2. You are invited to join Talk2Droid beta test

Hi, folks,
     We are pleased to introduce our new application - Talk2Droid,
which  allows you to remote access your Android phone right from Gmail
web page on your PC. While you are sitting in front a PC, it provides
you  a much more convenient way to do task like  reading incoming text
messages, sending text messages, checking missed calls, or looking up
phone address book, without bother to pull out your phone from your
pocket.
     Search talk2droid in AndroidMarket and follow the on-screen
instructions to activate an account in less than 20 seconds. Have fun.

Regards.

-- 

3. Linkify

4. Cannot Get to My Application in Market as a Developer

5. HTC Development Phone 1

6. Kernel Crash :

7. background and resize option