Android - Create a phone lock application - android

Is there a way to replace the phone lock application of an Android phone ?
I would like to customize my screen lock, and perhaps, if the result is nice, publish it on the market. Would that be possible ?
Any tips ?

Is there a way to replace the phone lock application of an Android phone ?
No, sorry, there is no way to create a true replacement lock screen. There has been some discussion of augmenting the OS to support this. However, it is an area that is rather complex, both due to the code itself, and due to security issues.

Related

Android API for Screen Lock

I recently got onto Microsoft Launcher for Android. I really want to know how it allows users to lock the screen with a double tap. What API does it use in Android for Screen Lock ? I have not found any such API for Android which exposes the methods for screen lock.
Please note I am referring to screen lock and not a device lock that can only be opened with a password like over here.
Is it part of the accessibility suite ? Asking because I had to provide accessibility permission for the app. I had asked this question before but I got an answer that it was not possible with the recent APIs. So how can Microsoft Launcher do it ? It is not using any tricks, like turning the brightness to 0 and waiting for a timeout.
More information can be found at this answer. And also here. Hope it helps.

android unlock screen using nfc

I want to unlock the andorid screen when a tag is detected - based on the tag ID.
something like how com.biwota.cerbero is done. someone here has any experience or knows how this can be done. ? could you please point to the right directions perhaps ?
thank you
Domnic
This is not possible, unfortunately. NFC polling is turned off when the screen is off or locked, since Android 4.0 ICS. Only with a custom ROM you can modify this behaviour.

Make an app show up as an Android lock screen?

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.

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 keep track of which applications used most in android phone

HI ,
I need to keep track of installed applications which are used most and least in android device... can anyone help me how to do this programmatically in android...??
My question some thing like , I need to capture the event/Intent which will/may happen when the apllication is launched every time...(like BOOT_COMPLETED will be brodcasted when device booted).
This does not seem possible (unless the launcher/home screen or applications cooperate, e.g. through instrumentation: but that would be strange in production code!). See also this related question.
Edited to add: indiscriminate capture of application launch intents is not AFAIK permitted. Were Android to add such functionality, the security implications would be significant (particularly if interception or modification were allowed!). What you are describing could be (partially) achieved by replacing the home screen.
Some degree of usage information is collected already - from the launcher go to settings - about phone - battery use.
I think this resets every time you go on a charger, and don't know if its visible to ordinary apps.

Categories

Resources