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?
Related
I'm trying to use Presentation class to make an app that has a remote-controlling UI on smart Phone and video playing on secondary display.
I know how to display directly on my secondary one, but have no idea how to go back to normal mode. Is there any code I can take a look at?
have no idea how to go back to normal mode
Call dismiss() on the Presentation. If your app does not have an active Presentation, and if nothing else is talking to the secondary display, the default mirroring should return.
I was wondering if is it possible attach a widget to the main Android background/wallpaper/desktop?
I want develop something like a clock, actually It's a very simple widget that have three buttons. This is quite different from another desktop-widgets-like, all the widgets that I've seen are like a customization of the Android wallpaper, or a customization of the Android unlocker, but this is rather different.
If it is possible, do you know some sample code source?
Not sure what "background/wallpaper/desktop" really means, as "background" is too wide term, "wallpaper" may be either static bitmap or live wallpaper, "desktop" means nothing on Android (did you mean Launcher by any odd chance?). If you meant live wallpaper, then you cannot have full functionality in Live Wallpaper you have on Launcher, but if "three buttons" means you want to allow user to tap certain area and react on this, then it should be not a big problem - you can use onTouchEvent() to receive taps from user and act accordingly. If you meant Launcher then well, "yes". For any other options "no" or "most likely no"
I am building an Android app that uses the phone's camera feature. I know there is a way to build a custom camera view. Instead, I am choosing to use the camera app via an intent and not build my own camera view. I want to disable/make disappear the pause button while taking a video and have just the stop button. I looked up the Camera API Guide at www.developer.android.com but it doesn't talk about how I could do this. Does anyone know a way to do this?
I doesn't think that this is possible. Using Intents is just a way to tell Android "hey, I'd like to take a video (photo, see MapView, etc). Can you do it for me?". It may trigger one or MORE Apps listening to that Intent, depending on what apps the user has Installed. Usually you can only choose very basic options via Intents, i.e. take video/picture or tell the MapView at which Position it should show up. These options usually also appear inside the App during normal use. I never see a "CustomCamera-App" that hasn't a pause Button, or where one is able to deactivate it inside the menu. Therefore the chances that it is possible to set that special option tends to zero.
I have an app which basically loads a URL. The page on this URL has a few buttons to control few things.
Now, I want to make a Live Wallpaper app which will set my app as the live wallpaper. Is it possible to do so?
If it is not possible, then can I open the required URL when I try to set Live Wallpaper?
So, ultimately, I want to set my app as the Live Wallpaper. This will need me to open the URL and set the opened page as the live wallpaper.
Thank.
Sagar.
I'm sorry but i'm afraid it's only theoretically possible, not practically. Previous user was right, you can respond to touch events in a live wallpaper and you can connect to the internet - yes.
But please let me expand this:
recreate your app UI in the wallpaper
you don't get any windows or views in your live wallpaper app;
you don't get any buttons or responders in your live wallpaper app;
Only preference activity is an activity but it is really an optional view to visit for user.
All you have is a surface which you can draw on using either OpenGL or Canvas. It would take you to re-implement browser in you live wallpaper using only what Canvas gives you.
You can respond to touch events in the live wallpaper (http://stackoverflow.com/questions/4298458/android-live-wallpaper-touch-event-hierarchy) and so you could recreate your app UI in the wallpaper, and respond to the touch events on the buttons manually (by comparing the location of the tap with the boundaries of the button images and responding if a button is "pressed").
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