FileChooser on Android

by ANDREA P » Sat, 28 Feb 2009 19:26:34 GMT


Sponsored Links
 Hi,

Is there a FileChooser for Android ???

Because I want to select a file from File System and after send it.


Thanks !!!!!!!!!!
--~--~---------~--~----~------------~-------~--~----~



FileChooser on Android

by Mark Murphy » Sat, 28 Feb 2009 23:38:56 GMT


 


As a widget, no.


Consider using OI File Manager from OpenIntents.org:

 http://www.openintents.org/en/node/159 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 

Android Training on the Ranch! -- Mar 16-20, 2009
 http://www.bignerdranch.com/schedule.shtml 

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


Sponsored Links


FileChooser on Android

by ANDREA P » Sat, 28 Feb 2009 23:46:35 GMT


 In my code I want to open a File Chooser from a button , because when
I click the button in the program i can choose a file from Android
file system...

Thanks......





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



FileChooser on Android

by Mark Murphy » Sat, 28 Feb 2009 23:51:00 GMT


 


That's fine. Consider using OI File Manager from OpenIntents.org, as it
"also acts as an extension to other applications to display "Open" and
"Save" dialogs."

 http://www.openintents.org/en/node/159 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 

Android Training on the Ranch! -- Mar 16-20, 2009
 http://www.bignerdranch.com/schedule.shtml 

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



FileChooser on Android

by ANDREA P » Sun, 01 Mar 2009 00:08:47 GMT


 Thanks !!!!!!!!!!!!!!!





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



FileChooser on Android

by Dianne Hackborn » Sun, 01 Mar 2009 04:40:58 GMT


 Generally the correct way to do this is start a chooser activity for the
GET_INTENT action with the MIME type you want (or */* for all MIME types).
This will allow the user to pick from all of the apps that manage data, and
use their picker where appropriate.  For example, this allows them to browse
through their images as pictures to pick one of those, or even do ad-hoc
things like record a sound that will be returned.

You really shouldn't be using something like IO File Manager directly.
Instead, that thing should publish as handling GET_CONTENT of any MIME type,
so if the user has it installed they can use it to pick what they want, in
addition to the other types of content available.

 http://developer.android.com/reference/android/content/Intent.html #ACTION_GET_CONTENT









-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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



FileChooser on Android

by AKD » Sat, 07 Mar 2009 10:53:31 GMT


 hi,
          i am very new to android, and want to do the same task i
followed the link posted by Dianne Hackborn but not get much success
yet. can anybody help me, it will be great help if someone can expain
by using an example code.
Thanks....








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



FileChooser on Android

by Peli » Sun, 08 Mar 2009 21:43:51 GMT


 Hi Dianne,

Currently, OI File Manager supports the newly introduced intents
PICK_FILE  http://www.openintents.org/en/node/164 
and
PICK_DIRECTORY  http://www.openintents.org/en/node/165 

Both return a "file://" URI instead of a "content://" URI. This is
useful in cases where the user wants to choose a directory on the SD
card (to put several files into), or a file name on the SD card (like
in a "Save As..." dialog).

But it is a good suggestion that we should additionally support
GET_CONTENT + "*/*" for existing files.

Peli
www.openintents.org







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



FileChooser on Android

by Peli » Sun, 08 Mar 2009 21:45:21 GMT


 Here is a test application for OI File Manager:
 http://code.google.com/p/openintents/downloads/list?q=testfilemanager 

The description is given at the bottom of this page:
 http://www.openintents.org/en/node/159 

Peli
www.openintents.org








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



Other Threads

1. CPU cost of a semi-infinite loop

Hi,

I'm working on a metronome application, so I need a rather accurate
time-measuring system to fire the metronome sound at the right time.
Actually I found a solution, but I'm wondering if my method will not
be cpu consuming. Here is the code snippet :

     t = new Thread() {
        public void run() {

          long neededTime = 0;
          while(isRunning){

            long curTime = SystemClock.uptimeMillis();

            if(curTime>=neededTime){

              neededTime = curTime + (60000/tempo);
              playSound(clickSoundId,100);

              incrementBeat();

              mHandler.post(mUpdateUi);
            }
          }
        }
    };
    t.setDaemon(true);
    t.start();

You can see I set up a semi-infinite loop with rather frequent
accesses to uptimeMillis() . I chose this method after having some
issues with sleep() which is not accurate enough. When I want to stop
the metronome, I just have to set isRunning to false.

How can I evaluate the impact of this on CPU and battery ?

Thanks a lot.
Rgds, Alex

-- 

2. Start default email client

Hi at all,

How can I make a intent to start the default email client?
I would like to set the receiver address of message..

Thanks!

-- 

3. Need Android Service suggestions

4. can not find draw9patch.jar after updating to 2.3

5. Prevent user from removing accounts

6. Problem while loading phone contacts in ascending order

7. Does camera of emulator support digital zoom?