Why my firefox for android extension is deactivated on its own?

the error was caused by the tabSelect event listener, it was added in the wrong place, to make it work properly, I did this:

//adding the listeners

       let addListener = function() {

window.BrowserApp.deck.addEventListener("TabSelect", function(){ watchTab(window);}, false); window.BrowserApp.deck.addEventListener("pageshow", function(){ watchTab(window);}, false); window.NativeWindow.toast.show("Starting to detect trackers.", "long"); };

       if(window.BrowserApp.deck) {
       // BrowserApp.deck  has been initialized
       else {
       // use the chrome window to wait for
BrowserApp to initialize

Then of course I removed these listeners later.

Related to : Why my firefox for android extension is deactivated on its own?
Detect address bar changes firefox android extension
I don't know why "load" is not working for you. I do know that "load" is sometimes not called, when loading a page from back/forward session history for example. To work around that, you could try using the "pageshow" event. That will be called for any page-change. For more info see: https://developer.mozilla.org/en-US/docs/Code_snippets/Mobile
Extend existing Firefox extension/Use functionality of existing Firefox extension in own extension
There's no documentation about a reliable way to achieve this (there used to be a way in Firefox < 4) but you should be able to roll your own dependency check in your add-on code using the AddonManager API: Components.utils.import("resource://gre/modules/AddonManager.jsm"); AddonManager.getAllAddons(function(aAddons) { // Here aAddons is an array of Addon objects }); More info: https://de
including a js file in bootstrap.js firefox for android extension
Actually, content is supported in bootstrapped add-ons since quite some time (first in Gecko 8 and starting with Gecko 10, it will auto load manifests, IIRC). You can load js code modules from chrome://yourpackage/content/... not just from resource-URIs (since Gecko 4, IIRC). So there is nothing holding you back from using mozilla-style code modules. Also, a couple of add-ons manually add resource
nsIPrefBranch for Firefox for android extension returns NS_ERROR_UNEXPECTED
Bootstrapped (restartless) add-ons do not support auto-prefs via defaults/preferences. It is the responsibility of your bootstrap code to set up default preferences accordingly. Since your auto-prefs were never loaded, the getCharPref() call has to fail. You will need to get the default branch and seed your preferences. An easy way to do so would be: const PREF_BRANCH = "extensions.myaddon."; c
How do I listen to an app that is deactivated from another app - Android
If by "activating" and "deactivating", you mean "moving to the foreground (resuming)" and "moving to the background (pausing)", there's no appropriate way to do what you're asking, since no broadcasts are fired when apps launch. You can use ActivityManager preferably in a Service like follows: ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .