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?
Asked
Active
Viewed 89 times
0
-
See this question: http://stackoverflow.com/questions/2209513/how-to-start-activity-in-another-application – Telmo Marques Dec 18 '11 at 19:30
-
Thank you but how can i go on my page on twitter (@matteocarde) ? – Matteo Cardellini Dec 18 '11 at 19:37
-
Please see my answer. Be careful when asking new questions, search your problem before asking to avoid duplicate questions. – Telmo Marques Dec 18 '11 at 20:16
1 Answers
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
- 5,066
- 1
- 24
- 34