Closed Bug 790452 Opened 12 years ago Closed 4 years ago

Expose Activity Context to js-ctypes

Categories

(Firefox for Android Graveyard :: General, enhancement)

ARM
Android
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: cscott, Unassigned)

Details

When writing an native add-on for Firefox/Android, one often needs to be access the Context object associated with the Activity. The Android Context is necessary for (among other tasks) getting system service handles, sending broadcast intents, starting activities, etc. The context is current available in a hacky way via the static field org.mozilla.gecko.GeckoApp.mAppContext. You can see two add-ons which acquire the context this way and do useful stuff: https://github.com/cscott/intent-addon/blob/master/lib/main.js https://github.com/cscott/skeleton-addon-fxandroid/blob/master/bootstrap.js It would be better to have an official and supported API for getting access to the Context object for the Firefox activity.
CC'ing folks for thoughts here
OS: Linux → Android
Hardware: x86 → ARM
enhancement request.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
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: 4 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.