Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 framework source.
// this let me inspect the contents of the intent.
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();
}
@HackerMager

This comment has been minimized.

Copy link

@HackerMager HackerMager commented Dec 28, 2016

kq4gftk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment