I am making an android app that will check for any vulnerability and malicious detection in android app being installed. now what i want is when user is installing any app then before the app get installed on device i get notified but broadcast receiver so that i can check the app for detection? i have tried PACKAGE_ADDED but it is notifying me after the app has installed .plz tell me how can i do.i have used this code
<receiver
android:name="MyReceiver"
android:enabled="true"
android:priority="0" >
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" >
</action>
<action android:name="android.intent.action.PACKAGE_REMOVED" >
</action>
<data android:scheme="package" />
</intent-filter>
</receiver>