nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.25k stars 1.76k forks source link

Manage shortcuts #6363

Open stefan-niedermann opened 4 years ago

stefan-niedermann commented 4 years ago

Origin: https://github.com/nextcloud/android/pull/5522 by @wiwie

We should provide Android shortcuts (available since Android 7) for different purposes. Best example would be custom "jump targets", so one can create customized launchers.

Main issue is that this feature won't be used by everyone and therefore will clutter the menus everywhere, so we have to find a way to provide this feature without disturbing other people.

Proposal:

1. Create one static shortcut "Add shortcut" *

This will appear when long pressing the main app launcher:

grafik

2. Starting this shortcut will launch a "Manage shortcuts" picker

This should launch some kind of "target" picker where the user can navigate to the folder / file which should be the target of the shortcut.

Advantages:

* Why only "Add shortcut" and not "Manage shortcut"? Because android only allows to add new shortcuts but not delete existing ones. This is completely up to the user. Attention: The implementation has to catch the case where a shortcut has been launched for a file / folder which does no longer exist.

Possible follow-up issues (out of scope for this issue):

tobiasKaminsky commented 4 years ago

Let us also discuss which shortcuts we want to have, so that development does not go in wrong direction. My suggestion would be to start with:

From sidebar:

General:

stefan-niedermann commented 4 years ago

I like your proposal. It sounds like a good compromise: Add "⭐️ Favorites" and "🖼 Photos" as two other static shortcuts and allow to pin shortcuts to files / folders from the picker to the homescreen ("➕ Add shortcut"). No need to display dynamic shortcuts in the first step directly at the launcher.

Technical side note:

While the API allows to display up to 5 shortcuts when long pressing the main launcher, most of the default launchers will only display 4 shortcuts when long pressing the main launcher. If we have the "➕ Add shortcut" shortcuts feature there (as suggested in this issue), we will have that as 1 permanent shortcut, so 3 free shortcut places which we could fill.

aslmx commented 3 years ago

Any news? I read through the issues and later ended up in this PR and it looked to me like it is almost finished. it would be a very useful feature. Thanks to anyone who contributed!