FORUMS
Remove All Ads from XDA

Android 6 - how to open Firefox from my app?

2 posts
Thanks Meter: 0
 
By senglory, Junior Member on 14th August 2019, 09:35 PM
Post Reply Email Thread
In Android 4 & 5 the following code worked perfectly:
Code:
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 w/o any questions 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?
 
 
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes