Closed Bug 1091718 Opened 10 years ago Closed 3 years ago

Pass intent:// urls to notifications

Categories

(Firefox for Android Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: wesj, Unassigned)

Details

Notifications.jsm currently lets you register some javascript to be notified when a notification is clicked or closed. It would be nice to avoid loading Gecko if we don't need to (i.e. if you click a downloaded file, just launch it).

On potential way to do this would be to have Notificaions.jsm send up an intent:// url to java itself rather than sending a bunch of keys and having Java build the intent. For the default case, that intent url would be built by Notifications.jsm itself and would just do what our current notification clicking code does. For custom cases, the intent could launch a different app/app-picker.

I think having the ability to create intent urls in JS would likely be useful in other places as well (i.e. a home-panel that wants to launch an app when a page is clicked), so I'd like to factor it into its own jsm.

I have some worries about building intent urls in JS working correctly across all versions of android but the algorithm for it is pretty simple and hasn't changed much in the last few years.

androidxref.com/4.2.2_r1/xref/frameworks/base/core/java/android/content/Intent.java#6514
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.