简体   繁体   English

如何在Android上的本机联系人应用程序中将您的应用程序集成到QUICK CONTACT中?

[英]How to integrate your app in QUICK CONTACT on the native contact app on android?

How to integrate your app in QUICK CONTACT on the native contact app? 如何在本机联系人应用程序的QUICK CONTACT中集成您的应用程序? I want to see my apps logo. 我想查看我的应用徽标。 User should choose it for texting.I want the changes to be in manifest file and not through JAVA code. 用户应该选择它来发短信。我希望更改在清单文件中而不是通过JAVA代码。

I think I know now what you mean. 我想我现在知道你的意思了。 I don't think it is possible through the manifest file. 我认为不可能通过清单文件来完成。 You need to add a profile action. 您需要添加一个配置文件操作。 Please check the SampleSyncAdapter for the way to do it. 请检查SampleSyncAdapter以了解执行此方法的方法。 You can even add more actions and when the user clicks on the icon, the list of the available actions is shown. 您甚至可以添加更多操作,并且当用户单击该图标时,将显示可用操作的列表。 Then you need to handle the action but you said you don't care about that... 然后,您需要处理该动作,但您说您不在乎...

Check also this: 还要检查以下内容:

Profile action 个人资料动作

So you need to create your own sync adapter and create your raw-contacts. 因此,您需要创建自己的同步适配器并创建原始联系人。 Only Contacts that have a Raw_Contact with your profile will show the icon. 只有具有您的个人资料Raw_Contact的联系人才会显示该图标。 The shown icon is that one defined in your authenticator.xml file. 所示图标是您的authenticator.xml文件中定义的图标。

Right that is what I used too: 对,这也是我使用的:

<intent-filter>
            <action
                android:name="android.intent.action.SENDTO" />
            <data
                android:scheme="sms" />
            <data
                android:scheme="smsto" />
            <category
                android:name="android.intent.category.DEFAULT" />
</intent-filter>

Then in the onCreate and in the onNewIntent you need to get the intent (use getIntent() in onCreate). 然后,在onCreate和onNewIntent中,您需要获取意图(在onCreate中使用getIntent())。 From the intent check the action by using intent.getAction(); 从intent中,使用intent.getAction()检查动作。 If (action.equalsIgnoreCase(Intent.ACTION_SENDTO)) you need to handle the sending of your message. 如果是(action.equalsIgnoreCase(Intent.ACTION_SENDTO)),则需要处理邮件的发送。 With intent.getData() you get the uri of the contact. 使用intent.getData(),您可以获取联系人的uri。

//Not quite there yet but close. //还没到那儿,但是很近。

<intent-filter>
                <action
                    android:name="android.intent.action.SENDTO" />
                <data
                    android:scheme="sms" />
                <data
                    android:scheme="smsto" />
                <category
                    android:name="android.intent.category.DEFAULT" />
            </intent-filter>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM