• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android 6 - how to open Firefox from my app?

senglory

Lurker
In Android 4 & 5 the following code worked perfectly:
Java:
private void shareImageWithUri(Uri uri) {
        Intent intent3 = new Intent(Intent.ACTION_MAIN, null);
        intent3.addCategory(Intent.CATEGORY_LAUNCHER);
        intent3.setComponent(new ComponentName("org.mozilla.firefox", "org.mozilla.firefox.App"));
        intent3.setAction("org.mozilla.gecko.BOOKMARK");
        intent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent3.putExtra("args", "--url=" + uri.toString());
        intent3.setData(uri);
        startActivity(intent3);
    }

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?
 
Back
Top Bottom