1

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:

  1. make it convenient to open many bookmarks at once.
  2. 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.

2

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 < $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 → Edit → 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'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.


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.

-1

Instead of storing bookmarks in a browser, you could save the links on your homescreen, and then put them all in a folder. Itd be quick access, and ive never heard of an android browser doing that. If youve heard of tasker, you could probaly set something up that you want

  • Dude, that's an awesome idea. Way to kick off your career on Android Enthusiasts! – Aaron Gillion Mar 6 '16 at 3:06
  • 1
    I'm not sure I understand... if I put all the bookmarks in a folder on a homescreen, will that allow me to open them all in one click? Thanks. – MountainX Mar 6 '16 at 8:26
  • That's where tasker would come in – Zachary Sluder Mar 6 '16 at 15:42
  • 1
    It would help if you clearly and in detail explain us how Tasker can be used here. – Firelord Mar 6 '16 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.