how can i launch a app form other on Android

77 views Asked by At

How I can launch a Twitter application from another Android application? For example, in my application I have some social buttons when I pushed the button of Twitter now gone to twitter page, but I want to launch the twitter application. How I can do that?

3

There are 3 answers

0
Kamila Brito On
0
Panayiotis Irakleous On

You can try this:

try {
   startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?screen_name=" + twitter_user_name)));
}catch (Exception e) {
   startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/#!/" + twitter_user_name)));
}
0
user3629774 On

You should use an implict intent.you can read about it in general here, and there is a more specific solution for you here