-1

Hi playing it fast and lose (which is my coding style;) I've basically created all the functionality i need, but in the wrong context.

I currently have an activity class that receives gps data from multiple sources, and based on that data creates 6 grid views holding fragments. these fragment contain an image view and and frame animations that are changing depending on the data that is passed to them from gps when they are created.

the whole point of this is to run it as a live wallpaper. But checking around for help, i cant find anything that shows me if its even possible to inflate fragments in an activity as a live wallpaper.

if anyone can point me in the right direction, or tell me that i have to rethink the logic i would appreciate it.

Erik
  • 3,598
  • 14
  • 29
  • I understand from research that the live wallpaper uses a canvas but is the functionality I'm talking about even possible ? receiving data from gps, and staring 6 different animations. these 6 animated objects carry 5 unique animations that should be able to play regardless of each other. – Daniel Wennberg Mar 11 '15 at 21:24

1 Answers1

0

A live wallpaper is not an Activity, its a Service and not meant to display fragments, layouts etc. My idea of a rough design for something like that is you would have to get your GPS data from a service like LocationListener and feed your WallpaperService that data. Then you would have to draw everything on the canvas including your animations, so to make it simple : Its definitely possible but you cant simply use your Activities,Fragments,Layouts and their animations in a live wallpaper, you would have to draw everything on a canvas. Another possibility is using AndEngine, but thats a different story. Hope that helps and good luck!

A Honey Bustard
  • 3,433
  • 2
  • 22
  • 38
  • thank you for your answer. I built the app with bitmap factory in the wallpaper engine that implements location listener. Its up and running for testing now and is working well thus far minus some more stupid problems that is inherited when working with a service app. – Daniel Wennberg Mar 30 '15 at 16:43