• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

install and uninstall android app by password authentication

nishu3389

Lurker
hello everyone,

i am making a security related android app. in which
i want to restrict user to uninstall the android app by password,
at the time of app installation i want to get input password from user and during uninstallation user must enter the same password to uninstall it.
without entering that password he should not uninstall the app.

i searched over internet and asked many android developers but nobody can sort it out.
This type of security exist in quick heal app (quick heal antivirus for mobile), so it is possible.
some says it cant be possible with normal android SDK, it requires administrative API.
some says it cant possible.

please suggest me if anyone have solution

i tried out package watcher through broadcast receiver and reached almost near by to my goal.
but at the time of uninstallation two package installer generates, one is the default (implicit) and one is created by me (explicit).
when user select "my package installer" then he prompt for password and everything goes as desired
but when user selects default package installer then the app got uninstall without asking for password.

anyone here to solve this issue???????
 
Have the app send your server the password when it installs. Save that password (and maybe a hiffen serial number generated at installation time - you can use a GUID) in your database.

When the user trues to uninstall the app, send the GUID and the password to the server. If they match, send a "go ahead and uninstall" code. If they don''t match, send a "Sorry, Charlie" code.
 
Back
Top Bottom