jeudi 28 juillet 2016

How to use a secondary Activity in a LiveWallpaper Engine

I have a class activity that make a graphic animation (MainActivity) in an AnimatedView. Work great as an app, BUT... I want to launch this activity inside a Live Wallpaper and use it like a Animated wallpaper. Is possible?

I try this simple code but don't work:

public class LiveWallpaperService extends WallpaperService {

private class LiveWallpaperEngine extends Engine {

    Intent myIntent = new Intent(".MainActivity");
    startActivity(myIntent);

}
}

@Override
public Engine onCreateEngine() {
    // TODO Auto-generated method stub
    return null;
}

Aucun commentaire:

Enregistrer un commentaire