1

In the contact list you can slide the contact to the left in order to send a message. I need my application to appear in the menu when the user does this, like whatsApp or Skype. The menu is:

"Complete action using:

-messaging

-myApp "

Is this posible? Thank you!

SolArabehety
  • 8,467
  • 5
  • 38
  • 42

3 Answers3

3

You need to add an intent filter for the actions you need your application to handle. You need to add these to your manifest.

In your code implement public void onNewIntent(Intent intent) and take the necessary acctions.

Take a look at this SO Post

Community
  • 1
  • 1
Orlymee
  • 2,349
  • 1
  • 22
  • 24
0

Your application needs to handle the action android.intent.action.CALL.

To handle this action, your application needs to register the following intent-filter.

<activity>
  <intent-filter>
    <action android:name="android.intent.action.CALL" />
    <category android:name="android.intent.category.DEFAULT" />
  </intent-filter>
</activity>
Chirag Shah
  • 3,654
  • 22
  • 29
0

For your app to come up in the list, you will need to have an intent filter for a unique data type. If multiple apps are capable of handling the same data, your app might not show, but a list will come up with your app and any other app that has the same filter.

Usually none of the default apps have intent filter for name mimetype. So by adding below intent filter your app will show up. But it is always preferable if you mention the right data so that your app will show up only for data that is present in the Contact. Whatsapp and Skype implement their own custom Mimetype and add this data to each Contact. You might have to do the same thing , if there are multiple apps that handle name mimetype

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="vnd.android.cursor.item/name" />
</intent-filter>
nandeesh
  • 24,740
  • 6
  • 69
  • 79