0

I am new to android. I am using a Broadcast receiver which listens when a app is installed or removed.. When a app is installed or removed my Broadcast Receivers's onReceive(context,intent) will be called.. Now i need to get the info about the application installed or removed (Mainly the package name)..

Plz help

Sudarshan
  • 1,291
  • 3
  • 26
  • 35
  • Possible duplicate: http://stackoverflow.com/questions/8910411/how-to-find-the-package-name-which-has-been-uninstalled-when-using-intent-action – Cheesebaron Jul 19 '12 at 19:31

2 Answers2

1

You can try this receiver and permission. (But this seem only work in /system/app)^^"

<receiver
    android:name="com.your.receiver"
    android:enabled="true"
    android:exported="true" >
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_ADDED" />
                <action android:name="android.intent.action.PACKAGE_REMOVED" />
                    <data android:scheme="package"/> 
                </intent-filter>
 </receiver>
 <uses-permission android:name="android.permission.BROADCAST_PACKAGE_REMOVED" />
Deyu瑜
  • 484
  • 4
  • 14
0

All the information you want is in the Intent extras.

Look at How to find the package name which has been uninstalled when using Intent.ACTION_PACKAGE_REMOVED

Community
  • 1
  • 1
David Wasser
  • 93,459
  • 16
  • 209
  • 274