Unobtrusive notification - firefox-addon-webextensions

Is it possible to create a notification like redirection alert in firefox in a webextension?
This notification appears on top of the page.

No, it is not currently possible for a WebExtension to create the type of notification which you are asking about.
WebExtensions can create notifications using the notifications API. Such notifications are desktop notifications. How these notifications appear will depend on the OS and windowing system on which the browser is running.
If you desire the type of notification imaged in you question, you could create an API using a WebExtensions experiment which would do what you desire. If adopted, such an API would be migrated into Firefox and become a standard part of WebExtensions.

Related

listen to Firestore's onSnapshot while app is not running

I want my app to be able to listen to onSnapshot while it is in background , I know that I can use background task for this by I don't know how to set it up .
btw I'm trying to implment this so that my app can push a notification whenever a new doc is received while app is in the background .
Most mobile operating systems severely limit what the app can do while it is backgrounded. Keeping an active connection open to a server is one of those things that has never been allowed on iOS, and has gotten more restrictive with recent Android versions.
The better approach is to run the code that detects a relevant change on a server, and then use Firebase Cloud Messaging (or APNS directly if you're only targeting iOS) to send a notification to the user. When they they tap on that notification, your app is started and you can load the data from Firestore.
If you don't want to run your own server, Cloud Functions is a common alternative for this, as it has built in triggers that respond to changes in Firestore. For an example of this exact scenario, see the documentation on notify users when something interesting happens.

Show desktop notification from one windows app (WPF) to another using webservice call

I have created WPF app and installed in two different PC. now I want that when I click one button from app in 1st PC, then I should get desktop notification in 2nd PC.
So I don't know how it will be done. Whether I have to use WCF or not or anything else? If I've installed this app in multiple PC then how should I send notification to particular?
I've tried to use signalR but I didn't understand how to invoke windows form method.
The application will not be closed. it'll just minimized in the tray. so my idea is that we can invoke App method from using WCF and show notification.
I want this kind of notification for my app but from webservice:
You can use self hosted WCF like here:
https://msdn.microsoft.com/en-us/library/ms731758(v=vs.110).aspx
Use net tcp binding, it will not require administrative rights.
Also there is a need to maintain a list of addresses/hosts of the PCs where your app runs. Then according to some logic you have there, choose the one that should show your notification.
You can also use a central app that coordinates, it may be a web app. Then signalR can be helpful. It becomes like a standard chat app... google can find you plenty of implementations for that.

Disabling mobile web browser notifications when native app is installed

I'm at the beginning of spec'ing out a project to implement browser notifications. From a high level it appears like it will be something similar to:
Create a service worker which subscribes to a pubsub topic.
Leverage the Notifications API and WindowClient to publish a browser notification when an event happens and the window is in a non-foreground state.
Seems, straightforward enough. However, I'm getting a bit hung up from a mobile perspective. Namely, it seems to be the typical pattern that if a mobile device has both the mobile website open and an application installed, the native notification should take precedence and the browser notification should be silenced.
However, I can't seem to figure out how a service worker would inspect for the presence of a mobile application. It is entirely possible that I'm approaching this problem from the wrong perspective though, and the typical recipe for this is handled differently.
Brent, IIUC your question is a non-issue because topic-based subscription is simply not supported by either the W3C Push API or the IETF webpush protocol. I'm afraid that this is by design :-(
Therefore your native app will not be delivered the same broadcast message as your browser UA.
If OTOH you were talking about save-to-homescreen WebApp and a web-page running in a tab then, I believe, your service worker can choose which member of the active client collection to foreground (if necessary) but there will only be one toast message (if at all given rules governing blind/invisible notifications)

Does bluemix have an API to fetch application monitoring/metrics results?

I see that bluemix has a service called Monitoring and Analytics. All I see from that service are dashboards. I am looking for the information the dashboards are providing in the form of an API. For example, if I want to be notified that my application is down or it is slow running, etc .. Is there a way for me to either receive such alerts or for an API that I can poll periodically?
thank you
The Monitoring & Analytics service does not offer an API to retrieve its collected metrics. We realize that supporting a programmatic interface would be helpful and it's in our backlog to add that capability.
However, M&A does support the other part of your question regarding alerts. There should be an Events tab in your dashboard. In the upper right corner, there's a dropdown to "Configure events policy". If you select it, you can enable Availability alerts ("Is my app down?") and/or Performance Monitoring alerts which are geared to the app's run-time type (Liberty, Node.js, etc.). In that same dropdown you can also "Configure notification". If you specify your email address in the notification dialog, you will start receiving alerts when your Bluemix application is down or running slowly.

Using GAE channels without browser

I want to write GAE based application that synchronizes information between computers/phones. Right now I am only querying periodically, which causes delays or requires user to click a button to refresh manually.
With GAE channels, it should be possible to do it this way that a device can be notified when it should refresh. However, since I want it to be a desktop app (not web app), I am wondering if I can write my own client to channel API? Or grab whatever's out there.
Is the protocol documented or are there clients available for anything other than JS?
The only official interface is the Javascript client library. Although you could reverse-engineer how it works, since it's not a documented part of the interface, it could change at any time without notice.
If you're interfacing with Android phones or iPhones, each of them has a 'push' messaging API that you could use (Cloud to Device Messaging for Android, and Push Messaging for iPhone).
There is now a Java implementation for the Channels API. It was just released days ago and is available via git at https://github.com/gvsumasl/jacc. I've also taken the liberty of forking it and providing a mavenized version at https://github.com/hatboyzero/jacc.

Resources