Password Protect the Applications Button - android

How can I password protect the Applications button on my Home of my android phone (samsung galaxy s captivate).
I know there is password protect application out there with a list of application you need to add but I don't want that. I want to protect the whole access of the applications.

I'm pretty sure that blocking access to an application from the Home Screen isn't common practice, actually I think you can't even control this as it's part of the Android OS itself. After all, what's the point in blocking user access at the Home Screen since the user already has to unlock his phone in order to get there... usually trough a password.
A viable option would be to greet your users on a Login Activity and you'd have them identify themselves before they can access the actual Application functionality.
If you really want to start blocking users at the Home Screen, you're probably looking at creating your own ROM and Application. But then, no one will want to re-do their whole OS simply to run your application.

Write your own home screen, one that prevents launching any applications unless the user authenticates.

Related

Prevent Android application from starting

I have read many question about whether it is possible to prevent an Android application from starting, but all of the answers seem to be "no, you cannot".
The idea is very simple: we want the user to be able to use a restrited set of applications that will be preinstalled on his mobile device. If the user tries to start a non authorized application, he will be prompted with a dialog asking for a PIN. If he enters the right PIN, then he will be able to run the application. Otherwise, the application will not be run.
As I said before, all the answers that I could find out there fall into two categories: "you can't do that" and "you can do that by writting your own launcher application".
However, I have seen applications such as ZDBox, which allow you to do just that. That is, with ZDBox you can define "non authorized" apps, in such a way that if the user tries to start one of them, he will need to enter a PIN to actually start the app. If he fails to provide one, the app will not start. The funny thing is that ZDBox does not require root access to do this.
So my question is, how can we prevent other apps from starting, just as ZDBox does?
Option 1
All the examples I've seen involve running your app as a Launcher/Home Screen replacement. This is how all the child lock style apps I've used work. This has the advantage
Pressing Home button doesn't leave the app
You have control of app launching
You can check out the android Launcher2 code to see how the Android launcher works. https://android.googlesource.com/platform/packages/apps/Launcher2.git
Option 2
There does look to be one alternative that I can see. In that you can try and read the logcat entries to detect when a blacklisted app is launched or brought to foreground and then launch your app over the top.
Similar to how they detect an app launch in How to detect when the user launches another app? (Android)

How to set my app as default home android?

I'm developing a Android application, and I would like that when it first starts it set itself as default action for Home button.
Currently this option is given to the user by the Android system only when he first press the Home button after running my app.
User don't want to click on check box as "Use by default for this action" it should be set by default my apps.
Thanks in advance.
This is not possible, and it is a good thing too.
Android allows users to choose their own defaults to prevent malicious apps from making themselves the default app to deal with an action, and hence protecting the user's data and device. If an app could set itself as the default homescreen or browser or call app etc. then it could steal the user's personal data and also potentially spoil or deny access to the device itself.
Due to the above reasons, this is not possible why the Android SDK, and I sincerely doubt that an unofficial means to do this exists.

Android: Prevent users from launching apps or using the OS

Is it possible to have an application run on a device in such a way that it is the only application that can ever run and also prevent the user from using the operating system at all? Tapping on the Home key or Back button would not exit the application and allow the user to have access to anything. If the device boots up, only this application would run.
This would be desirable in situations where devices are installed at a business for point of sales purpose or possibly where the device acts like a terminal in public places.
You can achieve what you're describing by writing your app to replace the home screen (Launcher). From there, you control what other apps will run.
The Android SDK has a working Launcher project you can start from.
Be careful to allow some method of running a more powerful app (even if it's just enabling ADB access) -- otherwise you could leave your device in a state of needing a factory reset before it can be modified.
Yes, you can override the back and home button behaviour.
Start app, override all buttons, and the user cant exit the app, evil, but should work in your scenario.
info here

Screen Lock password in android

I am developing an application where I have to change the screen lock password on a button click,can anybody tell me how can I do this.
If you are talking about the unlock pass word set in the device settings by the user then the answer is you can't.
If an application could change the unlock password/pattern without user interaction then these security features would be mostly useless. A rogue application could in theory lock the user out of their own device if this were possible.
Edit: if your aim is not to change this value without interaction but just to send them to the correct settings page. You might be able to do that some how. You'd want to look into what intents you can use to start the Settings Activities. But if you are developing this application for use by the general public I would strongly recommend you rethink having try to do anything with the users security settings. As a user if an application prompted and then sent me to the security settings page with the intention of having me change something in there I would immediately uninstall it.
Edit 2: I've never seen it until just now so I don't know for sure what they used to achieve that. Since it states that must be android 2.2+ though I would assume they are using the Device Administration APIs The docs seem to indicate that it can "Prompt user to set a new password." Which I would think means that it is just going to start the settings activity for them. It is not actually changing the password value by itself. This whole API is subject to user activation also. So even if you get installed on a device the user must explicitly "activate" your app before it is able to make use of any of the admin APIs
I am sure the only way this is possible is if you signed your APK with the device key. This way it could access API's that are limited to system applications. This isn't possible for a normal app, only one that is baked into a custom ROM or device manufacturer ROM when building Android from source.
I do not exactly understand what you are trying to do. If you wish to change the lock screen password programmatically, and your'e application is A device administration than you can call:
resetPassword method of DevicePolicyManager like this for example:
m_policyManager.resetPassword("bla bla", DevicePolicyManager.PASSWORD_QUALITY_SOMETHING);

Android OS - Stop user from closing app or using any OS functionality

My team is trying to build an Android application for a tablet that will be dedicated for this sole purpose. One of the requirements is that the application is the only thing running on the device (at least from the user's point of view). The user should not be able to close it or use any other functionality from the OS (settings, other apps, etc.).
We have been doing some research and so far have not found anything. Is this we are trying to do even possible ? Does anybody have any idea how we could approach this ? Maybe blocking the buttons ?
Thanks,
It is possible but would be ugly in the long run without a custom built rom (http://xda-developers.com has instructions on how to do this), I wouldn't know where to start code wise - but there are a couple of applications which portray this kind of functionality - TodlerLock is one such app - its designed to stop todlers from from doing anything on the device, whilst the application keeps them entertained. It appears to intercept all button presses and acts as a home application to do this for the home button.
Then there are the programs like estrongs security manager that allows a user to set a password for some or all applications and basically stops the application being run without the password (it appears to intercept the intents and opens the security manager requesting the password first, if it fails it finishes the intent) - this maybe a much easier option to use something like this - you could set a password for most things, including settings and the security application itself, everything bar your application. This will stop the user doing anything you dont want them doing without the password.
You would have to set up the device for the user before hand though, as any home screen intercepter application can be changed but the user - so you would have to set the default, then lock access to the settings so the user can't change this action.
I think the only way of doing this to have your own custom version of Android built only for you. Get the android source, remove what ever you don't want and build it. I am not sure if you would ever want not to close it but you can make sure they can't install anything else on your ROM.
Im not sure about this, but, intercept the home intent and write your own custom home?
It sounds a lot simpler than writing your own custom rom.
This is not possible without OS changes. You cannot override the home button.

Categories

Resources