get package uninstallation notification in android - android

folks,
i have one security application in which i want the notification where package is
uninstalled by user perform some action on that event
please give me some solution
Thanks

If you want to monitor application installations or uninstallations, you may want to register a BroadcastReceiver that listens for the actions Intent.ACTION_PACKAGE_REMOVED, Intent.ACTION_PACKAGE_ADDED and so on (see the full list in the Intent class documentation under "Standard Broadcast Actions"). You'll get supplied with the packagename of the app that was uninstalled in the intents data.
If you want to perform an action when your own app gets uninstalled: Thats not possible at the moment.

Related

listen to install of my app

I want to register gcm_id imidiatly after app was install or updated (as gcm_id may change over application or android id) to be able to send user news asap.
I can listen for broadcast android.intent.action.MY_PACKAGE_REPLACED if my package is updated. However broadcast for android.intent.action.PACKAGE_INSTALL is deprecated and does not seems to work (have not seen logs with such intent) and broadcast for android.intent.action.PACKAGE_ADDED is never send to newly installed application as stated in docs.
Is there a work around to listen, when my app is installed?
Is there a work around to listen, when my app is installed?
No. Nothing of your app will get control until the user clicks on the launcher icon for one of your activities, or until something else uses an explicit Intent to start up one of your components.
Please register for GCM on the first run of your app.

Method that runs on the app when it is uninstalled

I'm using the Android notification system.
This system save an id for all devices for which notification will be sent.
When any user uninstall the APP and the attempts to send one notification throws an error.
Can I code any method when the user unistall the app? Android has a method that runs on the app when it is uninstalled?
No. your app will not get any notification while being uninstalled. There's ACTION_PACKAGE_REMOVED broadcast, but your app will not get it as it is being broadcasted once the package is removed, so your app is already gone at that time. Docs read (here):
Broadcast Action: An existing application package has been removed
from the device. The data contains the name of the package. The
package that is being installed does not receive this Intent.
There is no way for an app to tell if it has been uninstalled or to receive notification of it's pending uninstallation.
When an application is removed, the ACTION_PACKAGE_REMOVED intent will be sent out to all receivers except for your own. Read the docs for more.
There is no callback that you will get when your app get uninstalled.
while an app is uninstalled ACTION_PACKAGE_REMOVED intent will be sent to all receivers except the currently uninstalled app so by another app you can know that.
Your code is inside your app, not outside to send any notification at a time of uninstalling it.
Outsider coding is done by Android OS so leave it to him.

Detect when app is opened with a service

I want to be able to detect when an application is opened and notify the user of something at the moment related to that same application but I don't know how to do this.
The user opens my app
I intent the service (background / foreground) and it successfully starts
Whenever the user opens another application I want to "catch it" and present a notification to the user
How can this be made? Are there any event listeners i need to use? Thank you very much.
If you are trying to catch "open app" intents in general, then it depends on how the app defined the intent. If it specified a class (explicit intent) then it will generally not be visible to your app unless the device is rooted, for example.
Implicit intents are broadcast and you simply need to define an intent filter in order to receive them. These are intents that allow Android and/or the user to select the appropriate app target based on data sent with the intent.
There are both useful and malicious motivations to do the kind of thing you are asking about. Read this:
Android Intent Security
And also the posted comment on learning about intents overall.
This is really simple. Here I am trying to figure out the solution. When your app goes on onPause() state then broadcast a message using BroadcastReceiver. On the other hand in another app just register for that broadcast.

Android program - reacts when skype message received?

I am making an android program that needs to do something when I receive a message from the Skype app. My Skype will be logged in, and it will be a service or activity waiting for someone to message me, and when it does it will play a song. Does anyone know how, code-wise, I can tell if I have received a message from the Skype app?
If there is no way to do this, how can I have a service scan the notification bar for a notification that contains the text "skype" and react right when it's received?
Thanks for any help.
If skype broadcasts intent upon message reception ( look into decumentation of skype if there is one ) you may just receive it ( via broadcast receiver ) in your application and do something. Incase it does not, there may be still workauround to snoop into status bar:
Detect a new Android notification
for skype notifications
In general "no". There's no way to do that on non-modified system.
You cant intervene other app's events and/or processing directly. It is only possible if Skype itself has provided an open interface (like Service Binding, Broadcast, etc.) to allow third-party integration. But as per my knowledge, I don't think its possible with Skype's own app.
However, if you use Skype's SDK and offer your own implementation of messenger service, then of course you'll be the in-charge.
According to this post in the Skype Developer Forum, the app does not send broadcast events (which would be the usual way to be programmatically notified of incoming messages).

How to show confirmation message before opening the default messaging application?

I want user to confirm By selecting yes or no that whether he/she is sure to open the message application or not.
This will be similar to CALL CONFIRM android app which confirms when making a call.
I can also manage if someone let me know a thing like broadcast receiver as in the case of making a call.
Like i would be able to confirm when send button is pressed in message application.
This is my first question on this forum. :)
it can be achieved in more than one way,
create a service and monitor activity stack, if activity matches com.android.mms.* you can show your notification to user
create an application with all the intents for launching the messaging application, you can find out all possible intents from stock messaging application's android manifest file for your ref
http://www.netmite.com/android/mydroid/2.0/packages/apps/Mms/AndroidManifest.xml

Categories

Resources