How do I get a desktop notification from a web app? - ruby-on-rails

I need to create a web app for a client, and one of the requirements is whenever an event is triggered there should be some desktop notification in Windows XP/7 that tells them of the event. Similar to the balloon that pops-up when a new file is added to a folder in Dropbox.
I am using Rails for the web app, but have never done any desktop development. What should I be looking at?

Would this: Growl Notifications from a Web Server
plus Growl for windows meet your needs? http://www.growlforwindows.com/gfw/developers.aspx

It may be worth looking at Noti.
This tool allows web apps to push notifications to a small app running on OS X, Windows and Linux.

Would RSS-enabling the application, coupled with a RSS widget on the desktop, suffice? This has a few drawbacks - for example, it requires setup on the workstations and is not immediate. But it is non-proprietary.
If this is a Windows environment, perhaps the application could use the Windows command msg.exe to pop up an alert box (assuming Windows messenger service is enabled on the workstations).

You can use Telegram (desktop portable version included) with TeleNotify gem. Downside is, your app must have HTTPS. But with CloudFlare you can get your app working with SSL for free, even without changing your source code.

Related

How to launch a non-background process from a Windows Service?

I have a Windows Service written in C# that launches an instance of the Google Chrome browser using PuppeteerSharp. See the launching code below:
string[] chromeArgs = { "--remote-debugging-port=9222" };
Browser browser = await Puppeteer.LaunchAsync(new LaunchOptions()
{
ExecutablePath = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
DefaultViewport = null,
Args = chromeArgs,
Headless = false // <-- this is important!
});
Even though I am launching the browser in non-headless mode, I don't see the Chrome browser actually being launched on my machine. I have confirmation that the browser does actually get launched because I see it show up in Task Manager.
I suspect that the Chrome browser is not visible because it is being launched from a Windows service which is a background process, so Chrome is automatically being launched as a background process. Is it possible to launch Chrome as a non-background process so I can see it? And if so, how?
I suspect that the Chrome browser is not visible because it is being launched from a Windows service which is a background process, so Chrome is automatically being launched as a background process. Is it possible to launch Chrome as a non-background process so I can see it? And if so, how?
Win32 services run in a separate session from user-visible applications. Among other reasons, this prevents a security vulnerability known as a shatter attack. So it's not just on a different desktop; it's in a different desktop, which is in a different Windows station, which is in a different user session.
While there is a hack you can put in that allows displaying a UI from a Win32 service, that hack should not be used. It requires lowering the security of the entire system, additionally lowering the security of that service in particular, and may stop working with any future Windows Update.
The proper response to "how do I show a UI from a Win32 service" is "you don't". There are a couple of alternatives:
Do you really need a Win32 service? Perhaps it should just be a regular app that is auto-run on login? Usually, Win32 services are used because they can run without a login, but in that case, I'd have to ask where exactly would you show the UI if there's no user logged in? So first, consider whether your application should really be a Win32 service or not.
If you do really need a Win32 service, and you need to show a UI, then the proper architecture is to split the existing app into a Win32 service and a separate executable that runs on login. When the Win32 service wants to display a UI, it uses some form of inter-process communication to tell the autorun application to display the actual UI.
Note that with option (2), you'd also need to decide how to handle the situation where there are multiple logged-in users (e.g., Remote Desktop sessions), and determine which session you want to display the UI on.

How does iphone Notifications on Websites works? Is need to install Application?

I have problem with understand how "Push Notifications on Websites" works on Iphone, Ipad, etc.
Default Browser Notifications don't work on mobile, but this: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/Introduction/Introduction.html
should be work fine!
There is good documentation how to install it, but how it works on user?
As i see, it`s 2 variants:
1) Modal Window to allow using notifications in browser like it`s working with default JS Notifications.
or:
2) Link to install application in AppStore. So, user install to device application.
So, if user download application, does this application add to desktop on device as other applications? What happing when user click on icon? Does click on application on desktop activate safari and open web-site? Or is it hidden application without icons on desktop?
I try to find some sites to check examples how it will work with my iphone, but i didnt find any sites. All popular sites say: "download application and active notifications THERE and use application for website".
So, i don't need special application for my site, adaptive design is awesome for me, but i want to use notifications on iphone!
Please, help me :) Thank you!
As you noticed the document states that this feature is available on OSX not on iPad, iPhone.
We see this notifications when we open a website on Safari. For instance,
As soon as we click the allow button, our Macbook communicates with Apple Push Notification Service to establish a persistent IP connection (along with a token exchange). When the website servers send notifications to the Apple Push Notification Service it forwards that notification to our Macbook/iMac.

How to remote desktop to an iOS device, a.k.a. how do Mobile Device Farms work?

I have been trying to understand how Mobile Device Farms like DeviceConnect, AWS Device Farm, SauceLabs, etc. get to remote control iOS devices, but I can't find anything on the subject. They get to do it without jailbreaking, which baffles me even more.
I love these kind of projects, because at the moment it seems undoable, but I know that it is possible ('they' are doing it).
With remote control I mean: seeing the screen of the iOS device on your computer screen and able to touch and swipe with your mouse.
Can someone please point me in the right direction as to how these technically work?
If you're using an iPad (in particular) or an iPhone (if you think you'll be able to make our any detail on the smaller screen) then using remote access to view and control what's on your friend's Mac is a good option. And the best way to remote-access a Mac from an iPad is to use Google's free Chrome Remote Access service, which lets you remotely use Mac programs from an iOS device.
It's quite an involved process to set it up the first time, but easy if you want to do it again in future. You'll need the Google Chrome web browser for Mac, and a Google account.
Here is link for Chrome Remote access
https://chrome.google.com/webstore/detail/chrome-remote-desktop/gbchcmhmhahfdphkhkmpfmihenigjmpp?hl=en
Open Chrome and go to Chrome Remote Desktop on the Chrome Webstore. Click Add to Chrome, then Add App. Click Allow, then Continue.
I will give you one approach and small explanation .
You will need to create application with all possible permissions at first also implementation handlers functions .
For example :
Works with files
Real native Socket connections (not http protocol) + need to have some main server signalling (domain or static ip).
Handle remote touch trigger (main problem for real remote/iOS)
Background part experience
Your app need to be non-Market app (more likely).
You can make Application with all possible options that apple give us.
What can you do remote with your app : -control camera/ Mic read geo data , work with galleries , delete or create files . Socket will be communication line .
Also app must initially started and make (on user request) always allow all permissions .
Use camera :
Send with socket some command example ( openCamera ) . AFTER receive this string perform action for opening camera .
If you can fix programability triggering touch events you can make remoteIOS.
More data links :
Q/A send remote events
Q about touch events
Q/A about Permisions
Sorry for the first quick answer,
All of these: DeviceConnect, AWS Device Farm, SauceLabs use Appium in order to control devices.
The component that execute the command is the WebDriver.
Appium have different WebDriver implementation in order to execute operations to different device.
The iOS WebDriver can be found here: https://github.com/appium/appium-ios-driver.
The protocol in use is the JsonWireProtocol.
more details can be found here:
http://appium.io/,
http://www.seleniumhq.org/
Regards

IBM Connections mobile application - any registered URL handlers?

On a mobile unit (iOS in this case) - I need to be able to open the connections mobile application to a particular profile, something like this: https://connectionsServer.com/profiles/html/profileView.do?userid=theProfileUID&lang=en_us
Triggering this URL would open the Connections application (if installed) and displaying the corresponding profile.
I doubt that IBM thought of it, but I you never know...
Thanks!
/J
The URL scheme for the IBM Connections app is of the form ibmscp://com.ibm.connections/.
Opening the app to a profile like your example would be done by opening the URL ibmscp://com.ibm.connections/profiles?userid=theProfileUID.
More information can be found on this IBM page.

Web Page for iPad: how to send data to server without PHP

I've developed a website that uses some PHP to write the client's user responses to a data file on my server. I've realized that the iPad cannot run PHP sites, and I'm at a complete loss as to what a good alternative would be. Javascript and HTML can't be used to write to a server, right? Help?
Thanks in advance.
Edit: I fixed it. The problem was that the iPad has problems with recognizing .click. I had to change it to .bind("click tap touch", function.... instead. It's weird how it was still able to recognize the click events that did not initiate a form submission (that is, when I was still using .click, the button worked, except for when it had to submit a form).
You'll need to put the PHP scripts up on a web host (e.g. GoDaddy.com or BlueHost.com) and then navigate to the website from a web browser on your iPad. The PHP will run on the server and so it will work whether you access it on a PC or an iPad.
While your developing, you could also access the server running on your computer from your iPad by navigating to http://<ip-address-of-your-computer>/myscript.php from mobile Safari or Chrome.
[EDIT] - Please note that the second option will only work while your computer and iPad are both on the same network.

Resources