kloverde / android-libgdxlivewallpapertemplate Goto Github PK
View Code? Open in Web Editor NEWGet a libGDX-powered Android live wallpaper up and running quickly with this project template
License: Other
Get a libGDX-powered Android live wallpaper up and running quickly with this project template
License: Other
I've noticed this sample too, of showing a video using LibGdx:
https://github.com/libgdx/gdx-video
It doesn't seem to "fit" what's shown there, meaning that here it has a function of "render" that needs to be called all the time.
Yet there it's quite automatic, as it binds to the MediaPlayer, and seem to use a different function, of "update" instead, probably to prepare the next frame.
Is there really a way to use LibGdx to show a video on a live wallpaper?
Could I also make it translate (move) horizontally, as you scroll (using offsetChange
), and scale it accordingly to have something like scale-crop of images on Android?
I've looked at the logs and can confirm all of them work fine and appear for me, except for "pause".
When does it occur?
To overcome this, here's a workaround which I hope it's valid (though for some reason sometimes it calls multiple times even though it switched just ones) :
class LibGdxWallpaperTemplateService : AndroidLiveWallpaperService() {
override fun onCreateEngine(): Engine {
return object : AndroidWallpaperEngine() {
override fun onVisibilityChanged(visible: Boolean) {
super.onVisibilityChanged(visible)
Log.d("AppLog", "onVisibilityChanged:$visible")
}
override fun onPause() {
super.onPause()
Log.d("AppLog", "onPause")
}
override fun onResume() {
super.onResume()
Log.d("AppLog", "onResume")
}
}
}
Should I report this to LibGdx, or is it an issue only here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.