In an Android alarm clock app that I want to develop, I want to allow people to have a custom image as the app's background when it goes off, rather than having the device's stock background, but I don't know how to go about it. It might actually be really simple but I am still a beginner (a shocker I know) so yeah does anyone have any ideas??
Just in case people are getting confused, I DON'T want the app to change the person home screen wallpaper, just the alarms background
I haven't started the app yet because as I said I need to know this one thing before i spend a few weeks developing
Kind Regards
Ryan
I believe this question has been asked multiple times before. Did you try searching the site prior to asking? It is a pretty basic question if you are just trying to change the background wallpaper on Android.
Edit based on your comment: See here.
Related
I'm just looking a way to launch/open an application automatically every time the camera app starts! I know it will something to do with intent. Does someone has some examples to forward to me? I'd also like to add a toggle withing my application settings to enable/disable automatic launch on camera app opening.
Thanks allot, Diego
If you give an example of an app that does something similar to what you described, then maybe we could understand what you mean if we misunderstood.
The fact is, if I understand your question correctly, you want your app to start whenever a user hits starts the camera app on android.
As CommonsWare noted, this is not supported. It would require you to have control over the code behind the Camera app, and even then I'm not sure if you can start other apps from a given app (I believe you can, as I've seen this behavior before)
Short answer is: you can't. You might be able to start the camera app from your app however, but that is a different question.
I have read plenty of questions that deal with an app taking screenshot of the current users screen while the app runs in the background, but have not seen many articles that deal with the app taking a "screenshot" of itself while it runs in the background.
I would like this to be able to be done without having to root the phone in any way as I would like the app I make be available to everyone(rooting is probably not involved in this solution, but just throwing that out there).
The end goal of the app is for the app be able to take a screenshot of itself and save that screenshot as the users background wallpaper. There are several other features I would like to add, but I would just want to know, is this even possible? If this is, could anyone show me some starter code or link me to some?If this question has been asked before, please let me know, otherwise, any and all help is appreciated. Thank you!
Firstly, I am not really sure if I understand your requirement correctly. Ideally when the app is in background, its state when it went to the background and while it is in background will remain the same. So you can take a screenshot of your app, when the app is just going in background, which can be handled in your onPause() of the activity.
To take screenshot of your app, place the entire layout in a ViewGroup and then use the following code.
parentLayout = (RelativeLayout)findViewById(R.id.parentLayout);
parentLayout.setDrawingCacheEnabled(true);
parentLayout.buildDrawingCache();
And when you want to take a screenshot, get the screenshot in the Bitmap by using
bitmap = parentLayout.getDrawingCache();
The above line should be in your onPause() thats when the app goes in background. Or you could also trigger it when your app is in background, and see if it is captured. I'm not really sure how it will work in the latter scenario.
I want to develop an android application that will be an alternative lockscreen.
I searched a lot and i couldn't found an explanation about how to make an app to work like a lockscreen. I understand that there is no official android API for lockscreens, but there must be way, because there are a lot of alternative lockscreens applications in the market.
Does someone know how could i make my app work like a lockscreen? Or if there is a basic code out there of lockscreen app that i can learn from it how to do it?
Thanks a lot (:
The way this is usually accomplished is creating an app that becomes the home application and then when the screen is turned on display your custom lockscreen and hide it when the user successfully unlocks it so they can use the device.
Make sure to take a look at the numerous questions on SO that are very similar to this.
I am very new to android development. I wanna create a app thats like a ticker on android tablet. But when the user clicks on any other application, i still want my ticker to be visible and the other app to resize and occupy rest of the screen only.
Somebody told me that this is not possible. Is it the case ? Anyone know of any similar app ? or somehow plz get me started with this ?
Thanks for your help.
Cheers
It is not a good idea steal screen space from other applications. If your ticker is floating above like modal window, it would probably block some views for the user.
If your app is competing for the screen space, the other app would probably look ugly.
My suggestion is that you rethink your application, and follow the user interface guidelines.
Good luck!
I believe this isn't possible. Even if, it isn't a good idea. If you want something like that consider creating a widget or some kind of notification. That would be the best and a lot of applications use notifications like that.
what you want to do is creating a system type of window,such as PHONE_WINDOW,make your app flowing on the up-layer of other normal window.
You may read this post
http://www.apkbus.com/android-77789-1-1.html
I need a little bit of help and I'm hoping that someone can point me in the right direction. I want to do something that I thought would be simple.
Keep in mind that I'm new to Android development so this answer may seem clear and apparent to some.
I want to create a slideshow of my images that people can download from the app store. The images should change every few seconds and the images will be installed on the home screen. I know how to create animations and I know how to create an application that displays images that change after a few seconds. However, I do not know how to set this up so that it can be displayed on the home page!
What I have right now is an app whose icon you have to click on to launch it. How can I modify my app so that the user could install it and have the slideshow display in the background of the home screen?
I have looked all over and I find examples of Live Wallpapers, but my images are all static. I would REALLY appreciate it if someone could point me in the right direction or offer the location of a tutorial I can read through.
Thank you so much!
You want a live wallpaper: see http://www.codeproject.com/KB/android/AndroidLiveWallpaper.aspx for a guide.