How to mount the microSD disk programmatically?

by telematics » Fri, 06 Mar 2009 10:15:05 GMT


Sponsored Links
 I am a new member of this group, and have tried to post this question
twice already and have not seen my post on this forum for a day now.
Moderators, please post it, or if you know this has already been
answered before, please provide me a link.

I want to know how my application can mount the microSD disk as the
USB mass storage upon receiving UMS_CONNECTED.

Thank you in advance.
--~--~---------~--~----~------------~-------~--~----~



How to mount the microSD disk programmatically?

by Mark Murphy » Fri, 06 Mar 2009 10:21:07 GMT


 


You mean like these two?



Sponsored Links


How to mount the microSD disk programmatically?

by telematics » Fri, 06 Mar 2009 11:28:48 GMT


 When I plug the T-mobile G1 phone into the PC via USB, it will give me
a notification "USB Connected", then I can go to the notification
screen to "mount" the SD. So, if this native Android app can do this,
I assume there should be an "unpublished" API for 3rd party apps to do
the same thing. Am I wrong?






> 



How to mount the microSD disk programmatically?

by telematics » Fri, 06 Mar 2009 15:26:26 GMT


 Thank you for the clarification. One more question, the older version
of Android firmware has the "Use for USB Mass Storage" option in the
Settings screen, and I saw android.provider.Settings.System has a
property named USB_MASS_STORAGE_ENABLED, if I set this property, is it
equivalent to the old "Use for USB Mass Storage" option? If not, is
there any plan to add this old option back in the future firmware
release?







> >



Other Threads

1. drawing views on top

Hi All,

I am trying to draw a custom view extending linearlayout and put a
scrollview within that.

I should be able to draw objects on top of scrollview.

But the views which i draw are drawing down the scrollview.It is not drawing
on top layer of scrollview.

I tried with framelayout.But it is not drawing down of scrollview only.

How to make it to draw on top?

I tried using FrameLayout.But still same problem.

Please help.It is very urgent.

I have attached code for your reference.

main.xml
-----------------
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:id="@+id/mylayout"
    >

<FrameLayout      xmlns:android="http://schemas.android.com/apk/res/android"

                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    >


 <com.horizonscroll.TransparentPanel
                android:id="@+id/transparent_panel"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                    android:background="#FFFFFF"

            >

        <com.horizonscroll.ScrollImageView
    android:id = "@+id/scrollView"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"

    />


</com.horizonscroll.TransparentPanel>

</FrameLayout>

  </FrameLayout>


TransparentPanel.java
------------------------------
public class TransparentPanel extends LinearLayout {



     private static Vector<Square> squares;
        private static Vector<Tile> tiles;
        private static Tile movingTile=null;

    private Paint    touchPaint;

    public TransparentPanel(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }

    public TransparentPanel(Context context) {
        super(context);
        init(context);
    }

    private void init(Context context)
    {

         squares=Util.generateBoardSquares();
         tiles=Util.generateTiles(context);


    }

    @Override
    public boolean onTouchEvent(MotionEvent event)
    {

        System.out.println(event.getY());
        int x=(int) event.getX();
        int y=(int) event.getY();


        if(event.getAction() == MotionEvent.ACTION_DOWN){
            for(int i=0;i<tiles.size();i++){
                if(tiles.get(i).isTouched(x, y)){
                    movingTile=tiles.get(i);
                    break;

                }
            }
        }

        if(event.getAction() == MotionEvent.ACTION_MOVE){
        if(movingTile != null){
            movingTile.setX(x);
            movingTile.setY(y);
            invalidate();
        }
        }

        if(event.getAction() == MotionEvent.ACTION_UP){
            if(movingTile != null){
                movingTile=null;
            }
        }



        invalidate();


        return true;
    }

    @Override
    protected void onDraw(Canvas canvas)
    {

      for(int i=0;i<tiles.size();i++){
            Tile tile=tiles.get(i);
            tile.onDraw(canvas,  touchPaint,tile.getX(),tile.getY());

        }

        super.dispatchDraw(canvas);

    }
}

Activity
----------------------

public class HorizoontalScroll extends Activity
{
      public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        requestWindowFeature(Window.FEATURE_NO_TITLE);

        setContentView(R.layout.main);
}
}

-- 

2. Multiple audio channels

Hi all !

 I have to write an application wihich can play multiple audio
chennels. My boss asked me to make some market research how many
device able to play multiple audio channels on the same time.
 Where can I check the android phones hardware capacity, which one can
do this and which don't. What do you think where should I start the
research ? Please , if anybody know about it help to me.

 Thank you: Karoly

-- 

3. problem with AVD manager (last version) on XML verification failed.

4. cara tau HH sudah unlock apa belu

5. Root milestone

6. Use HTTP persistent connection

7. How to get notified when list view is displayed