allow a user to select an image from the sd card or internal

All your problems with Audio, Video and Images.

allow a user to select an image from the sd card or internal

Postby markblue777 » Sun Jun 14, 2009 9:33 pm

Hi all,
I am very new to android development and i am trying to make a little app that will let a user select an image they have from an existing library (from there sd card or internal memory) as i am fairly new to android as a whole i was just wondering where the users images are stored (are they just on the sd card) .

anyway if some one can point me in the right direct so i can let the user browse a list of there avliable images i would be very greatful

by the way i know how to get access to the path of the external storage and i sort of no how to interface with the camera. However i just need to know how i can look through the users image file to present it back to the user so they can choose an image to pick.
Regards
Mar
markblue777
Freshman
Freshman
 
Posts: 2
Joined: Sun Jun 14, 2009 9:08 pm

Top

Postby markblue777 » Tue Jun 16, 2009 7:37 pm

has anyone got any thoughts on this as it is holding me back
markblue777
Freshman
Freshman
 
Posts: 2
Joined: Sun Jun 14, 2009 9:08 pm

Postby Mr_Tremor » Wed Jun 17, 2009 1:04 am

I am not all that helpful but you can view the file structure in the emulator by accessing the shell using "adb shell" and then basic directory listing commands or if you are not familiar with those commands you can install the filebrowser 2.0 tutorial and use the interface to check the directory structure.
Mr_Tremor
Developer
Developer
 
Posts: 26
Joined: Tue Jun 02, 2009 6:35 pm

Postby teammobile03 » Wed Jul 01, 2009 12:48 pm

Hi markblue777,
Are you able to find the solution?I have the same problem.Even I want to access the files from internal storage.Not able to retrieve yet.Soplease kindly help if u have any information.

Thanks and Regards,
teammobile
teammobile03
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jul 01, 2009 12:03 pm

Postby yeshwin.nvs » Tue Jul 07, 2009 1:57 pm

Android File Explorer supports Following :
data,sdcard,system.
data is phone internal storage..(check it)

here we insert the images through adb shell by using the command: adb push sourcepath /data/Photos/
before push the file, create photos directory ..
And Through SDCard also same ...you give the lFilepath as /sdcard/photos/

Here is the code to select images and displaying them
Code:
final int lPosition = aPosition;
final String lFilePath = /data/photos/;
final String[] lListofNotes = new File(aFilePath).list();
List<String> entries = new ArrayList<String>();
for(int i=0; i< lListofNotes.length; i++)
{
entries.add(lListofNotes[i]);
}

if(lListofNotes.length > 0)
{
ArrayAdapter<String> lSimpleAdapter = new ArrayAdapter<String>(context,android.R.layout.simple_expandable_list_item_1, entries);
iListOfItemsView = new ListView(context);
iListOfItemsView.setAdapter(lSimpleAdapter);


iListOfItemsView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
public void onItemClick (AdapterView<?> parent, View view, int position, long id)
{
//Fake Code
}
});

}
yeshwin.nvs
Freshman
Freshman
 
Posts: 8
Joined: Mon Apr 13, 2009 10:43 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 22 guests