0

I have a question for you. I would who in my application when i click on twitter's (or facebook, google+) icon I go on twitter's application on my page or, if the user don't have twitter, go on www.twitter.com/...... ! How i can do this?

Matteo Cardellini
  • 804
  • 2
  • 16
  • 39

1 Answers1

0

You can start a new activity with the use of Intents. Please see this question here: How to start activity in another application?

If the activity you want to start doesn't exist, startActivity() throws an ActivityNotFoundException. That way, if the exception is thrown you know the user doesn't have Twitter installed, and you can open a webpage also by using an intent.

See here: How can I open a URL in Android's web browser from my application?

Community
  • 1
  • 1
Telmo Marques
  • 4,924
  • 1
  • 23
  • 34