Is It possible to set Image as ScreenSaver in Android? - android

I want to know that Is It possible in Android to set an Image as screenSaver.. I am not sure about the feasibily of screen saver...That is when the phone is Idle, then Instead of showing the black blank screen, my application check the Idle time using OnUserInteraction() method and set an Image as screen saver...?? Please let me know If anybody know about this..

onUserInteraction() is deprecated for a start, and it only listens for events on your Activity.
Secondly, having such a screensaver would require that you use WakeLocks, which consume extra battery. And for a screensaver type app, the battery usage would be extremely high.
You might want to look into Daydreams now, assuming you're fine with Android 4.2 and above only.

Related

Is it possible to have a background process detect screen capture

I want to build n app that detects when the user takes a screenshot then get the image and use it.
Is it possible without root? My idea is very crude. the app will scan the screenshots holder for changes every second but that is very inefficient. is there another way?
I don't think there is no supported way of doing that. You could try the FileObserver class though and watch for events. Look here: https://developer.android.com/reference/android/os/FileObserver.html

Android how to use background service to trigger screen rotation

I have a tablet and also I have some test cases want to do.
By triggering screen rotation, I know setRequestedOrientation is a workable api.
However, will it be possible to do it in background service?
Say, can I run the service and look at my home screen to rotate every 1 second?
Thanks for the reply.

android jave how to retrieve an image of the incoming call screen

Can i put on my activity the incoming call screen as a background?
The picture of the screen of how it looks like when there's a call.
Every phone is different with its screen, thats way im looking for a way
to retrieve it from the phones system if it possible.
Thank you
android jave how to retrieve an image of the incoming call screen
This is not possible, except perhaps on rooted devices. You cannot capture screenshots programmatically, for obvious privacy and security reasons.

Any way to hide Android home screen icons to show Live Wallpaper?

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.

Flashing Screen in Android

I made a android project, now my project has a need to set up a alarm type, like blinking screen for which user can see that screen is blinking,
Flashing screen means, screen back light is turn off/on regularly.
Like we make a thread and after every 500 milliseconds we toggle the screen light.
How i do this...
To modify screen brightness, take a look at this question
For repeating schedulded events you can make use of the standard java Timer/TimerTask or simply play with android Handler.postDelayed(Runnable,delay)
For a short introduction to the later, see this question.
Happy coding!

Categories

Resources