Exemplo n.º 1
0
 public static void openWebBrowser(String string2, Context context) {
   if (string2 == null) {
     return;
   }
   Analytics.INSTANCE.newEvent(AnalyticsCategories.GALLERY_IMAGE, "open in web", string2);
   Intent intent = new Intent();
   intent.setAction("android.intent.action.VIEW");
   intent.setData(Uri.parse((String) string2));
   context.startActivity(intent);
 }
Exemplo n.º 2
0
 /*
  * Enabled aggressive block sorting
  * Lifted jumps to return sites
  */
 private void share() {
   String string2;
   Intent intent = new Intent("android.intent.action.SEND");
   intent.setType("text/plain");
   String string3 = "Image found with crumby!";
   if (this.image != null && this.image.getTitle() != null) {
     string2 = this.image.getLinkUrl();
     string3 = this.image.getTitle();
     this.url = this.image.getLinkUrl();
   } else {
     if (this.url == null) return;
     if (this.url.equals("")) return;
     string2 = this.url;
   }
   string2 =
       string2 + ". Found with Crumby, Universal Image Browser [http://tinyurl.com/getcrumby]";
   intent.putExtra("android.intent.extra.SUBJECT", string3);
   intent.putExtra("android.intent.extra.TEXT", string2);
   Analytics.INSTANCE.newEvent(AnalyticsCategories.SHARING, "image share", this.url);
   this.getContext()
       .startActivity(
           Intent.createChooser(
               (Intent) intent, (CharSequence) ("Share \"" + this.url + "\" via")));
 }