Openning Wallpaper application from my button - android

How can I open the system wallpaper application from my application (in a button click)?
Can I wait for a result, just like we do for browsing images?
Let me be a bit more specific:
My application changes wallpaper depending on battery level. So from more than 75% I use one file, more than 50% show another, and so on...
To do that I allow the user to browse for the image file he/she wants openning a file browser and select the file. For this there is a button with the text "open browser". I wait for results and get the image.
Now I am trying this:
I want to let the user click on another button with the text "open wallpaper picker" and would like to open that (system default wallpaper picker). Then I will wait for the result, take the new wallpaper and save it to a file for using again when battery gets to that level further times.

You could try using WallpaperManager to get the current wallpaper. Not sure how you could prompt for the standard wallpaper picker though.
Another approach is to just use the generic image picker (which is the approach used in this answer to a similar question)

Related

browsing through android gallery only when button released

I have bluetooth remote control which I use for browsing trough android gallery. I want it to
change only one picture every time even if I'm clicking and holding the button.
I did not try anything. I expect to find out if it is possible to change picture only when
rleasing the button (so that every click will change only one picture even if I click and hold
the button)

android java how to access welcome image and video when restarting the device?

I have android box mbox and when I turn on the box it show at first 10 seconds one video or GIF image like welcoming the user to the android system, then the main menu is showing after that.
My question is how can I access this video or welcome GIF to change it ? i need to override this with another one
Hope someone get what i need exactly

Android, preview of minimized app in task switcher [duplicate]

I'm wondering how to customize the Image for My App to Home Screen image when My app is in background mode, that is when user navigates between Apps in recent apps option where a small screen shot for all running apps is visible.
Eg: Image Attached for more clarity.
See the following questions:
Is there a way to change the thumbnail of an app in the android task
switcher (long press on home button)
How to force app to create
thumbnail (snapshot) for recent apps list?
How do I prevent
Android taking a screenshot when my app goes to the background?
So theoretically there are two potential solutions:
Override Activity.onCreateThumbnail() to customize the thumbnail.
Add FLAG_SECURE to the window to prevent thumbnails (and screenshots).
Activity.onCreateThumbnail() sounds awesome until you realize it's been broken since Android 4.0.3 when the method call was commented out. See above posts or be direct, see the Android source code:
// First create a thumbnail for the activity...
// For now, don't create the thumbnail here; we are
// doing that by doing a screen snapshot.
info.thumbnail = null; //createThumbnailBitmap(r);
Currently, there is no easy way to customize the thumbnail.
So that really only leaves FLAG_SECURE. This doesn't allow you to customize the thumbnail, but rather prevents it, e.g. password forms and sensitive information. There's a downside to using the flag- it will also prevent screenshots, screen capture, and mirrored displays.

Display an Android live wallpaper in a fragment

Is there any way to display an Android live wallpaper in a fragment? I have a live wallpaper, and currently if the user wants to change some settings, they need to click settings, make a change, hit the back button, and see if the change is what they want. For certain wallpapers, the user doesn't exactly know what numbers they want, and usually they figure out the settings through experimentation, so the current method of going back and forth between the settings and the preview is a pain.
Right now a lot of the settings are in the form of a slider fragment that I wrote. I was wondering if it is possible to include a preview of the wallpaper in the fragment that will change live with the slider?

set android app background to picture or live wallpaper

I was recently told to convert my flash app over to a tablet. So I only just started coding in the java language.
I am going to have a default picture set as the background. However, if the user wishes they would be able to change the the background to a picture contained on their tablet. So it would change the background at that point and load it at that point when started next time. If they later delete the picture, it would go back to the default.
To top it off, my boss who knows nothing of coding thinks it would be easy for me to "allow those cool live backgrounds in a similar fashion" ... As if learning a new programming language was not difficult enough...
Any help or pointing to various tutorials/resources that I would have to merge to effectuate this would be greatly appreciated
Jc
For live wallpapers, you can only show the current live wallpaper that the user has global selected for the device (or static wallpaper if that is what they selected). This is done by setting the theme of your activity to Theme.Wallpaper. For example, in onCreate() do Activity.setTheme(android.R.style.Theme_Wallpaper) or doing in your manifest

Categories

Resources