Delegate text transformation to “plugin” Android apps, not known in advance

前端 未结 2 934
野的像风
野的像风 2021-01-14 09:21

Context

Our app shows an HTML flashcard to the user.
We have added several layers of \"filters\" to satisfy different groups of users:

  • To satisfy
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-14 09:49

    To know apps which have a broadcast reciever with THEAPPTRANSFORM as filter, you can use below code

    PackageManager pm = getPackageManager();
        Intent intent = new Intent("THEAPPTRANSFORM");
        List info = pm.queryBroadcastReceivers(intent, 0);
        for (ResolveInfo resolveInfo : info) {
    
            Log.e("apps", "packages = " + resolveInfo.activityInfo.packageName);
        }
    

提交回复
热议问题