1

如何将您的应用程序集成到本机联系人应用程序上的 QUICK CONTACT 中?我想查看我的应用程序徽标。用户应该选择它来发短信。我希望更改在清单文件中,而不是通过 JAVA 代码。

4

3 回答 3

1

我想我现在明白你的意思了。我认为通过清单文件是不可能的。您需要添加配置文件操作。请检查 SampleSyncAdapter 的方法。您甚至可以添加更多操作,当用户单击图标时,将显示可用操作的列表。然后你需要处理这个动作,但你说你不在乎......

还要检查这个:

配置文件操作

因此,您需要创建自己的同步适配器并创建原始联系人。只有与您的个人资料有 Raw_Contact 的联系人才会显示该图标。显示的图标是在您的authenticator.xml 文件中定义的图标。

于 2012-01-18T08:56:56.150 回答
0

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). From the intent check the action by using intent.getAction(); If (action.equalsIgnoreCase(Intent.ACTION_SENDTO)) you need to handle the sending of your message. With intent.getData() you get the uri of the contact.

于 2012-01-17T10:00:55.037 回答
-1

//还没有,但已经接近了。

<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>
于 2012-01-16T20:28:31.530 回答