1

Is it possible to launch an option like which application you want to open on contact icon is clicked in Android? So when I clicked on the Android phone icon, then it should ask to whether you want to launch Android default app or my application.

Basically I have developed call log module of Android application with customization so I want to give user to select any option at click of Android phone icon.

So is it possible?

jokerdino
  • 2,027
  • 1
  • 23
  • 29
Rushabh Patel
  • 3,015
  • 4
  • 24
  • 57

3 Answers3

1

It is possible, in fact it happens naturally when you have more than one application installed for a desired action. Intent filters would help you.

Sukitha Udugamasooriya
  • 2,126
  • 1
  • 30
  • 55
1

it is possible. i try for Dail icon put this code in your androidmenifest file

<intent-filter>
    <category android:name="android.intent.category.LAUNCHER" />
    <category android:name="android.intent.category.DEFAULT" />

    <action android:name="android.intent.action.DIAL" />
</intent-filter> 

when clicked on call icon then open option complete action using list my application is in list.

i think also action tag available for contact icon.

Dhaval Jivani
  • 8,377
  • 2
  • 42
  • 38
0

No, it's not possible. When you click an icon in the launcher it simply launches the clicked app. You could instead ask the user which app to use in certain situations like when trying to call someone. I'm not very sure, but you might be able to ask the user which log to use when clicking on a missed call notification.

dragostis
  • 2,289
  • 1
  • 16
  • 33
  • 1
    ok so for example if i want to ask this at the time of call then what I have to do with the code? – Rushabh Patel Aug 27 '12 at 13:19
  • 1
    I don't know exactly, but you can start here: [Stackoverflow](http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension) – dragostis Aug 27 '12 at 13:33