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).
Related
we are developing a web application (HTML/CSS/JS) on Tizen SSSP4 and SSSP5 devices.
According to SAMSUNG changing tthe version number of the application in sssp_config.xml will cause the display to update next time the application is to be launched.
However when I update the app version and reboot the display using
b2bapis.b2bcontrol.rebootDevice
it will sometimes update, yet other times it will not. Usually it will not update on the first time, yet update if I call the same API once more after the display has restarted. Sometimes the display will get stuck and no longer update even if I reboot multiple times using the API.
I checked the web connection, which is fine. The display is connected via cable, between the display and my server is but a switch. Also I see the display in WEINRE using a webhook all the time.
Has anyone encountered this problem? What can be done to resolve this? Is there something that must be done when unloading the app in order to release the API properly?
Thanks.
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.
I am working with a website having a chat functionality (think Facebook chat).
I'd like to play a notification tone when a new message arrives. However, the user may have multiple tabs opened and the message arrives to the multiple tabs, as the chat session is multiplexed across different browser tabs/windows.
How to determine
If a browser has many tabs (windows) open for the same website
When a new message arrives which of the tab(s) should play a sound effect
I am aware of the Notifications API, but I'd like to solve this problem in backwards-compatible manner. Also if there are any related JavaScript libraries I would like to know about them.
You can use localStorage for such purposes. Data in localStorage is shared between all windows (tabs or iframes) with the same origin. It also can notify your application about changes in localStorage.
See IWC library. I think it will help with your tasks.
I am building a push notification on Phonegap. I reviewed the way of using the Push Plugin but it is not supporting windows phone. I plan to use Javascript non stop looping by every 15 mins to query the Rest server and get the message back to display if any message is ready to published. Do you think this is a good idea? Will this cause any app leaking and slow down the app?
You will shoot yourself in the foot doing so.
Why? Your app will only be able to "receive" push notifications if it is active. If your app is inactive, you won't be able to poll for new notifications and therefore won't get any. So you're missing the actual great benefit of push notifications.
Solution: Pull the new version of the Cordova Push Notifications Plugin. Support for Windows Phone 8 was added recently. That's the way to go.
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.