15

Problem

Since updating to Android 5.1.1 I started using the new tab switcher merged with recent apps, however, every time I click on chrome I have to wait for it to open the last tab only to open a new one anyways, and if I wanted the old tab I could have opened it from the recent apps.

I tried creating a bookmark to use about:blank, which works except I don't have access to any bookmarks or history as from the new tab page, but when trying to link directly to the new tab page I am unable to find a method which works.

Using "about:newtab" I am given a transparent overlay on my launcher which shows as Chrome in recent apps.
Using chrome://newtab or chrome-native://newtab I receive a toast from the launcher stating "App isn't installed.".

I thought about creating a simple app with no UI which simply opens chrome to a new tab, or using Xposed to change it to open in a new tab on click, but am unsure how to go about this.

Question

Is there some file in system I could change to add Chrome as a handler for "chrome://" links?

What other method I could try in order to create a shortcut on my launcher to open a new tab for chrome?

More Info

  • Launchers Tested: Nova Launcher, Google Now Launcher
  • Chrome Versions: Chrome 45.0.2454.94, Chrome Beta 46.0.2490.34
  • Android Version: 5.1.1 LMY48M
  • Device: Nexus 5
Jsilvermist
  • 301
  • 3
  • 8
  • Did you try am start -n com.android.chrome/com.google.android.apps.chrome.ChromeTabbedActivity -d "about:newtab" --activity-clear-task (there are no line breaks) with root permissions? Although I'm confused what exactly you want. You can create an app shortcut which would execute that command. There are many automation tools that can do the job here. Related: Can I open Chrome on Android from command line ? – Firelord Sep 21 '15 at 03:13
  • @Firelord I tried using Tasker to create a shortcut to run that command, but it just gave this as a result: Starting: Intent { dat=about:newtab flg=0x8000 cmp=com.android.chrome/com.google.android.apps.chrome.ChromeTabbedActivity } Error type 3 Error: Activity class {com.android.chrome/com.google.android.apps.chrome.ChromeTabbedActivity} does not exist. – Jsilvermist Sep 21 '15 at 13:35
  • They have changed the activity name, as it seems. The revised command is: am start -n com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity -d "about:newtab" --activity-clear-task – Firelord Sep 21 '15 at 14:07
  • @Firelord Using the revised command I am no longer getting any errors, however, after the command executes the screen ducks slightly as if an activity is being launched, but nothing appears and there is nothing in the recent apps menu. Tested both using Tasker and Terminal Emulator. – Jsilvermist Sep 21 '15 at 14:34
  • It's working in my Android 5.0.2 but in Android 5.1.1 the behavior is erratic. Consecutively, it launches a window with single tab, and the next time I try the command, it shows the window with all the previous tabs in background. I don't know what's causing it. I'm running Chrome v45.0.2454.94. – Firelord Sep 21 '15 at 14:57
  • There is an action is Tasker under App -> Launch app. Long press the Chrome icon there to choose an activity and choose the activity com.google.android.apps.chrome.Main. Pass about:newtab in Data and execute the task. Tell us the results. – Firelord Sep 21 '15 at 14:59
  • @Firelord When running that I get the same result as when I tried using the Chrome Bookmark Widget launcher shortcut, an invisible overlay covers the screen, and when I open recent apps it shows "Chrome" with the last thing I had on the screen when trying to open it. Note however, if I type an http url instead of an about: or chrome:// url it will open chrome, but not to the page specified, instead it opens the page most recently accessed. PS: Added full version numbers to post. – Jsilvermist Sep 21 '15 at 18:30
  • The answers here might help you in the meantime by decreasing the time it takes for you last tab to load. Also, try Firelord's last am start suggestion but replace ChromeTabbedActivity with multiwindow.MultiInstanceChromeTabbedActivity. – Matthew Read Mar 11 '16 at 01:48
  • @Matthew Read This is the result I get when trying what I believe you meant: Error type 3 Error: Activity class {com.android.chrome/com.google.android.apps.chrome.multiwindow.MultiInstanceChromeTabbedActivity} does not exist. – Jsilvermist Mar 13 '16 at 15:55
  • If you're to the point of building apps to get more out of Play-Store versions of Chrome you might want to look into the Chromium browser. It rolls out new (relatively stable when compared with something like Firefox)builds constantly. In Chromium just navigate to 'chrome://flags' for a ridiculous amount of customization options. – andDevW Oct 09 '16 at 21:07
  • I think the answer is similar to this question here: Open Incognito from Shortcut – Gokul NC Jan 16 '17 at 10:13

2 Answers2

5

Solution for Android 7.1 (API level 25) and higher

If you're using a launcher which supports App Shortcuts you can:

  1. Long-press the Chrome icon to bring up shortcuts.
  2. Long-press the New tab shortcut and drag to desired location.
  3. Use the new shortcut to launch Chrome with a new tab.
Jsilvermist
  • 301
  • 3
  • 8
  • 1
    +1. This works. I use Sesame app to launch the new tab from anywhere in Android and I'm on Android 7.1 too. – Firelord Jul 13 '18 at 02:20
0

Try switching off the 'Merge tabs and Apps' in settings. Then you will be able to open a new tab using the + icon at the top of the window. Swipe down the top pane to reveal all of your tabs.