-
-
Save ampersandcastles/3087501 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
packman.getPackageInfo("com.twitter.android", 0); | |
builder.setNeutralButton(R.string.follow_koush, new OnClickListener() { | |
public void onClick(DialogInterface dialog, int which) { | |
// this is the intent you actually want. | |
// grabbed this by hooking a debugger up to twitter and debugging into android source. | |
Intent i = new Intent(); | |
i.setClassName("com.twitter.android", "com.twitter.android.ProfileActivity"); | |
i.putExtra("screen_name", "koush"); | |
try { | |
startActivity(i); | |
} | |
catch (Exception ex) { | |
// uh something failed | |
ex.printStackTrace(); | |
} | |
} | |
}); | |
} | |
catch (Exception ex) { | |
// not installed | |
ex.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment