I am developing a security app. So its necessary for me to put it on lock screen. Is there a way to put it on lock screen? so that user can interact directly when needed.
For devices with lockscreens that support app widgets, you can write an app widget that can be placed on the lockscreen.
Related
I moved from iPhone to Android (Samsung S7) and missing one feature. In iPhone I could use quick access to set clock and timer and set direct from locked screen if to press a button at quick access panel, shown at the picture with arrow. Is it possible to make a similar quick access to clock app in android from lock screen? To put it in android quick access panel or in some other way like third party app, etc: aiming to access clock app set on lock screen quick w/o logging in? Same question with Calculator app.
In Android you can do almost everything with apps.
I found here some apps that allow you to create widgets on your lockscreen, you click on them, unlock your screen, and the app launches:
https://www.maketecheasier.com/launch-apps-lockscreen-android/
I own a OnePlus so I know they have this option build in.
You can also use the Xposed module "GravityBox" or "LockscreenMods"
(it is not possible to bypass the unlockscreen through a lockscreen widget!)
I want to force a widget to appear on the lock screen in Android.
Any ideas or code examples?
Thanks in advance.
First, the standard Android lockscreen framework only supports app widgets from Android 4.1 through 4.4, which is a steadily shrinking portion of the Android device ecosystem.
Second, there is no programmatic means, in standard Android, to force the user to add an app widget to the home screen or to the lockscreen.
I am interested in building a custom lock screen app but would like to integrate into the built in system password lock screen.
My design idea is that the user would set a system password using the standard lock screen in android and my custom lock screen app would be given permission to bypass the standard lock screen and present them with a custom alternative way to unlock the device.
The user would be given the ability to fall back to the system lock screen if they wish. Also, this will give some leniency to my custom app just in case it does not work for whatever reason and woud allow a secure fallback to a system lock screen.
Is this possible in later versions of the Android SDK?
The short answer is no. You cannot edit the native android lock screens and security features related to them with the android sdk. You can however build your own and have that used if the native android lock screen is disabled, if it isn't you end up with two lock screens.
It may be possible to integrate in a minimal way with the "insecure" android lockscreen ie. swipe to unlock, which does not provide any security whatsoever.
I am building an app that will be in kiosk mode and must be over the lock screen its is possible using:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
However, I now need to programmatically lock the screen when the app is starting, looking at this link, I see it needs administrator privileges that are a bit more complicated on the lollipop version, has anyone managed that?
For your need, you can use the Screen Pinning. It's a new functionnality added in Android 5 to limit the application a task.
Programmatically, you can use Activity.startLockTask() and Activity.stopLockTask() to pin/unpin the application.
Some things to know :
If your application is not an Admin app, a popup will appear and you'll have to manually confirm the pinning mode.
No notifications will be shown in this mode.
The Home and Recent Apps buttons will have no effects.
you can unpin the application with no confirmation, and if you have set a Keyguard screen, you'll need to unlock it to go back to your Home application.
Let me begin by saying that, yes, I know that the stock Android lock screen can not be programatically replaced without rooting.
Now that that's over with, I want to make an app that contains a custom 'lock' mechanism. There are apps out there that emulate this functionality, namely LockGo. This allows a user to view information from widgets on a 'lock screen' and emulates the slide-to-unlock functionality (or whack-a-mole if the user wants to install that plugin).
Does anyone know what mechanism or Android API functionality they may have used to do this? Is it as simple as hooking into the power button to launch an activity, such as in the link below?
How to hook into the Power button in Android?
Any insight to this would be appreciated.
I've found out while researching this that, while there is currently no way to replace the stock security or keyguard lock (which I knew), it is possible to show an Activity on top of the lock using the following code in the setup for that Activity:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
This can be used with any logic needed to create a faux lock to show screens on top of the system lock(s), though the lock will still be in tact and the user will need to enter the lock to get into the device.