Как сделать так, чтобы мое приложение получало рассылку, когда другие приложения установлены или удалены

Я хочу создать приложение, которое может принимать трансляции, когда другие приложения на устройстве установлены или удалены.

мой код

в манифесте:

<receiver android:name=".apps.AppListener">
    <intent-filter android:priority="100">
         <action android:name="android.intent.action.PACKAGE_INSTALL"/>
         <action android:name="android.intent.action.PACKAGE_ADDED"/>  
         <action android:name="android.intent.action.PACKAGE_REMOVED"/>
    </intent-filter>
</receiver>

в AppListener:

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class AppListener extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent arg1) {
    // TODO Auto-generated method stub
    Log.v(TAG, "there is a broadcast");
    }
}

, но я не могу получать трансляции. Я думаю, что эта проблема связана с разрешениями приложений, есть идеи?

Спасибо за помощь.

20
задан Ismail Iqbal 20 November 2017 в 11:09
поделиться