I try to create live wallpaper with libgdx framework. Here's my source code: repository
When I run this, black screen with name of the app appears (probably empty android layout). Main game is not called. I think that it is because starting a service not an activity. However how could I start an activity when AndroidTestWallpaper isn't subclass of Activity class? I used this tutorial but I don't think it's complete, in this form my IDE (Intellij IDEA) doesn't let me to run the app because no main Activity class is found.
So what is the proper way to implement and run live wallpaper in libgdx? How should I edit my code?
EDIT: So I made it work now - I run the app and I can see some graphics but how to make live wallpaper from it?
EDIT 2: I've finally made it work, you can find new version in repository from first post but I still have one problem - when I start the Wallpaper, following exception occurs:
01-05 20:31:53.102: ERROR/AndroidRuntime(3681): FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to resume activity {com.reinto.wallpaper.test/com.reinto.wallpaper.test.AndroidStarter}: java.lang.NullPointerException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2823)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2862)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$600(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:4977)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.badlogic.gdx.backends.android.AndroidApplication.onResume(AndroidApplication.java:247)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1236)
at android.app.Activity.performResume(Activity.java:4620)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2807)
... 12 more
But I can continue with selecting the wallpaper and I can make my wallpaper active. However this error is bothering.
EDIT 3: It's finally working. Solution of previous exception is that AndroidStart should extend Activity class not AndroidApplication.