08-26-2011 12:34 AM
hi friends,
i saw in some third party applications they are directly opend default phone gallery and they are taking that images to that application. how can i do that task please help me
Thanks in advance.
08-26-2011 01:27 AM
try this...................
_filePicker = FilePicker.getInstance();
try
{
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
FilePicker fp = FilePicker.getInstance();
FilePickListener fileListener = new FilePickListener();
fp.setListener(fileListener);
fp.show();
}
});
}
catch (Exception e)
{
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
Dialog.alert("Please check your data card..");
}
});
}
//FilePickListener class
class FilePickListener implements FilePicker.Listener
{
public void selectionDone(String str)
{
// FileConnection file = (FileConnection)Connector.open(str);
byte[] data= getData(str);
Bitmap img=Bitmap.createBitmapFromBytes(data,0,data.lengt
} catch (IOException e) {
e.printStackTrace();
System.out.println("===================Exception: "+e.getMessage());
}
}
private byte[] getData(String url)
{
byte[] data = new byte[0];
try
{
FileConnection file = (FileConnection)Connector.open(url);
int fileSize = (int)file.fileSize();
data = new byte[fileSize];
InputStream inputStream = file.openInputStream();
inputStream.read(data);
}
catch(Exception e)
{
System.out.println(e.toString());
}
return data;
}
}
08-26-2011 01:30 AM
Thank you for the replay.
is this filePicker supports from 5.0 right but my app starts from 4.2
and please give me the picture paths means sd card path and internal memory card path.
please replay me
08-26-2011 02:19 AM
hi
please give me the image gallery path
please urgent.
Thanks in advance.
08-26-2011 02:26 AM
08-26-2011 02:32 AM
thank you sandeep
i want the default image gallery path.
in that it will contains all images means internal images and sd card images, and camera options
i want to open this link it's in media->pictures
08-26-2011 02:36 AM
08-26-2011 02:38 AM
08-26-2011 02:39 AM
Thank you for the replay sandeep
i saw in some appliations they are showing the images exactly prevously i am explained in that way they are showing images.
08-26-2011 02:40 AM
sandeep i tried that
i am not getting that images.