We are about to switch to a new forum software. Until then we have removed the registration on this forum.
If I develope a normal android app, and I have the apk of a live wallapper saved into a folder of my normal app, how can I set/preview the live wallapper from the normal app?
I have coded some android live wallappers with processing in the mode showed in this image but the wallappers i create can be set or previwed only by an external app.
Answers
Maybe this next link might help? http://android.processing.org/tutorials/wallpapers/index.html
Kf
No, i have already read that. It doesn't concern my question
So my understanding is that you could run your wallpaper as any other app only if you set it to run as an app. If you set it as a wallpaper, then you will have to load it on your phone and go through your device's wallpaper selector.
Kf
I know this, but i don't want to create a simple live wallapper to be set by the android wallapper selector. I want to create an app that allows me to set my live wallappers saved in a folder of my app
http://stackoverflow.com/questions/20053919/programmatically-set-android-phones-background
that's about images and from 2013 so i've no idea how useful it is.
google 'set android wallpaper programatically'. answer will probably involve the WallpaperManager class and the SET_WALLPAPER permission.
that said, i'm seeing a lot of things saying that it's not possible for live wallpapers. and that the best you can do is to call the wallpaper chooser for the user to choose. you cannot force one without user input.
Thank you @koogs but that link isn't explicative enough
@sarrio===
@koogs is right; you cannot change wallpaper yourself (your app): only the user can do that and that is normal! - You can only create a new live wallpaper then "suggest" to the user to use it (showing the beautiful result in your app...) and asking to open the wallpaper selector service...
Yes @akenaton, that's what I want. Now my question is : the live wallapper must be installed on the sistem to be seen from the live wallapper selector. How can a normal app install a live wallapper? And how can i set some parameters from the normal app?
@sarrio===
Sorry, till now i never used the android processing mode for wallpaper; i have tried today with the example given (circles); at the end i get only an alert message saying that i have to use the selector; not time enough to understand how this lib is supposed to run
yet i know how to set wallpaper wit android native code; here a snippet you can try (with your image)::
//Manifest permissions set wallpaper && wallpaper hints
Thank you @akenaton , but i need to set a LIVE wallapper, not an image
@sarrio=== that is the same (supposing that you have already your wpm installed) - and of course in this case all my code for bitmap is useless)
Intent intent = new Intent(WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER); getActivity().startActivity(intent);
this works easily with AS or eclipse; the problem i see is that it seems that p5 closes the app with its dialog; if it is so i cannot see when i can call the intent without modifying the library itself!