1. Are you ready for the Galaxy S20? Here is everything we know so far!

Android 6 - how to open Firefox from my app?

Discussion in 'Android Development' started by senglory, Aug 15, 2019.

  1. senglory

    senglory Lurker
    Thread Starter

    In Android 4 & 5 the following code worked perfectly:
    Code (Java):
    1. private void shareImageWithUri(Uri uri) {
    2.         Intent intent3 = new Intent(Intent.ACTION_MAIN, null);
    3.         intent3.addCategory(Intent.CATEGORY_LAUNCHER);
    4.         intent3.setComponent(new ComponentName("org.mozilla.firefox", "org.mozilla.firefox.App"));
    5.         intent3.setAction("org.mozilla.gecko.BOOKMARK");
    6.         intent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    7.         intent3.putExtra("args", "--url=" + uri.toString());
    8.         intent3.setData(uri);
    9.         startActivity(intent3);
    10.     }
    It opened a FF instance and navigated the Firefox at the passed url. In Android 6 I am still getting the FF opened, but it does not recognize the passed url and therefore leave the tab clean. How can I pass an url in app start arguments in Android 6?
     


Loading...
Similar Threads - Android open Firefox
  1. Rob
    Replies:
    3
    Views:
    474
  2. AlanPr
    Replies:
    0
    Views:
    324
  3. AirCatHeavy
    Replies:
    5
    Views:
    4,154
  4. ariecanicomp
    Replies:
    2
    Views:
    781
  5. Android News
    Replies:
    0
    Views:
    226
  6. Buchheitpaul
    Replies:
    7
    Views:
    794
  7. Buzzword Consulting
    Replies:
    19
    Views:
    1,248
  8. Buzzword Consulting
    Replies:
    0
    Views:
    267
  9. Pawan Choudhary
    Replies:
    1
    Views:
    618
  10. ironass
    Replies:
    12
    Views:
    1,043

Share This Page

Loading...