I haven't found a definite answer to this yet. Lots of apps let you build/install custom lock screens without root, etc. It's just like installing an app. I found this in the dev guide: http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SHOW_WHEN_LOCKED
I assume that while this is running it would run just like any other app. But how would I "release" it to let the user get to their home screen? And do I need to handle things like incoming phone calls?
You can't (at least if you follow the rules) replace the secure lock screen. You can have a lock-screen like activity that will show up when the phone is locked. Use FLAG_SHOW_WHEN_LOCKED, but notice that your activity cannot be transparent - i.e. it cannot be a dialog.
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!)
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.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is it possible to configure an Android install to run a single app?
So, basically, I'm currently working on an android application that is intended for use on dedicated tablets inside of classsrooms. While using this app, we don't want the students to back out and go messing around, ignoring what they're supposed to be doing. Is there a way to:
a) Have an app launch on startup, so there's no initial access to the home screen
b) Lock the app so it can't be backed out of, and will be the only thing to run
The only way to achieve what you're looking for is:
Modify Android at the firmware level
Make your app the homescreen replacement.
Option 2 is considerably easier. Basically, you tell Android that your app is the replacement home screen, and then set it as the default on each device. That way, whenever the device is unlocked, your app will be shown, and pressing the home button will only launch your app. This essentially stops the device from opening up any other apps, unless it is done via notifications, which you can take away by making your app full screen. The only possibility left to leave your app now is via recent apps, or a service that launched apps on a device shake or something. You can get around this by making sure that no other app was launched prior to yours, or clearing the recent apps manually. The service can be gotten around by simple not installing any app that does that.
You can look into the default home screen app, which is open source and available at:
https://android.googlesource.com/platform/packages/apps/Launcher2.git
I've done a fair amount of research on this and the options are not pretty:
1) Write your own Android home screen
This one is involved but seems doable. Theoretically you could choose to write a home screen that only includes a link to your app and doesn't allow any other icons.
Try this link
2) Create you own lock screen
This may give you more control over the device, but the only options historically have been to use unpublished APIs that have been now been changed to disallow this.
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.
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.