Advertisement
stevekamau

Untitled

Jan 21st, 2017
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1.  
  2. @VisibleForTesting
  3.     public Uri buildDeepLink(@NonNull Uri deepLink, int minVersion, boolean isAd) {
  4.         // Get the unique appcode for this app.
  5.         String appCode = "kg967;
  6.  
  7.        // Get this app's package name.
  8.        String packageName = getApplicationContext().getPackageName();
  9.  
  10.        // Build the link with all required parameters
  11.        Uri.Builder builder = new Uri.Builder()
  12.                .scheme("https")
  13.                .authority(appCode + ".app.goo.gl")
  14.                .path("/")
  15.                .appendQueryParameter("link", "http://duka.io")//deep link url
  16.                 .appendQueryParameter("referrer", asp.getBusinessUserName())
  17.                 .appendQueryParameter("apn", packageName);
  18.  
  19.         // Return the completed deep link.
  20.         return builder.build();
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement