All you have to do is call setWallpaper(), you do not need to
broadcast any intent, this will be done for you.

On Thu, Jul 9, 2009 at 11:56 PM, android.vinny<[email protected]> wrote:
>
> HI Every One
>
> I have To set Wall Paper In application by writing the code
> programmatically.
>
> when i press the Grid view Image will get full screen ..... that image
> i should keep as a wall paper in the android mobile screen
>
> how can i do that in programatically.
>
> I have done some thing like this ....
>
> is it correct or any other way to do it
>
> NotificationManager nm = (NotificationManager)
>     getSystemService(NOTIFICATION_SERVICE);
>     try
> {
>          Bitmap newwallpaper = Bitmap.createBitmap(null, 320, 240,
> mCurrentSelectedImage, mCurrentSelectedImage, null, true);
>          Canvas myCanvas = new Canvas
> (newwallpaper);
>          mImage.get(mCurrentSelectedImage).draw(myCanvas);
>          setWallpaper(newwallpaper);
>          broadcastIntent(new Intent
> (Intent.ACTION_WALLPAPER_CHANGED));
>          Toast.makeText(PhotoView.this, "" + nm,
> Toast.LENGTH_SHORT).show();
>
>     }
> can any body give me suggestions regarding this ...
>
> Thanks in advance.....
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

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

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to