Push Notifications/Messaging in HTML5 web App - javascript

I am looking to integrate Push Notification in my Jquery mobile web App using PhoneGap for Android. Is there any solution to put cloud messaging in web app like push notification.
My app is based on getting friends location and checked in new location so i was looking for messaging or push notification in web app.
i am also read about http://www.html5rocks.com/en/tutorials/eventsource/basics/
but this was not helpful for me.
If real time Push Notification not possible in HTML5 web app Please let me about asynchronous messaging like offline messaging in my app.

I recently implemented realtime messaging with the WebSocket protocol, it is easy to implement, very performant and it supports encryption.

Try Urban Airship. You get 1 million free push notifications every month.
It is also working with Phonegap.
Link: http://docs.urbanairship.com/build/phonegap.html

ScaleDrone allows pushing to (and from) PhoneGap and web. It will use Websockets if possible and other technologies when Websockets are unavailable.

There is an API for this: http://www.w3.org/TR/2014/WD-push-api-20141007/, but I wouldn't count on platform support here. However, since you are using PhoneGap, you can integrate your app with native cloud messaging. Here's a tutorial.

Push Notification can be implemented. If you are using Phonegap, PushPlugin ia a good available option. This plugin is for use with Cordova, and allows your application to receive push notifications on Amazon Fire OS, Android, iOS, Windows Phone and Windows8 devices. ALso it is free to use.
The Android implementation uses Google's GCM (Google Cloud Messaging) service.
For detailed implementation guide using Android refer Android section in this link.
Hope it will answer your question. this is late answer here, can be helpful to you as well as others looking for similar kind of solution.

Related

Is there a way to stream your webcam to your android app using Webrtc?

Is there a way to stream your webcam to your android app using Webrtc?
Yes there is, the main concept should be:
Use socket.io for Realtime communication between clients. https://socket.io/
Use peerJS to wrap webRTC on the browser. https://peerjs.com/
Of course Node.js, and express should be part of the development too.
You should find many tutorials on the web for this.
Yes, I did an app that uses WebRTC for screen sharing
My work is based on this repo, please take a look

iOS: Polyfill NFC web API - is it even possible?

I'm facing migrating my iOS Cordova based app to PWA. The primary issue is that it is using NFC scanner. I have started to wonder if there is any way to polyfill NFC web API on iOS / Safari? It seems that official support will not happend soon...
At the moment I'm thinking of creating some kind of "service" that would host native NFC API over some communication channel.
A bit more detailed:
Create an app/service that would be a proxy for native NFC API.
The app should receive scan requests send scan results over browser reachable interface (Sockets?).
At PWA side I think it could be nicely packed into NFC web API shape.
Native app would be required to install with my PWA. But can also be considered general proxy for PWA class apps.
I'm not familiar with iOS programming and architecture but it seems there are some basic flaws of this concept. So here are my questions to iOS devs :)
Is is possible to implement and run continually some kind of service like TCP / sockets server?
Do you have an idea which layer would be suitable to handle communication between NFC proxy and PWA?
Maybe you have some alternatives to proposed approach?
IT Man

WebRTC support for android

I wanted to build video calling app using webRTC and went through lot of websites searching for that but found nothing, just disappointment as most of websites provided the steps for the web and the other said to visit this link "https://webrtc.org/native-code/development/" for native android sdk of webRTC, which shows 404 error. I just want to know, google don't provide native android sdk?. So, I can't build native android app with webRTC or there is some other method to use webRTC. And if not what's some other way to make video calling app?
Old site moved to: https://webrtc.github.io/webrtc-org/native-code/android/
Not happy with the new site as well tbh.

Websocket server and Mobile clients

I have a Tomcat based server which serves as a Websocket end point (used javax.websocket) for my web based JS app. I am serving out json based data (queried from my database) via the web sockets. I am not using websockets to serve out HTML/JS pages.
Now we are building a native mobile app of our JS web app. There doesnt seem to be good native support for Websockets on Android and ios.
I would like to keep the server code base common to both JS client and the mobile client.
What would be your suggestion for such a situation? Write a different server for mobile clients?
I found this http://www.elabs.se/blog/66-using-websockets-in-native-ios-and-android-apps. They suggest SocketRocket for ios and https://github.com/TooTallNate/Java-WebSocket for Android.
I have never heard of these people / companies. Not sure of their antecedents and if their apps are bug free.
Any suggestions would be welcome.
I'm not sure if this is the answer you are looking for, but I tried this once, and decided to use a webpage that uses the websocket. Each app will display a webview accessing the page. All recent iOS SDK versions support this, but only the newer (4.4+) Androids will.
If you do not want to use webviews, I recommend Tavendo Autobahn for Android. I had a problem that my server's websocket would disconnect all the time. I had to implement a reconnection routine every couple of seconds on the app.
Hope it helps :)
I'm using this library on android for websockets https://github.com/codebutler/android-websockets
Works good with Spring WebSockets.
Sorry for messy answer, I'm in hurry, write in comments if u have questions

How to access sms inbox from javascript on android (phonegap)

I just discovered PhoneGap and was wondering if there's a way to access the SMS inbox from Javascript with it. Or if there's another easy way to do it in an app created from a HTML/CSS/JS solution.
There's no info about SMS access in the phonegap docs, but maybe the inbox is avaliable as a url or a folder?
I would like to stick with phonegap so that the app would work on many devices, but an android only solution is satisfactory too.
This functionality is not currently in PhoneGap though it might come in a future release. This is something that whole community would probably appreciate!
I think you will want to create a plugin to achieve this functionality for the moment. Some examples of plugins are here: https://github.com/phonegap/phonegap-plugins.
Here is an example of using an Android ContentProvider to interact with the SMS inbox How to delete an SMS from the inbox in Android programmatically?
There is a plugin for doing it with phonegap,
Take a look at SMS reception plugin for Phonegap

Categories

Resources