I was wondering if there was a way I can have part of my screen in android constantly display something, even something as simple as a piece of text or an image. I am fairly familiar with Android Development, so if there is a way to make an app that does that, it'd be great.
To be precise, I want the top third of my screen to stay constant, and the bottom two-thirds to work normally such that I can do anything I can normally do
Edit: I want the top third to display the constant text/image even if I exit the app. A widget is a good idea. I'll look more into that.
Related
I'd like to create an Android app that can modify the whole display, even when the app is not being used directly. This is one example of an app that seems to do this.
Ideally, I'd not only want to be able to tint the screen, but to perform arbitrary operations on the pixels being shown on the display, ranging between making the entire screen a solid color, inverting the colors (so that e.g. black becomes white), and blurring the screen. (I could imagine this level of access in the wrong hands could make somebody's phone unusable, so maybe not all of these are possible.)
Any pointers on how to do this?
You want to let your app draw over other apps. There is a special set of requirements for such applications.
Take a look here and here.
There is also a simple tutorial.
And an opensource app, that looks pretty similar to one you've linked above.
I'm looking for a way to get the contents of the screen in android but not for taking a screenshot.
A little background, I recently broke up with someone and want to create an app that will "censor" photos of her (ie: just pixelate them). I know how to write a training algo to be able to detect her, and I can write a service in Android that will just run in the background, but I've not yet come across a way to get the screen contents. My thought was to look at the screen and if she shows up in Instagram, texts, or any app, just pixelate that portion of the screen (or put a black square over it or whatever).
Unfortunately the android docs haven't helped me much, so does anyone have any experience doing so, or can you point me towards any thing that would help?
I'm not sure if this is a violation of any rules, so if it is, my humblest of apologies, I'm just stumped and feel free to mark this closed.
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'm starting from scratch and I don't even know where to look.. or even what to call this.. so any help would be appreciated.
I am working with the Snake example that Google supplies and I want it to work on Android devices without physical keys. How would I be able to use touch gestures (up/left/right/down) to make the snake turn and whatnot.
Again, I don't even know where to start looking.. I'm still slowly learning my way through programming for Android.
Thanks!
You could implement View.OnTouchListener. I think this page is the one you're looking for.
I would modify it so that touching the top part of the screen sent the snake up, the left side sent it left, etc.
As Android live wallpapers are becoming more prevalent, and developers are doing more with them, a question coming up more and more is how to hide the home screen icons temporarily while the user interacts with the wallpaper.
For this to work, the icons would have to be removed temporarily – not just made invisible, since a tap on an invisible icon would still run the app.
Also, it would be ideal to have a universal solution that works across customs launchers, not just the Android stock launcher.
This question was already asked on StackOverflow, and the answer was that you cannot do this. But this is clearly not correct, as there are at least two programs on Android Market that do exactly this: Show Off (Your Live Wallpaper) and The Cleaner (Show Wallpaper)
Is there a way to hide Android home screen icons, and then later put them back in place?
You can launch an activty which backgroung will be your live walpaper, and finish the activty upon touch... Just a thought...
Edit:
1st comment answer:
Preventing the delay:
You should be more "gentle" in the onCreate() method...
Try creating the minimum as possible in the onCreate(), like, just displaying the basic background...
in the end of the onCreate function, set an alarm (i.e. by AlarmManager) to call some BroadcastReceiver/Activity after half a second or so (with AlarmManager) to set the rest of the live wallpaper graphics... that way you don't have to worry about the delay.
This would have to be a completely new launcher. This is not possible without this I don't think. Sorry. However; to be absolutely sure though you'd have to look at the Launcher2 package in the android source and look through files like Homescreen.java. I'll look into it later on 2.3.3 for you and see what I find.
Try using the zoom gesture as you would to zoom in on a web page (reverse pinch). And you guessed it, the opposite makes everything come back.