FORUMS
Remove All Ads from XDA

[APP][Mar28] SmartLockScreen for Android - Now works in Lollipop!

331 posts
Thanks Meter: 311
 
Post Reply Email Thread
Announcement from aravindsagar: SmartLockScreen for Android - bringing environment aware locking and more, to JB 4.1 and up.
SmartLockScreen

Make your lockscreen smarter than ever before!

For Jellybean, KitKat and Lollipop devices

The Idea
The main idea behind this app can be considered as an extended version of 'Smart Lock' introduced by Google in Lollipop. The development of this app started before Google announced L during I/O 14, though.
We are in different environments at different times, and might prefer different security levels in each environment.
Example environments
Using this app, you can define different environments and assign different passwords to each of them.
App will detect environment changes automatically and presents you the assigned password whenever you want to unlock the phone!
_
What's an Environment?
Wi-Fi networks, Bluetooth devices and Location areas (geofences) can be used to define environments.
Specifying multiple parameters for an environment checks for all of them.
Assigning a password to an environment is done at the time of creating an environment. Support for more password types are coming in the future.
_
There's more!
  • Lollipop style lockscreen with notifications for Jellybean and KitKat (can be disabled)
  • Restricted profiles - Set up restricted profiles for your friends/family and limit access to apps. You can assign a different password to each restricted profile (password, pin, pattern or none).
  • Intelligent environment overlap resolution. But you always have the option to override it manually.
  • Material Design, and smooth animations. (See screenshots below)
_
Some details
  • The app uses admin privileges to set system password, so it comes with the security of Stock lock screen
  • Pattern lock is supported. If you have root, stock pattern lock will be used. Please see Post #3 for more details. If you do not have root, a built-in pattern library is used (it still sets a user-defined master password in the background so that lockscreen is actually secure). But this built-in pattern is not guaranteed to work in every device.
  • The core functionality is working, but this is still a work in progress. Please report bugs, crashes etc in this thread. Logcat will be highly appreciated!
_
Source Code

The source code is Licensed under the Apache License, Version 2.0. Link to Github repository: https://github.com/aravindsagar/SmartLockScreen/
_
Reviews, Screenshots, Examples etc - Post #2

Instructions, Download links etc - Post #3
_
FAQs

1. My screen froze while on lock screen. How to recover?
Ans: Try rebooting the phone by long pressing power button. Upon reboot, try master password first, if it does not work, try passwords which you've set for different environments. Try to reproduce the problem, and send us a logcat.

2. How to uninstall the app?
Ans: First open SmartLockScreen Settings, delete all environments, and set passphrase for unknown environment as None. Then go to Settings -> Security -> Device Administrators, uncheck SmartLockScreen there. Now uninstall the app just like any other app. Please come back to this thread and post why you uninstalled it, what's missing/what's bothering you.

3. Can you add fingerprint sensor support?
Ans: I'm looking into it. Till Lollipop, there's no standard API or structure for fingerprint sensors, so parts of the implementation will have to be device specific or manufacturer specific. That being said, I'm trying to add support to Samsung devices first.
Also, things should improve with Android M, since fingerprint APIs will become standardized with it.

FAQs will be updated when certain questions get frequently asked.
_
Credits
Developed by
Aravind Sagar, V Priyan


This is our first ever app, so it did take some time for learning and implementing everything properly. Sincere thanks to:


XDA:DevDB Information
SmartLockScreen for Android, App for all devices (see above for details)

Contributors
aravindsagar, priyanmuthu

Version Information
Status: Alpha v3.0
The Following 38 Users Say Thank You to aravindsagar For This Useful Post: [ View ] Gift aravindsagar Ad-Free
 
 
27th October 2014, 04:23 PM |#2  
aravindsagar's Avatar
OP Senior Member
Flag Champaign, IL
Thanks Meter: 311
 
More
Examples, Screenshots, and Reviews
Tutorial made by ****************(old version of the app is used)
[YOUTUBE]f9YAboG7Yis[/YOUTUBE]

_
Configuring environments

Let's consider some examples.

Say you want to set phone password as none automatically whenever your bluetooth headset is connected to it. Just go to manage environments screen, click the '+' button on top right, give a name and hint for the environment, click checkbox on Bluetooth card, select your bluetooth device after clicking the button that appears. Go down to passphrase card, choose none. Click done button at the top. That's it!

Whenever you are not connected to the headset, phone password will automatically change to Unknown Environment password(if you have set it) or the master password, if you haven't set password specifically for unknown environment.

Let's consider another scenario, you want no security at home, pattern at work, and a pin elsewhere. Just add 2 environments corresponding to home and work. You can use Wi-Fi or Location or both to identify the environment. Remember that if you set both Wi-Fi and Location, it'll check for both; i.e. you have to be connected to the Wi-Fi network, as well as in the particular area defined. If you want to detect in either case, just make 2 separate environments, 1 with Wi-Fi and 1 with location, and give the same passphrase in both.

Any number of environments can be added. You can set any passphrase for any environment, including unknown environment. You build the configuration that works best for you.


_
Configuring restricted profiles
Suppose you want to share your phone with your child, and make sure that (s)he can access only certain games which you have downloaded for her. Go to SmartLockScreen Settings, click the item which shows the current user, click 'Add new profile', and give it a name. Now click on the new profile (it must have appeared in that list). You'll see 2 new options in the Nav drawer now. Click allowed apps and click on the games which you want to allow, plus the launcher app you're using currently. Now go to set passphrase and set a suitable passphrase. You can set none if anyone anytime can unlock your phone using that profile, or you can set something else as well.
To switch profiles, just turn off the screen and turn it back on. Click on the user icon which appears at the top right corner. List of profiles will appear. Click on the desired profile to switch to. The screen will turn off and on again so that the password change will take effect.


_
Screenshots



More screenshots:











_
A review of the app at AndroTrends
Review

_
Why these permissions?
HTML Code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.pvsagar.smartlockscreen" >
    <!-- Location can be used as a variable determining the current location, hence Location permission is required -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <!-- Bluetooth devices are also used to determine present environment -->
    <uses-permission android:name="android.permission.BLUETOOTH" />

    <!-- Current Wifi networks are also used to determine present environment -->
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <!-- To switch on Wifi when User wants to enter an environment with a wifi network attached to it -->
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

    <!-- The following three permissions are used by Maps, on which location selection and searching is possible -->
    <!-- Internet permission is also used for checking for updates -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!-- To start the service automatically after boot -->
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <!-- Required for restricting access to certain apps. This allows SmartLockScreen to determine the app open currently-->
    <uses-permission android:name="android.permission.GET_TASKS" />

    <!-- For running environment detection and password setting in the background when phone is locked -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <!-- Used to draw lockscreen over the Android lock screen -->
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

    <!-- Required to expand the status bar programmatically -->
    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />

    <!-- Required to dismiss the lockscreen overlay during calls -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />

    <!-- Following 2 permissions are required to read the owner info from Contacts -->
    <uses-permission android:name="android.permission.READ_PROFILE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    ...
</manifest>
The Following 4 Users Say Thank You to aravindsagar For This Useful Post: [ View ] Gift aravindsagar Ad-Free
27th October 2014, 04:51 PM |#3  
aravindsagar's Avatar
OP Senior Member
Flag Champaign, IL
Thanks Meter: 311
 
More
Instructions, Downloads, Changelogs, Known Bugs etc
Important - Please read carefully
If you choose to use 'System pattern lock (Requires root)' - this option can be found in General Settings->Pattern Type if you have root access - please be careful.
This feature has been tested in AOSP ROMs only. Please make a nandroid backup, or at least Ti backups, especially if you're on a custom skin of Android like TouchWiz.
I request everyone to test this feature and report success/failure so that any problems which could arise can be fixed quickly


_
System Requirements
  • Android 4.1+
  • Latest Google Play Services
  • Notifications in lock screen works only in 4.3+, as of now. We're working to bring them to lower versions as well
  • Doesn't work in MIUI. We would like to get testers who can work with us to sort out the issues with MIUI
  • Testing has been done mainly on AOSP based ROMs (mainly a Nexus 4 and Nexus 5). The app might crash or not work as expected in certain manufacturer versions of Android. We haven't seen this behavior anywhere yet, but we would like to find out, and sort out the issues.

_
Installation Instructions
Important: The basic initialization steps haven't been compiled into a proper set up wizard when app first runs, so please follow these instructions carefully.
  1. Download the apk (see below) and install it.
  2. Go to Settings -> Security and change password to none. This is done so that unlock becomes simple whenever password is set to none by the app.
  3. Install the apk file. See downloads to get the apk file.
  4. For Android 4.3+, Go to Settings -> Security -> Notification Access and select SmartLockScreen.
  5. Open SmartLockScreen settings. You'll be prompted to set a master passphrase, and activate Device Admin for that app, after which you'll be taken to Main Settings screen. Master passphrase can only be password/pin for security, and it'll be used by default on unknown environments. You can set a different password for unknown environment though, from Manage Environments screen. Add different environments using '+' menu item in Manage Environments screen.
  6. Click on the user name to see list of profiles. Click add new profile option in the list to add restricted profiles. Once you select a restricted profile from the list, the options available will change accordingly and you can set which apps are allowed for that profile and what passphrase should be used for that profile.
    For more help on configuring the app, see post #2

_
Download
A note to people who reshare this app elsewhere: Please don't directly link to the apk, please link to this thread so that users will receive important information and updates
The apk file is attached to this post.
Alternate download link: http://bit.ly/1KUB84X
If you have alpha 1.5 or above, go to About -> Check for updates. Click on update available button, and download.


_
Change log
Alpha v3.0
  • Lollipop support
  • Changed the implementation of root pattern lock. Should be more reliable now.
  • Miscellaneous fixes

Complete changelog here: http://goo.gl/rwroFI

_
Upcoming features
  • Blacklisting apps from showing notifications in lockscreen
  • Ability to show/hide pattern while unlocking
  • Automatic screen on and off
  • Notifications backward compatibility
  • Auto detect all environment variables in Add Environment screen
  • You tell us...

_
Known issues
  • Pattern lock does not keep track of incorrect attempts (in non-root mode).
  • Location has a tendency to fail, especially indoors. Setting a larger radius can help in such cases.
  • Slight delay in unlock after entering pattern, in certain situations - Doesn't happen if you have root, and has System pattern enabled.
_
Disclaimer
Use this app at your own risk. This software is distributed "as is", without any warranty, and the developers cannot be held responsible for any damages or consequences arising because of that.
That being said, I'll be happy to help anyone out, if you run into problems, or want any sort of assistance. Feel free to post the issues you encounter, in this thread.
Attached Files
File Type: apk SmartLockScreen_alpha3.0.apk - [Click for QR Code] (12.22 MB, 5272 views)
The Following 3 Users Say Thank You to aravindsagar For This Useful Post: [ View ] Gift aravindsagar Ad-Free
29th October 2014, 03:52 PM |#4  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by aravindsagar

Reserved

Installed in my P7 Huaweui.
The pattern way doesn't work.
The Following User Says Thank You to giankuka For This Useful Post: [ View ] Gift giankuka Ad-Free
29th October 2014, 03:56 PM |#5  
aravindsagar's Avatar
OP Senior Member
Flag Champaign, IL
Thanks Meter: 311
 
More
Quote:
Originally Posted by giankuka

Installed in my P7 Huaweui.
The pattern way doesn't work.

Thanks for the feedback. Can you tell me what exactly happens when you enter a pattern? I'll definitely try to resolve the issue ASAP.
The Following User Says Thank You to aravindsagar For This Useful Post: [ View ] Gift aravindsagar Ad-Free
29th October 2014, 04:10 PM |#6  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by aravindsagar

Thanks for the feedback. Can you tell me what exactly happens when you enter a pattern? I'll definitely try to resolve the issue ASAP.

I set the new enviroment. If I choose none or pin or password, then it asks me them correctly, but if I choose the pattern then it asks me the master password.
thanks!
29th October 2014, 04:13 PM |#7  
aravindsagar's Avatar
OP Senior Member
Flag Champaign, IL
Thanks Meter: 311
 
More
Quote:
Originally Posted by giankuka

I set the new enviroment. If I choose none or pin or password, then it asks me them correctly, but if I choose the pattern then it asks me the master password.
thanks!

Do you see an overlay showing the time, before you're entering your password? If not, drawing overlays doesn't seem to be working. Can you please tell me your android version, and ROM, if its not stock?
29th October 2014, 05:06 PM |#8  
Senior Member
Thanks Meter: 24
 
More
Installed and seems to be working
Tested so far: Set environment "Work" to activate when I am connected to their wifi. No security - Works no problem. When I set patter, pin or password, my previous lockscreen shows up after I swipe up to unlock. Then I have to swipe up again. Then the security (pin, password, Pattern) comes up and once entered I get on my home screen (or whatever app I left off at). I am using Viper Rom 6..2.1 (Android 4.4.2) on HTC One M7.
Same stuff happens with unknown environment. When set to none, one swipe up goes to where I left off.

Is that a design flaw in Android or does your app activate the stock lockscreen?

Btw love how everything looks. One thing that is kind of annoying is showing me as a notification what environment I am in. Did you mean to design it like that or no? Basically I like to have a clean screen when there are no notifications. I can swipe it away but it comes back after turn off and turn back on the screen.
The Following User Says Thank You to morphius88 For This Useful Post: [ View ] Gift morphius88 Ad-Free
29th October 2014, 05:13 PM |#9  
aravindsagar's Avatar
OP Senior Member
Flag Champaign, IL
Thanks Meter: 311
 
More
Quote:
Originally Posted by morphius88

Installed and seems to be working
Tested so far: Set environment "Work" to activate when I am connected to their wifi. No security - Works no problem. When I set patter, pin or password, my previous lockscreen shows up after I swipe up to unlock. Then I have to swipe up again. Then the security (pin, password, Pattern) comes up and once entered I get on my home screen (or whatever app I left off at). I am using Viper Rom 6..2.1 (Android 4.4.2) on HTC One M7.
Same stuff happens with unknown environment. When set to none, one swipe up goes to where I left off.

Is that a design flaw in Android or does your app activate the stock lockscreen?

Btw love how everything looks. One thing that is kind of annoying is showing me as a notification what environment I am in. Did you mean to design it like that or no? Basically I like to have a clean screen when there are no notifications. I can swipe it away but it comes back after turn off and turn back on the screen.

Thanks a lot for the detailed feedback.
That is a design flaw in Android, I'd have to say. If the phone should be truly secure, the password should be set as system password. But then, in certain implementations of Android, along with it, comes an additional screen, like the one on HTC. This doesn't happen in AOSP actually, at least till KitKat. I'm thinking of ways to solve this problem.. Initial thoughts suggest that the app should provide an option to disable the lock screen overlay showing the notifications.

Regarding the persistent notification, we'll add an option to turn that off.
The Following 2 Users Say Thank You to aravindsagar For This Useful Post: [ View ] Gift aravindsagar Ad-Free
29th October 2014, 05:19 PM |#10  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by aravindsagar

Do you see an overlay showing the time, before you're entering your password? If not, drawing overlays doesn't seem to be working. Can you please tell me your android version, and ROM, if its not stock?

No overlay time before I'm entering password. Android version 4.4.2, emui 2.3
29th October 2014, 05:26 PM |#11  
aravindsagar's Avatar
OP Senior Member
Flag Champaign, IL
Thanks Meter: 311
 
More
Quote:
Originally Posted by giankuka

No overlay time before I'm entering password. Android version 4.4.2, emui 2.3

If you have enabled the option 'Disable HW Overlays' in developer options, please try switching that off. If that does not work, I'll definitely investigate further. I might need your help, I'll PM you in that case.
Post Reply Subscribe to Thread

Tags
lockscreen, material design, smart

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes