Back to project page saostar.
The source code is released under:
Apache License
If you think the Android project saostar listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.azyobuzi.azyotter.saostar; /*from ww w . jav a 2s .c o m*/ import android.net.Uri; public class TwitterUriGenerator { public static Uri tweetWebIntent(String status, long inReplyTo) { Uri.Builder builder = new Uri.Builder().scheme("https").authority("twitter.com").path("/intent/tweet"); if (!StringUtil.isNullOrEmpty(status)) builder.appendQueryParameter("status", status); if (inReplyTo >= 0) builder.appendQueryParameter("in_reply_to", String.valueOf(inReplyTo)); return builder.build(); } public static Uri tweetPermalink(String screenName, long id) { return Uri.parse("https://twitter.com/" + screenName + "/status/" + id); } public static Uri search(String query) { return Uri.parse("https://twitter.com/search/" + Uri.encode(query).replace("#", "%23")); } public static Uri userPermalink(String screenName) { return Uri.parse("https://twitter.com/" + screenName); } }