-2

Can we set a jpeg image as a live wallpaper?

if yes then how? please share some links or code snippets.

Avtar Guleria
  • 2,126
  • 3
  • 21
  • 33

2 Answers2

1

You can read and draw the jpeg on a canvas. Here is a link to an existing post on stackoverflow. Live Wallpaper Tutorial

Community
  • 1
  • 1
Orlymee
  • 2,349
  • 1
  • 22
  • 24
0

Yeah, you just have to decode the bitmap and then draw it on screen.

Bitmap myImg = BitmapFactory.decodeResoource(getResources(), R.drawable.jpegimage);
canvas.drawBitmap(myImg, 0, 0, null);

theres alot of examples covering how to draw on screen just Google it up

Ruuhkis
  • 1,924
  • 1
  • 27
  • 46