Flutter for Android developers文档详细介绍了如何使Flutter应用程序接受Android意图,并提供了一个接受分享意图的代码示例。我已经复制并且它运行得很好。
但是,我现在正在尝试让我的应用程序接受其他类型的意图,特别是编辑联系人意图,以便当我使用默认电话应用程序并单击联系人时,我的应用程序被建议完成操作。
我尝试了所有可能的
但是,我现在正在尝试让我的应用程序接受其他类型的意图,特别是编辑联系人意图,以便当我使用默认电话应用程序并单击联系人时,我的应用程序被建议完成操作。
我尝试了所有可能的
<intent-filter>
组合,我可以通过谷歌和搜索GitHub找到,但没有任何东西能够使它正常工作。以下是一些示例:<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="vnd.android.cursor.item/person"/>
<data android:mimeType="vnd.android.cursor.item/contact"/>
<data android:mimeType="vnd.android.cursor.item/raw_contact"/>
<data android:mimeType="vnd.android.cursor.item/phone"/>
<data android:mimeType="vnd.android.cursor.item/phone_v2"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="vnd.android.cursor.item/person" android:host="contacts"/>
<data android:mimeType="vnd.android.cursor.item/contact" android:host="contacts"/>
<data android:mimeType="vnd.android.cursor.item/raw_contact" android:host="contacts"/>
</intent-filter>
<intent-filter >
<action android:name="android.intent.action.EDIT" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="contacts"
android:mimeType="vnd.android.cursor.item/person" />
<data
android:host="com.android.contacts"
android:mimeType="vnd.android.cursor.item/contact" />
<data
android:host="com.android.contacts"
android:mimeType="vnd.android.cursor.item/raw_contact" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.APP_CONTACT"/>
</intent-filter>
etc.
我做错了什么?