Just wanted to know is there a way to protect an application from getting uninstalled. I know it's possible if i add the application as a device administrator but this is not enough.
Is there a way I could pop up a message asking for the security code before un-installation starts ? any ideas highly appreciated.
You can create two applications. The first will be you application and the second will listen for remove intents and will triger an action if your first applications is removed, but this is only a basic protection since the user can remove the second application first.
The only possible solution is to modify the android source. As there are applications that can't be removed (gmail, contacts, telefon app, sms app, facebook, twitter) there must be a flag that you can use for your requirement. But I doubt that there is a way on a non customized android os...
I think it's impossible If application is installed by user.
Application can be uninstall by user too.
I think "application protection" on the market do what you want.
Try to implement an BroadCastReceiver listen ACTION_PACKAGE_REMOVED.
Related
I need to create a app which is responsible for closing the other apps which are currently running in background , is it possible ? Can I want close the other apps ? if it is possible then how ? plz help
Unless the other apps are signed by the same certificate, you cannot do this. The system apps (like Settings, with which you can "force stop" any app) have special privileges that are not allowed for apps written by developers.
I hesitate to ask, but why would you want to do such a thing?
I am developing an app where I have to lock some android default Apps such as messaging, email, gtalk, etc .
How to do it, i have no idea. Please help me with some relevant code or link .
What do you mean by lock? If you mean "prevent access unless user types a PIN/password" then you simply cannot do it without root.
The only non-root idea I can come up with is to write a custom launcher, that will hide the target applications, but this doesn't stop other ways to access them [recent apps, intents...].
What is your theat model?
I have an android application. I want to auto start my application after the installation finished.
IN other words I want to call an activity of my own application after installation.
Let me know is it possible? If yes how can I do it ?
Thanks,
Pravin
Your app isn't in memory after it is installed. It won't be able to call itself.
Also; after looking at all of your other questions, why do I get the feeling you are writing some sort of malware? The user owns their phone, not you.
As far as I know, there is no way to control over the activities occurring in an app in android phones unless the application that you want to log/monitor is written by you.
I wonder is it really like that or is there any possible way to do this? For example, is it possible to control over emails which, let's say, who I sent an email to in an android phone?
It is not possible to "just log it". Some events are possible to catch in broadcast receivers in a logging application. The user will get notified by particular event sniffing when installing such an application, by approving the permissions request.
It's generally possible to add instrumentation for security purposes to apps where they interface to the sdk api's, either by modifying the platform (rooted phone) or by decompiling, modifying, and recompiling the app using apktool.
possible of course does not mean trivially easy.
When a user tries to launch an application I want to suppress that application and then call another application. Example I want the user to authenticate himself before launching a particular system application (settings application etc). The authentication application should pop up every time the user launches the settings application
I know you will have to use broadcast receivers and intents but have no clue how to do it.
Sounds like you should create a "lib" project that have public interfaces that you can use.
Then share them between the apps instead of trying to execute another app?
But what I know this is not possible to actually execute up another app, since this then gives dependency to something that you don't know if it is installed. It must already been started if the intents should work.
Also like the answer before, it could be used for abuse.
Look at this link for more information:
http://mylifewithandroid.blogspot.com/2007/12/playing-with-intents.html
I sort of hope this isn't possible... Launching a different application from the one the user actually clicked? Leaves the door open for abuse.