Android Twitter tweet Default Dialog? -
hi every 1 possible display default twitter tweet dialog in our application !
is possible in case possible how implement dialog?
note: i'm login twitter account in of application no need log in again want click button dialog display how one?
is looking ?
intent tweetintent = new intent(); tweetintent.settype("text/plain"); tweetintent.putextra(intent.extra_text, "---place default text here---"); final packagemanager packagemanager = getactivity().getpackagemanager(); list<resolveinfo> list = packagemanager.queryintentactivities(tweetintent, packagemanager.match_default_only); (resolveinfo resolveinfo : list) { string p = resolveinfo.activityinfo.packagename; if (p != null && p.startswith("com.twitter.android")) {//if native twitter app found tweetintent.setpackage(p); startactivity(tweetintent); } }
Comments
Post a Comment