open multiple URIs with one click (similar to desktop Firefox "open all in tabs") I want to open a folder of about 20 bookmarks in a web browser with one click. So far I have not found any browser or any addon that will do this, but maybe I am overlooking something obvious.

An alternative option is a very good speeddial-type app that will help me track which which bookmark was opened last so I can manually work through a list of 20+ bookmarks. 

The problems I am trying to solve are:


make it convenient to open many bookmarks at once.
if I have to open them one at a time, provide a way for me to keep track of which bookmarks have already been opened in this session so I can manually open the next one as I go through the large list of bookmarks.


I have already tried Firefox sync, Dolphin Connect, XMarks and several other solutions and none of them do what I need.
It's not a perfect solution but it should help you out. Following preformatted text is a very simple script that can open a series of bookmarks which are tagged with a particular keyword. Each bookmark would be opened in the browser selected as default for the bookmark's URL type.

Script


#!/system/bin/sh

list=/data/media/0/bms_list;
keyword="$1";
browser="$2";
mkfifo $list;

# force-stop default browser
[[ "$browser" ]] && am force-stop "$browser";

# get URL of bookmarks associated with the supplied keyword
content query --uri content://org.mozilla.firefox.db.browser/bookmarks --projection url --where "keyword='$keyword'" | busybox sed 's/.*url=//g' > $list &

# Take each URL from the saved output and launch it using the default browser 
while read line; do  
    am start -a android.intent.action.VIEW -d "$line" --activity-exclude-from-recents; 
    sleep 1; 
done &lt; $list
rm $list;


Prerequisites

Here are the hard prerequisites for the script to work:


You must have root access1.
Busybox must be installed and available under PATH variable.
Firefox Browser for Android is required. It is required because Chrome doesn't support tags, the bookmark folders are not visible through Chrome's content provider and it would be painful to me if I begin to parse Chrome's bookmarks file available in its private directory. I didn't test with other browsers so that's another reason why I made Firefox a prerequisite.

It is to be noted that you're not required to use Firefox browser as your daily driver, but only to make and keep bookmarks in it for them to be sorted through particular keywords. Firefox browser doesn't support multiple keywords for bookmakrs, as of v44.0.2.

To add a keyword: Bookmark a link in Firefox, go to Bookmarks tab, long press on your bookmark &rarr; Edit &rarr; add your keyword under Keyword. 

I've not tested with a keyword containing a space so if the script doesn't work with a keyword containing space(s), replace space(s) with _ in your bookmarks and then try the script.
I've only tested this solution with Firefox and Chrome so I can't guarantee that this would work with any browser. However, common sense dictates that if it is a browser for casual browsing, it would have registered for an intent having a URL data type, so the browser should have no problem with my script.

Note: For some reason, Firefox couldn't handle the series of bookmarks after some time and crashed. (It actually crashed every time.) On the other hand, Chrome v45.0.2564.95 didn't crash even for once.


Here's how the script can be executed after saving it under /sdcard with extension .sh:

Running the script

Install a terminal emulator app and execute:


su -c 'sh /sdcard/FILE KEYWORD BROWSER'


Example:


su -c 'sh /sdcard/bms_launch.sh Stack_Exchange com.android.chrome'  # this would launch all the bookmarks tagged with the keyword Stack_Exchange in the default browser com.android.chrome
 

Things to know:


FILE: file name of the script, e.g.: bms_launch.sh
KEYWORD: the keyword to which all associated bookmarks should be searched for and be launched in default browser
BROWSER: package name of your default browser. To know the package name, follow View app&#39;s full package name?

Note: it is not necessary to provide package name of the default browser. I used it because I had to force-stop Chrome as Chrome was causing some complication without a force-stop.


Convenient execution

How you would execute this script in your device is upon you to decide. I can recommend these two methods. Any of them would be enough.


a home screen shortcut made through Terminal Emulator app to a custom command on your home screen. 
Tasker, to create an icon on home screen, tapping which would execute the script.
assigning script to a pie using LMT launcher.




1 Root access is needed because I don't know how to generate (and easily parse) a list of bookmarks from some browser dynamically. Even if I can have such a list, I wouldn't be able to go on unless I know that those bookmarks can be sorted using a tag or a keyword. This is why I chose Firefox and root access.

The dependency on a single keyword might cause inconvenience but I've given you a (possibly good) idea. If your preferred browser supports multiple tags/keywords for bookmarks then you should have no problem in tweaking my script per your needs.