Creating a Password when installing an android apps - android

I want to create an application that prompts the user to create a password before the application is installed and also before the application can be uninstalled the password must be entered.
I have ran out of ideas on how to go about the code.
Please can anyone give me a code and an insight on how to go about this_
I would appreciate a lot.

You can use shared preference/db to have default value and see if there is a default value you can prompt dialog

I want to create an application that prompts the user to create a
password before the application is installed
To be clear you said BEFORE the app is installed. This might be Possible. But "dirty". In the user journey your user downloads and installs the APK from the market or where ever. None of your app code has run yet so there's nothing to leverage.
A possible work around, which I have heard others use but not tried myself so no guarantees, is to write a login app that when installed prompts for password creation and on success downloads the actual app.
I would probably say - why? What it the motive behind doing this? Lots of apps work fine installing the whole app (Spotify comes to mind).

I don't think this is possible the android market takes downloads and installs or user installs some other way and the user uninstall via manage application in the settings, all of these things happen outside of the scope of an app

See Device Administrations API

Related

Make android app non erasable

Is is possible to make an android app non deletable.. What i mean is, I want to install a app, but I cant remove/ uninstall it. If I want to uninstall it then it should prompt me for password which I would have set during installation of the app.
When I read the docs they tell it can be done using Device Admin, but it doesnt provide security, interms of it doesn't ask the user for the password and deletes if its correct..
Is it possible to make an app such that even if there is a factory reset the app will still be there on the phone ?
Is is possible to make an android app non deletable
No, unless you want to create your own ROM and preload it with your app, just like some manufactures preload their devices with their own software and other bloatware.
No it is possible to restrict any user to delete the app from android device.
As google already maintaining this scenario by using the concept known as Device Management System.
Google Eyeing on apps which are published by the developer / installed or deleted by the user.
Although you can make your own app which will notify your admin that user is trying to delete the app or deleted the app, using Service Intent concept.

Android Uninstall Package

I am developing the android application in which
The application has a stored password (set by user when application is first installed)
My application is the device administrator
The issue is when user clicks on uninstall of this application , i want user to input the password of the application
The process i will follow there after is :
Show password Page
Remove Device admin Rights by certain code
Allow un-installing
Please help me with the detection of the uninstall click of my application to shoot the password page.. !!
Thanks in advance !
Do you mean to intercept the uninstall of your app, and query for a password? That is not possible. Similar questions has been asked before, for example here.
Edit: It does seem as some related things can be done by making your application a Device Admin Application:
"To uninstall an existing device admin application, users need to first
unregister the application as an administrator."
However I am not familiar with the restrictions that comes with this, and if it allows your exact use case.

is there a way to delete older version of android app through an updated app version

Please allow me to explain the problem, I built and released and android app that uses google map. The certificate used to sign that app was lost and so I couldn't release the next update under the same name as the previous per google play rules.
For this reason I was forced to sign the app with a new certificate and rename the app. Now user with previous are reporting issues with double instances of the same. indeed not much of difference in those two instances except the names and certificates used to sign them.
So my question is, how can ease the transition work for my users, I know uninstalling the old version and installing the new does the trick, but I am just wondering if there is some level of control that I can implement either through code of settings in google play to make things clearer and easier for the app users?
Also if you think my perspective of the problem is wrong too, please suggest a better one. Thanks in advance!
This question: Implicit intent to uninstall application?
Will show you how you can use and fire an intent that will start the uninstall process for the user.
You can use the PackageManager to find out if the old version is present. If It is create and launch an uninstall intent. Perhaps tell the users that you are going to do that with a dialog or something before launching the intent.
Maybe you can detect if your old app is installed and prevent the user from using your new one until it's uninstalled. Ex. using an "if" statement on your main activity that creates an alert dialog if it detects that your old package is installed and directs user to uninstall it before continuing. Just a thought!
Android - check for presence of another app

uninstall android application from inside the application?

Hi friends my question is little complicated.I am currently making an password related project ie, the app only open when user enter his/her password.While developing the application i figured that my application can only open by entering the password ,but what if any stranger/friends take my phone and uninstall my application .Then all the data that store in my app will be destroyed.so i am thinking that ask a password before uninstalling the app or disable the uninstall button form the application uninstalling process ie, the uninstall button should only enable when i do some thing from inside my app.now is that possible if so please replay
Not possible I'm afraid. Lock the phone with a password instead.
There some apps, which allow starting app only after you enter password.
They all utilize system logs, i.e. by reading that log you know when certain Activity starts.
And, you can "intercept" that. So, maybe that will help you.

Hosting APK + Updates?

I have an app written in Adobe Air (actionscript3) then packaged as an APK for the moto xoom (android os, using flashdevlop).
We are looking to host both the install and update. There are no issues with selecting unknown sources. And installing from web works but i cant seem to find anyway to set it up to find updates thru my server or the correct way to push those updates. Thoughts or links, google has failed me?
UPDATE
I forgot to make clear i need it to work thru the built in update checking so it will auto update if the device is set to do this. By default either the app or device is checking for updates somewhere. I want to change where it checks for that update and what format/syntax its expecting.
The built-in update check is the Android Market app, pinging the Android Market server to check for updates. Since you're not distributing your app through Market, there's no way for you to take advantage of its update mechanism- You'll have to write your own (Amazon's market app, by way of example, does this).
Essentially you'll have to set up some sort of alert mechanism (check for updates on app startup, maybe), download the APK, and fire an intent to have the user explicitly state they want to install the app. Auto updating (downloading and installing the APK without the user doing anything at all) isn't possible outside of Android Market, for security reasons.
For more information on how to fire the "install" activity, check out this thread.
It sounds like a good case for cloud to device messaging....to notify the user of the update
is available...
http://code.google.com/android/c2dm/
I think they will still have to download/install it.....You can help them by making the download/install feature of the app it self.....
okey... i think you have a few web services right... create a update webservice that takes in the user version and sends it to you.. you can cross reference it and if the user needs to download a new version they get directed to a browser ... where you can poit to where you host the files... you can put in a menu item in the app to say allow the user to check for any upgrades... version number of the app can be got easily... check google or get back to me if you still are nunable to find any...

Categories

Resources