Android LockScreen customization - android

Is there a way to change the lock screen in Android programmatically?
If yes, is it possible to create an animation within that view?

Is there a way to change the lock screen in Android programmatically?
No, because there is only one lock screen. On Android 4.2, the user can add app widgets to the lock screen, if the user chooses. You can elect to create an app widget that can be added to the lock screen.
If yes, is it possible to create an animation within that view?
Generally, no. App widgets are not normally animated.

android doesn't officially supports it with a nice API , but there are some solutions for this problem . the best one that i can think of and that will work perfectly on all devices and android versions is this :
you can make an app that functions as a launcher , and ask the user to disable the lock screen.
this way , when the screen is turned off&on , your app will be able to be shown and do whatever it needs .
each time the app is being unlocked , it will send the intent of the home button to the real launcher the user has chosen .
of course , there are other solutions , but as i've tried , all of them have some kind of problem on some android devices and versions . they work by listening to the power off intent , and block the home button by using a flaw they've found in the android source code . you can never assume that it will work on all devices and android versions .
example of such apps are "widgetLocker" and "Picture Password Lockscreen"

Related

Is that possible to make timer (clock) quick access from lock screen? A calculator?

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!)

Lock screen on iOS and Android

I'm building my app with Phonegap. What I want to do is create a button on the screen and add a lock-screen event onclick. I searches on other posts but everyone tries to check if the screen is locked and execute then or before something. I only need the event (lock screen) to happen when clicking that button. It's exactly like you would lock it from the physical button on the iPhone but only it happens by clicking a button.
I need it both for iOS and Android but if you could give me a hint for only one, is welcomed.
Thank you!
For Android side;
As far as i know you app need to be registered on the device as an admin app. Then you can use the Device Administration API to lock the screen by DevicePolicyManager.lockNow()

Launcher or an App for Restricted Access which one is better?

Hi I am planning to create an android app which is similar to the
Samsung Kids Mode- parental control
If you can see the link I gave, it is obvious that the app overrides the Home button when inside the app... I wanted to create a similar app for friends mode and stranger mode and should not come out of the app when home button is pressed... is it possible without root access?? My ultimate aim is to not come out of the app without entering a password, So if it is just an app after android 4.0 it just comes to the home screen when home button is pressed, So If I create a custom launcher and make it default even after pressing home button it will be inside the app if I am right, but is there any way I can do the same without a launcher
Also to avoid the phone number suggestions which happens when we dial parts of numbers in the dialler, should the phone be rooted to so it or is it possible without that?
Thanks in advance to everyone for taking time to read this, hoping a positive solution

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 non-root lock replacement

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.

Categories

Resources