1

the usual way to launch an app is to tap on the icon of the app on the android homescreen. But I think about the following. Imagine you are browsing your contacts. Selecting a contact you have several buttons like call, message etc.

Is it possible to add your own button that would launch your own app passing the contact data? Is there any documentation on that?

I also would like to know if it is possible to manipulate the android sms app. E.g. when the user taps on a conversation it should launch my app.

So I hope you got my idea. Is it possible to do such thinks and how can I do it? Is there any documentation on that?

DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601

1 Answers1

2

I do not think you can modify another applications to include own buttons into their layouts. But if the idea is opening your application for particular actions (send sms, manage calls) that seems possible via intents.

For instance, when I open a contact and click to send sms to particular number device shows two applications capable doing that: standard messaging tool and skype, which is installed on the phone.

Similar things happens when I try to open a file. I see message that several applications capable (have set intents) to work with the file, and I can choose default one.

Aleksei
  • 307
  • 1
  • 4
  • 12
  • ok, and do you have a link to a documentation tha describes that`? – DarkLeafyGreen Oct 27 '11 at 13:22
  • There are a lot of stuff. I found very useful [article](http://www.vogella.de/articles/AndroidIntent/article.html), and android [reference](http://developer.android.com/reference/android/content/Intent.html) – Aleksei Oct 27 '11 at 13:29
  • As working with SMS intents, this [article](http://mobiforge.com/developing/story/sms-messaging-android) could be useful – Aleksei Oct 27 '11 at 14:30
  • thanks so far, have you any other experiance with sms on android? I mean e.g. IF I impelement sms history, it would be nice If I have I could recognize incomming sms and launch my app.... – DarkLeafyGreen Oct 27 '11 at 14:40
  • I've not much experience in Android at all :) But reading sms history or receive sms is possible. Examples are [here](http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-sms-messages/) and [here](http://stackoverflow.com/questions/4637821/how-to-analyze-incoming-sms-on-android). Unfortunately didn't try it myself, but hope it would help. – Aleksei Oct 27 '11 at 14:47
  • BTW, if you'd like to keep your application non-active but alive (as a demon), consider make it as a [service](http://developer.android.com/reference/android/app/Service.html). Otherwise it can be killed – Aleksei Oct 27 '11 at 14:50