android.intent.action.PACKAGE_ADDED BroadcastReceiver在JB 4.1上没有收到添加主题的意图

我在我的android应用程序中使用BroadcastReceiver,我在JB 4.1上运行我的应用程序

在清单中,我已经注册为

<receiver android:name=".ThemeInstalledBroadcastReceiver" android:enabled="true"> <intent-filter android:priority="100"> <action android:name="android.intent.action.PACKAGE_ADDED" /> <action android:name="android.intent.action.PACKAGE_REMOVED" /> <data android:scheme="package" /> </intent-filter> </receiver> 

当我安装任何应用程序ThemeInstalledBroadcastReceiver类被触发,但是当我安装一些主题,然后ThemeInstalledBroadcastReceiver不会被触发。 但是当我在JB 4.2上运行它时,这个应用程序工作的很好

我的接收器代码是这样的

 public class ThemeInstalledBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(final Context context, final Intent arg1) { System.out.println("Mass_TC inside InstalledBroadcastReceiver res " + arg1.getAction().equals(Intent.ACTION_PACKAGE_ADDED) ); System.out.println("Mass_TC apkid " + arg1.getData().getEncodedSchemeSpecificPart() + " intent : " + arg1); } } 

logging我安装应用程序

 I/System.out(19647): Mass_TC apkid com.example.ttest intent : Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.ttest flg=0x8000010 cmp=com.myrrom.themechooser/.InstalledBroadcastReceiver (has extras) } I/System.out(19647): Mass_TC deleting apkid : com.example.ttest x : 0 I/System.out(19647): Mass_TC inside InstalledBroadcastReceiver res true I/System.out(19647): Mass_TC apkid com.example.test_fa intent : Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.test_fa flg=0x8000010 cmp=com.myrrom.themechooser/.InstalledBroadcastReceiver (has extras) } I/System.out(19647): Mass_TC deleting apkid : com.example.test_fa x : 0 

但是当我安装任何主题我没有得到任何日志

Related of "android.intent.action.PACKAGE_ADDED BroadcastReceiver在JB 4.1上没有收到添加主题的意图"

一些如何找出解决scheme。

我添加了类别到我的意图filter

 <category android:name="com.tmobile.intent.category.THEME_PACKAGE_INSTALL_STATE_CHANGE" />