过滤器未响应意图

问题描述

我想将一个意图发送给另一个应用程序,我有一个意图过滤器来捕捉我的意图。

在我要访问的应用中过滤:

<intent-filter
autoVerify="true">
<action
android:name"android.intent.action.VIEW"/>
<category
android:name="android.intent.category.DEFAULT"/>
<category
android:name="android.intent.category.broWSABLE"/>
<data
android:scheme="example"/>

我的应用意图:

 String url = "example://" + encodedXml;
 Intent intent= new Intent(Intent.ACTION_SEND,Uri.parse(url));
 sendToMySigno.addCategory(Intent.CATEGORY_DEFAULT);
  
    PackageManager packageManager = getPackageManager();
    List<ResolveInfo> activities = packageManager.queryIntentActivities(sendToMySigno,PackageManager.MATCH_DEFAULT_ONLY);
    boolean isIntentSafe = activities.size() > 0;
    if(isIntentSafe){
        startActivity(intent);
        Toast.makeText(getApplicationContext(),"Sent",Toast.LENGTH_LONG).show();
    }else{
        Toast.makeText(getApplicationContext(),"Unable to send",Toast.LENGTH_LONG).show();
    }

问题在于没有显示任何过滤器来捕获它。 两者匹配是否存在问题,还是应该在其他地方查看? (发送的“ encodedXml”是base64编码的xml,应该是正确的)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)