Hello,
Thanks for the info. I tried your suggestion, and it does 'appear' to
work stepping through the code in the debugger but afterwards this
causes com.android.camera to crash with a null pointer exception.
Have you seen this? I started a new thread on this but should have
kept it in this thread, sorry ... more details here
http://groups.google.com/group/android-developers/browse_thread/thread/19c1b6b743e15782/1ba60b4bd691c225
This is the code I'm using. Any tips would be appreciated. Thanks.
Bitmap bm = BitmapFactory.decodeFile("/sdcard/test.jpg");
String test = Images.Media.insertImage(getContentResolver(), bm,
"title", "desciption");
On Feb 10, 10:41 pm, gjs <[email protected]> wrote:
> Hi,
>
> I have successfully used
> android.provider.MediaStore.Images.Media.insertImage() to insert
> images, which then turn up in the picture viewer after a few seconds,
> see -
>
> http://developer.android.com/reference/android/provider/MediaStore.Im...
>
> Maybe also have a look at -
>
> http://developer.android.com/reference/android/media/MediaScannerConn...
>
> Regards
>
> On Feb 10, 5:12 pm, Freddy <[email protected]> wrote:
>
>
>
> > ok, thanks, I got the picture viewer to spawn but it doesn't display
> > any new pictures since the viewer was run the first time. If I reset
> > the phone (i.e. the picture viewer is forced to restart and rescan
> > pictures) and launch the viewer again then the new pictures are
> > displayed as expected (so this is a caching issue).
>
> > Does anyone know how to force the picture viewer to rescan photos when
> > it's being brought back to the front view? Some sort of Intent flag
> > maybe?
>
> > Thanks.
>
> > On Feb 9, 12:25 pm, Mateo Aeon Ortega <[email protected]> wrote:
>
> > > The Activity I think you are looking for is:
> > > com.android.camera.ImageGallery2
>
> > > On Feb 9, 12:09 pm, Freddy <[email protected]> wrote:
>
> > > > I don't want to re-inventthe wheel and would like to use the existing
> > > > android picture viewer. I've found some intents to launch built-in
> > > > android app such as the dialer
>
> > > > Intent intent = new Intent(Intent.ACTION_MAIN);
> > > > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> > > > intent.setClassName(this,
> > > > "com.android.phone.Dialer");
> > > > startActivity(intent);
>
> > > > but have not found one for launching the picture viewer. How do I
> > > > launch the android built-in picture viewer app?
>
> > > > Thanks!- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---