Java tutorial
//package com.java2s; import android.net.Uri; public class Main { public static final String BITBUCKET_BASE = "bitbucket.org"; public static String getBitbucketShareUrl(String repoIdentifier) { String[] arr = repoIdentifier.split("/"); Uri.Builder uriBuilder = new Uri.Builder(); uriBuilder.scheme("https").authority(BITBUCKET_BASE).appendPath(arr[0]).appendPath(arr[1]); return uriBuilder.build().toString(); } }