How mobile Firefox addon can recieve information from it's Desktop version? (if both are logged in) - firefox

I want to be able to close tabs on my mobile Firefox, while using Desktop version of Firefox. I thought Tab-sync would make it work, but it doesn't. So now I'm on the quest to fix it with an extension.
I have thought about using sync area of storage (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/sync) but it's not supported on Android.
Do I have to build some external service to send command from Desktop version to that service and then use Mobile Firefox extension to do the polling or there is a better way to utilize fact that I'm logged on both of these devices.
Any ideas please?

Related

Is there an equivalent of chrome's nativeMessaging API in Internet Explorer?

On chrome, extensions can exchange messages with native applications with the help of native messaging APIs How can we achieve this on IE?
use-case : We have our own desktop application which users can download and install from our site. Next time when they revisit, we should be able to detect if the native application is installed and launch if its available.
We were able to build a solution on chrome with the help of an extension which makes use of chrome native messaging APIs to connect to native application.
Need something similar on IE browsers or a generic solution which will work across all major browsers.
You might want to have a look at URL handlers, they are supported for Firefox, Chrome and Internet Explorer.
Basically it enables you to register for example myapp:// for the browser and then you can have the browser call the application that is registered to this handler.
This is a technique which for example uTorrent uses to open trackers for torrent:// and magnet://.
You can check these links for details or search for solutions here on SO:
https://developer.mozilla.org/en/docs/Web-based_protocol_handlers
https://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx
https://developer.chrome.com/apps/manifest/url_handlers
If you have the desktop application installed, you can just install the BHO in the IE. This BHO should handle Navigate events from the browser, then, when user navigates to your site, BHO will indicate to the site, that the your app is present on the system. For example, BHO can inject some "marker" node on the page or call some predefined JS function on the your site's page. Also this BHO can perform some additional communication with you desktop app via the COM (or you can emulate manually int the BHO the protocol used in Chrome native messaging) and use the same approach as for Chrome.

How to create a desktop notifications for your web application?

I've tried searching and surprisingly I couldn't find anything on this. I have seen a few web apps that have desktop applications. For instance in gmail you can go into the settings and enable desktop notifications and get an alert even if you don't have the browser open at all. Also, there is an app called "slack" that I have been playing around with and I somehow got desktop notifications enabled. Also, google hangouts gives me notifications every once in a while. I don't know if this is a google chrome thing, or if it is a mac specific thing. Does anyone have any idea how these apps are posting these notifications?
Is it a browser specific thing? A platform specific thing? Did I download some type of desktop app that I have forgotten about that is enabling these apps to do this? Has anyone else created a desktop alert for their web app and how did you do it?
A similar question asked -
Chrome Desktop Notification.
From a front-end standpoint, there is EventSource for this, though you could also use websockets or polling (checking every few minutes/seconds).
Event Source and Server-Sent Events.

Remote Screen Sharing in realtime like SharedView, TeamViewer

What technologies would I need to know to write an app like the now defunct Microsoft SharedView or something like TeamViewer? Any way to do it with a browser and not need a client app?
I'm a .NET developer, but figure I'd need to know C++ or driver stuff?
How would you stream the users desktop to another user? How do you even capture it in realtime?
I can imagine how you could take screenshots of the desktop and transfer them, but how do you capture live video of the screen of application and stream it to another user.
There are many apps that do this: Skype, GotoMeeting, TeamViewer, SharedView, Citrix, logmein, etc. but I'd like to write my own.
How would I get this to work on Windows, tablets, droids, etc...?
The browser seems to be a good platform for this, but there are some limitations
1 - flash doesn't work at all on IOS, and is not widely available on android.
2- Webrtc works with chrome, firefox and opera on mac/pc/linux, and with firefox/chrome on android. There's librairies to use webrtc from an IOS native app(in objective C). Screen Sharing on the other hand only works with chrome (pc/mac/linux). There's a work in progress in firefox.
3- Installation of browser plugins will be hard if not impossible on various platforms, but it can open some possibility : on chrome and firefox you can make them with javascript. For example a javascript extention can share a tab in chrome.
Using javascript you can stream from a desktop to any other desktop / android.

Network panel not working in weinre

I wanted to write an AJAX based hybrid Android application.
I tried to get my head around weinre but I can't get the network panel to appear. It does not show regular network interactions and for any XHR interaction it states "status pending" and "type pending".
Has anybody else faced this problem?.
This link did/did not solve the problem: https://issues.apache.org/jira/browse/CB-5424
Weinre is pretty limited, and nowadays better solutions exist to inspect your Hybrid app:
On Android 4.4 and above (or lower Android if you're using CrossWalk), you can use Chrome https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging Just point to chrome://inspect/#devices and you should see your device and hybrid apps and browsers. You may need to first run adb start-server for Chrome to see your device
On iOS, you can use Safari (on a Mac): you need to enable Web Inspector on Safari on iOS, and use the Developper mode of Safari on the Mac. See eg http://developer.telerik.com/featured/a-concise-guide-to-remote-debugging-on-ios-android-and-windows-phone/

Mac App Store app with Safari Extension

I'm trying to understand how an app like 1Password can be on the Mac App Store and come with a Safari extension (and most importantly, how can the extension communicate with the app) because I'd like to do the same.
Is the native app running a server as a subprocess that get's called by the safari extension?
I'd like to know if it's possible to do that and still be Mac App Store + Sandboxing friendly.
1Password uses an agent to communicate between the Mac App and the Safari Extension. The agent is most likely a small server process that can receive RESTful calls from the extension(s). This mechanism allows the synchronization between all the different extensions (Safari, Chrome, Firefox, etc), the client and the main database.
The Safari extension is no longer installed directly by the 1Password app, by the way. Instead, you are directed to a web page that contains the Safari extension download, thus making the App sandbox-friendly.
I believe it's a regular .app that has a Safari extension inside it as a resource.
The app will check for the existence of the Safari extension on application launch, and if it doesn't find it in the default locations it will prompt the user to install it. If the users chooses to install it, the app copies the extensions to the Safari extensions folder.

Resources