# Webextension - How do I make the browserAction popup work on Firefox Android

**URL:** <https://discourse.mozilla.org/t/webextension-how-do-i-make-the-browseraction-popup-work-on-firefox-android/19014>\
**Category:** Development\
**Created:** [September 9, 2017, 7:42am UTC](https://discourse.mozilla.org/t/webextension-how-do-i-make-the-browseraction-popup-work-on-firefox-android/19014 "2017-09-09T07:42:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lapoozza](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/lapoozza/32/14274_2.png) [@lapoozza](https://discourse.mozilla.org/u/lapoozza)\
**Post date:** [September 9, 2017, 7:42am UTC](https://discourse.mozilla.org/t/webextension-how-do-i-make-the-browseraction-popup-work-on-firefox-android/19014/1 "2017-09-09T07:42:59Z")

</div>

- Is there any way that I can make it work?
- Also what should I do if my extension needs to ask for additional permissions later on. It does not see to work on Android.
- Is it possible to upload 2 version of the addon. One for mobile and more for desktop version of Firefox.

P.S. I tried on Firefox for Android 55.0.2

---

<div class="post-metadata">

**Author:** ![NilkasG](https://avatars.discourse-cdn.com/v4/letter/n/0ea827/32.png) [@NilkasG](https://discourse.mozilla.org/u/NilkasG)\
**Post date:** [September 9, 2017, 12:00pm UTC](https://discourse.mozilla.org/t/webextension-how-do-i-make-the-browseraction-popup-work-on-firefox-android/19014/2 "2017-09-09T12:00:31Z")

</div>

> Is there any way that I can make it work?

More or less. This is what I do:

```auto
// browser_action (can not be set in manifest due to fennec incompatibility)
!fennec && browserAction.setIcon({ path: manifest.icons[1], });
!fennec && browserAction.setPopup({ popup: '/view.html#panel', });
fennec && browserAction.onClicked.addListener(async () => 
    tabs.create({ url: `/view.html?forTab=${
        (await tabs.query({ windowId, active: true, }))[0].id
    }#panel`, })
);

```

> Is it possible to upload 2 version of the addon. One for mobile and more for desktop version of Firefox.

I think it is, but with the above approach, you don’t need to.

> Also what should I do if my extension needs to ask for additional permissions later on. It does not see to work on Android.

[It should](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/permissions#Browser_compatibility). Please elaborate.

---

<div class="post-metadata">

**Author:** ![lapoozza](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/lapoozza/32/14274_2.png) [@lapoozza](https://discourse.mozilla.org/u/lapoozza)\
**Post date:** [September 9, 2017, 12:18pm UTC](https://discourse.mozilla.org/t/webextension-how-do-i-make-the-browseraction-popup-work-on-firefox-android/19014/3 "2017-09-09T12:18:24Z")

</div>

Thanks for helping out.

Regarding the additional permissions, my extension cant seem to ask for additional permission in Android. In desktop this works without any issue. Here is a link to the addon: [https://addons.mozilla.org/en-US/firefox/addon/9anime-companion](https://addons.mozilla.org/en-US/firefox/addon/9anime-companion)

[https://github.com/lap00zza/9anime-Companion/blob/master/src/ts/dashboard.ts#L197-L230](https://github.com/lap00zza/9anime-Companion/blob/master/src/ts/dashboard.ts#L197-L230)

---

<div class="post-metadata">

**Author:** ![NilkasG](https://avatars.discourse-cdn.com/v4/letter/n/0ea827/32.png) [@NilkasG](https://discourse.mozilla.org/u/NilkasG)\
**Post date:** [September 10, 2017, 11:06am UTC](https://discourse.mozilla.org/t/webextension-how-do-i-make-the-browseraction-popup-work-on-firefox-android/19014/4 "2017-09-10T11:06:48Z")

</div>

Hm. I can’t see any obvious problems. Which API exactly are you using (`browser`/`chrome`, background page / visible extension page)? That shouldn’t but sometimes does make a difference if UI prompts are involved.

---

<div class="post-metadata">

**Author:** ![lapoozza](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/lapoozza/32/14274_2.png) [@lapoozza](https://discourse.mozilla.org/u/lapoozza)\
**Post date:** [September 10, 2017, 4:28pm UTC](https://discourse.mozilla.org/t/webextension-how-do-i-make-the-browseraction-popup-work-on-firefox-android/19014/5 "2017-09-10T16:28:23Z")

</div>

I am using chrome and background\_page. Also would it be okay if I talk to you via irc/pm.

---

<div class="post-metadata">

**Author:** ![NilkasG](https://avatars.discourse-cdn.com/v4/letter/n/0ea827/32.png) [@NilkasG](https://discourse.mozilla.org/u/NilkasG)\
**Post date:** [September 10, 2017, 9:38pm UTC](https://discourse.mozilla.org/t/webextension-how-do-i-make-the-browseraction-popup-work-on-firefox-android/19014/6 "2017-09-10T21:38:29Z")

</div>

There isn’t really much more I can tell you. I think it would be worth a shot to use the `chrome` or `browser` object of an open visible page.
