# Device Detect

**URL:** <https://discourse.mozilla.org/t/device-detect/8105>\
**Category:** Add-ons\
**Created:** [April 15, 2016, 7:21am UTC](https://discourse.mozilla.org/t/device-detect/8105 "2016-04-15T07:21:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ulmdesign](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/ulmdesign/32/11068_2.png) [@ulmdesign](https://discourse.mozilla.org/u/ulmdesign)\
**Post date:** [April 15, 2016, 7:21am UTC](https://discourse.mozilla.org/t/device-detect/8105/1 "2016-04-15T07:21:32Z")

</div>

I developed this firefox extension purely for Android: [https://addons.mozilla.org/it/android/addon/device-detect/](https://addons.mozilla.org/it/android/addon/device-detect/)

currently emerges a problem with this browser extension for Android: I  
don’t see in the native menu and in PageActions to Firefox for  
Android, the voice and icon associated “Detect my Device”. Firefox  
version 45 is that used on my tablet Samsung Android 4.4.2. This is main file of extension: [https://addons.mozilla.org/it/android/files/browse/424674/file/index.js](https://addons.mozilla.org/it/android/files/browse/424674/file/index.js) and I used High Level APIs

Please,  
Someone can tell me if I have used correctly NativeWindow.menu.add and  
PageActions API fennec in index.js file of my add-on Device Detect?

Thanks in advanced to help me in this project

---

<div class="post-metadata">

**Author:** ![noitidart](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@noitidart](https://discourse.mozilla.org/u/noitidart)\
**Post date:** [April 15, 2016, 7:12pm UTC](https://discourse.mozilla.org/t/device-detect/8105/2 "2016-04-15T19:12:09Z")

</div>

It might be `const recent = utils.getMostRecentBrowserWindow();`

It may be the caching. I know when I did an android addon a bit ago that even though it seemed like there was one window, it would close and open again (without having exited). There was some funkiness where I had to use `Services.wm.getMostRecentBrowser('navigator:browser')`

Your NativeWindow usage looks fine.

Also looks fine by the docs:

[https://developer.mozilla.org/en-US/Add-ons/Firefox\_for\_Android/API/NativeWindow/](https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/NativeWindow/)

---

<div class="post-metadata">

**Author:** ![ulmdesign](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/ulmdesign/32/11068_2.png) [@ulmdesign](https://discourse.mozilla.org/u/ulmdesign)\
**Post date:** [July 10, 2016, 6:52pm UTC](https://discourse.mozilla.org/t/device-detect/8105/3 "2016-07-10T18:52:47Z")

</div>

Thank You Noit…  
These your informations is really precious on the proper usage of Fennec API
