How to integrate your app in QUICK CONTACT on the native contact app? 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.
-
do you mean that you want your application to be shown as an option to send message? – kingston Jan 14 '12 at 12:40
-
Yes. Like the facebook or Twitter app icon in the Quick contact – user484691 Jan 16 '12 at 20:29
3 Answers
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. 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:
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. The shown icon is that one defined in your authenticator.xml file.
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.

- 11,053
- 14
- 62
- 116
-
I am not worried about the Intent behavior. Will this intent-filter show my app icon right next to facebook or twitter in the quick contact, and the answer is NO. When i tap on the Text Message icon from the quick contact, a context menu is inflated which shows options through which you want to complete the action. The question still stays. – user484691 Jan 17 '12 at 16:46
-
that's weird because your application should be shown unless there are too many application registered and your phone decides to show only a subset. Where did you add that filter? – kingston Jan 17 '12 at 17:19
//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>

- 381
- 7
- 19