Node JS, Socket.IO, Express and Http connection - javascript

I wanted to throw an idea to you guys to see if you could provide me with an insight if something like this is possible.
Idea is that we have an RFID reader attached to a MacMini (Mini is hidden and only the RFID is visible). There is also an IPad attached and the idea is that once you tab on to the RFID reader, I want to validate the value behind the RFID card and then based on a success/error response send a notification to the IPad either to say something went wrong or to show a form which the users then has to fill out or there is some other interactions that can take place like pagination and so on. There is also a monitor attached to the MacMini and the idea here is that based on the
interaction on the iPad, it relays this back to the MacMini (via Node web sockets as everything is browser based) and the displays the relevent information based on the interaction made.
I am not sure how to play this as my initial thinking was that the RFID reader/Mini was on port 3000 and the browser on the IPad could listen to that and when the iPad had to communicate to the MacMini that was on another port.
Am I over thinking this maybe?
Thanks
Raj

If I understand your setup, your story is something like :
card detected, send on mac Mini
validation process, assume OK.
ipad display a form to end user
end user complete the form which is sent back to mac mini
You'll have to set up a simple "push" action from the mac mini. the answer from the ipad can even be done as simple ajax if you're more comfortable with it.
Definitely looks like something worth trying in node. As you have no browser compatibility issues, I'd have websockets (or a framework using them as http://www.socket.io ) as a top choice.

Related

Sending RF signals and receiving them back using mobile application

I am trying to make an app which constantly makes the transmitter of the mobile phone send out RF signals and receive the same signals when they are reflected back and detected by the receiver of the mobile phone.
I tried using my brain and searching on web to see how this is possible but i am not able to find an answer, so is it possible to make such kind of mobile application which can control the transmitter and receiver of mobile phone or even Bluetooth and WiFi because those are also RF signals!
if yes, please guide me briefly or share a tutorial link!
In my experience with iOS there is no device with RF chipset. So for iOS the answer is NO. I checked google too (several searches).
You can see the official specs of iPhone X. Nothing that related to RF.
If you really want to go far, check for external hardware (I hardly believe you’re going to find any)
You also have to be careful and make sure that you won’t breaking the iOS AppStore guidelines or your app will get rejected.
Good luck!

Cordova: how to display system notification?

I have an application that queries remote server for new messages and receives them as a JSON object. It displays them on screen. Application can work in background mode (using backgroundMode plugin from katzer). When new message arrives, my application plays a chime sound. I also want it to display a message in system tray (or whatever it is called in Android), like "You have XX new messages" so users could tap that message and bring an app to front to read messages. Does anyone know how to do that? I have tried many plugins but nothing worked. Thank you for help! Screenshot of what I want:
I got desired functionality with Cordova-plugin-badge (https://github.com/katzer/cordova-plugin-badge). Additionally, it can display a badge with number of new messages on application icon. However, it didn't work on many launchers (worked well only on Samsung Galaxy for me yet).

Is it possible to Blink alert "client browser" when new notification came in JSF?

I am working on JSF with primefaces, i have been assigned a task to notify the browser when new message arrived in client desktop, its like Message alert.
I found some concepts p:poll, and p:notificationBar, p:growl but those are happeniing inside the browser window itself, when browser is minimized the user can't get notify the new message arrival.
My question is:
Is it possible to do it in JSF with the help of Javascript?
I don't know whether it is possible to notify to the client?
How can i enable notifications for window minimised state as well?
You can make the title bar flash and on some platforms, even get the user's attention.
Make browser window blink in task Bar
Possible to flash a Browser window using Javascript?
This question shows part of your possible answer.
You should then use a to watch for the notification change. You could use the push framework, but that could be a bit of overkill on the network / connectivity side.
There are some solutions that work for only specific browsers. If you are doing this for your company intranet environment and everyone uses chrome or IE, there might be better solutions. Nonetheless, you should strive to do something that works on all compliant browsers (w3c compliant, that is).
There are some boundaries you should observe, regarding web apps in browser windows and what is the expected behavior. The user expects a minimized / offline browser window to sit quiet. If you are in a corporate environment, this could be waived, but for an app for the general public on the web, some people could (I would) be annoyed by this attention-seeking behavior (on a browser game, for example).

Catch Apple Remote events in webbrowser with JavaScript

Is there a chance to use the Apple Remote with my web browser (Safari, Chrome or Firefox)? For example, my HTML page makes a transition if I click the right or left arrow. I want to cause this transition not only by pressing a key but also by clicking on my Apple Remote (which is usually used with Frontrow).
The condensed question is: do I have the chance to catch Apple Remote events with JavaScript?
theres a few ways of doing that, one eould be to use max msp or pure data as a socket client to http://socket.io then capture the apple remote on max or pd and send the events to the socket server. another way would be finding a plugin for the browser that is able to interface between the controller and the javascript running in the current tab.

web app on mobiles with phonegap

I have a web application (chat room) in html + javascript that basically sends requests to the server every 5 seconds to check for new messages.
It already works on mobile but there are 2 main problems:
it does not beep (it works on pc) with new messages
when the browser is put on background, the javascript obviously stops being executed, therefore the connection to the server is lost and the client disconnected.
i was thinking of using phonegap not only to make it cross-platform but also to fix those problems stated above. would they be resolved with the use of phonegap?
thank you in advance.
phoneGap doesn't support custom push notification. it basically open a browser and expose you some native support via API.
in order to do some native actions like push notifications and/or sound playing i suggest you check out some of the plugins options available or even write your own for that.
Playing sounds can be done easily using the Media API. As for having the JavaScript run in the background it really depends on the OS. On Android the JS will continue to run if you leave the app via the home button but the back button kills the app so you would stop the JS. It is probably better to write a service that always runs in that case.
Alternatively you'd look at a push type solution to notify you of new messages.

Categories