reference-browser
reference-browser copied to clipboard
Launcher shortcut for downloaded files not working
Steps to reproduce
- Download a file with a device that supports app shortcuts (https://developer.android.com/guide/topics/ui/shortcuts)
- Keep the notification (closing the notification removes the shortcut)
- There is a shortcut to the downloaded file when long clicking on the app icon in the launcher (I think that comes along with notifications)

Expected behavior
On step 3, it should open the downloaded file (as the click on the notification)
Actual behavior
Clicking on the shortcut does nothing.
Device information
- Android device: Huawei P40, Android 10, EMUI 10.1.0.121
- Reference Browser version: 9c262f07918a4c85f8ee1b0dd1965081b8f4c0f9 - debug build from android studio.
Thanks for filing this issue!
I think this is intended on Android, you can read more here, looks like every OS maker can customize this to its liking, in this case Huawei doesn't make it clear that this is a notification not a shortcut, this is my screen on Android 11 pixel 3, that stock Android version, here you can see in the ui the distinction. I will close this issue as developers we can't control how OS makers tweak features, please feel free to re open if needed.

After a few tests, I think there is still something wrong. As you say, every OS will handle this shortcuts differently, but I made comparison with other apps, on the same device, same OS:
- On Opera, there is a notification, but no app shortcut
- On Chrome like browser (Chrome, Ecosia, ...), There is the app shortcut, but it is responsive and opens the file on click
So I'd like to re-open it. I'm willing to help, but I can not find where the ShortcutManager API is used.
Thanks for keeping testing. Sorry I missed that for you clicking on the shortcut doesn't work, in my device(Pixel 3 Android 11) when I click on it, it takes me to open an intent chooser for selecting an app for opening the file, the same action as if I click on the notification on the status bar. For downloads with are not really creating a shortcut, I think the OS is creating it as part of the creation of the notification we are creating it here
When you completed a download does it open the intent chooser when you click the completed download notification on the status bar?
Yes, the click on the notification does work well.
Also, this is a bug reported to me by a test team from Huawei itself, I'll ask them also, with the details you provided about the notification creation.