Home Screen or Unlock Screen or a AppWidget? - android

I am having some doubts on what the most efficient or logical way to implement the following within Android :
I have a service checking for incoming UDP packets
when a packet is received the user is alerted by showing a radial menu or a lock-screen, with several actions/icons to select. Something like the lock-screen in JB. The idea of a lock-screen seems fitting so that the actions cannot be activated incidentally (for example in your pants or jacket) but you actually need a more complex action to select.
So know my question would be, what is the most fitting solution ?
A custom lock screen ?
Or a lock-screen widget, even though I noticed it does not seem to offer a viable solution because my widget would not be shown as the first screen when entering the lock screen (or at least not during my tests on a SG3, which keeps showing time and lockscreen-message as the first screen).
Or a custom Home Screen ?
Actually another couple of contstraints and questions are :
when my service receives a UDP package it should also light up the screen and play a sound, is this even possible if we use the standard lock screens ?
if we use a AppWidget in Lock screen implementation would it be possible to do the above and also let my Service update the widget ?

Why not develop a DashClock Extension ?
https://play.google.com/store/apps/details?id=net.nurik.roman.dashclock

Related

How do parental control apps lock the screen?

I am developing an app that locks the screen for some time, just like parental control apps do when the screen time runs out. However, I do not really know how they work. I suppose they don't use lockNow because there is that message that shows up telling you that the time has run out. I also don't think they use overlays, because the phone is supposed to detect the use of overlays. So does anybody know what kind of function is used? Also for my app I want to add a button that ends the screen lock, so I am looking for a suitable way to achieve that.

Check if Android is presenting its screen

Does anybody know if there is a generic way to check if the screen is currently being presented, e.g. via Miracast, Chromecast or any other app?
My app runs in the background and shows notifications every now and then. I'd like to avoid that while the screen is visible to others.

Android Display information on LockScreen

Is it possible to Display Information on the lock screen from an Android application.
I came across a few Apps which allow you to display Email and Calendar information on the screen but could not find which API to use for achieving the same.
Android 4.2 supports app widgets on the lockscreen.
according to the app you've mentioned (which has very poor description and quite low rating) , i suspect they disable the keyguard (the default lock screen) each time they get the event of power off (or on) .
maybe the activity that they are using has a transparent background and is above the normal lock screen .
there are many similar apps , such as "widget Locker" ,"magic Locker" and "quick Launch" , all do about the same thing to replace the keyguard . most of them also have the ability to replace the launcher (but will still show the launcher of the user, of course) , for smoother experience .
does the screenshot belong to the app you've mentioned , or to something you wish to achieve ?
You can learn how it can be done if you look at the sources of open source project contact owner that adds a message to the lock screen, too.

Android lock screen

Is there a way to display text on lock screen? Like the information about unread SMS messages or like that Music Player on lock screen with Play/Pause buttons.
Thanks
Yes and no. Their is no public API to create or modify the lock screen. Whoever built the OS version on your device created your lock screen. Some of the manufacturers or carriers have added additional things to the lock screen. I've seen some that tie in to the music app, HTC sense has a somewhat customizable lock screen. So if you were willing to create your own rom and flash it to your device you could write your own lockscreen. Short of that the best you can do is write an app that the system thinks is an alternate home screen that has some kind of lock mechanism before the actual home is displayed. Then you set your device not to use a lock screen(so that it won't show both) This is not a great solution however, there are bound to be more ways to access the device if you use a "fake" lock screen like that so if security is an issue I wouldn't mess with it at all.
You might be able to find one of these "fake" lock screens on the market that suites your needs or you could create one that is exactly what you want. You could also search around on XDA for a rom that works with your device, 3rd party roms may be more likely to have the features your looking for on the lock screen.
If you end up making a pretend lock screen by using the home replacement method I strongly suggest you do not distribute something like that on the market. It is insecure and the users are unlikely to realize that there is a difference between that and a legit lock screen. Plus there is no guarantee that this method doesn't get broken at some point.

How to access programmatically what is displayed in an Android lock screen

Today I am looking for a way to mimic the behavior I know from my HTC Hero's lock screen: the calendar and alarm clock can put text & drawables there to inform about an upcoming event or an expired alarm. The lock screen remains there in that it must be dragged down to dismiss the shown event and there might also be a Snooze button.
But, first question: is this default Android stuff or HTC Sense specific only??
Second question: If it is a common Android thing, why can't I find anything in Google's Android documentation for the topics "lockscreen" or "lock screen" that comes close to my question? Where's the API for it?
My problem is: I want to inform the user immediately - even if I try a standard notification, the user with a locked screen will have to unlock it and drag down the notifications list to see & clear what's going on. sigh Putting an endlessly playing notification sound there is a hassle as it takes at least two swipes down to stop the sound playing!
Any hints on this?
Thanks!
is this default Android stuff or HTC
Sense specific only?
It is HTC Sense only. You cannot modify the lock screen of the device from SDK code -- only via firmware modifications. Sorry!
It's kind of o long way around the problem...
but the wallpaper is shown on then lockscreen. so you clould write a custom wallpaper to display your info on the lockscreen. (i think).

Categories

Resources