简体   繁体   中英

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? 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.

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:

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. 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.

//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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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