2

I am working on an android project where I need to implement Push notification msg from my own server (that I have created).

I need to implement it using WebRTC but after much exploring I have come to know that WebRTC is for voice call. Is my assumption is correct, if not where i can find some tutorials to implement Push Notification using WebRTC?

Andrejs Cainikovs
  • 27,428
  • 2
  • 75
  • 95
anshul
  • 982
  • 1
  • 11
  • 33
  • 2
    WebRTC is designed primarily for media streams connectivity ---- however ---- APIs also enable us share screens, data channels (text and files) etc. ---- browsers are tending to support data channels soon ---- Did you tried something else? – Like: http://pusher.com/tutorials/html5_realtime_push_notifications – Muaz Khan Sep 10 '12 at 08:47
  • @MuazKhan I have tried pusher and got it working successfully.But due to certain reasons i am asked to explore about WebRTC.do u know any tutorial on implementing WebRTC on android devices. – anshul Sep 10 '12 at 09:24
  • Did you check this - https://github.com/lukeweber/webrtc-jingle-client --- the demo: --- https://github.com/lukeweber/webrtc-demo-files – Muaz Khan Sep 10 '12 at 10:31

3 Answers3

2

WebRTC won't help you in implementing what you are trying to achieve.

WebRTC deals with real time communications over the web, where its current main focus is voice and video.

Pure data will be added later on, but even then I doubt you will achieve the expected result with it.

The main premise of WebRTC is one where you know what 2 participants are within a connection, they already know that they are about to communicate, and then webRTC kicks in to send the actual data.

Tsahi Levent-Levi
  • 2,351
  • 2
  • 18
  • 26
  • 1
    Data is possible by using `RTCDataChannel`. Useful for real-time chat, games, transfer file. That is what I am looking for. http://www.html5rocks.com/en/tutorials/webrtc/basics/ http://stackoverflow.com/a/10218470/186334 – CallMeLaNN Nov 22 '13 at 13:48
2

Make sure to check out RFC6455 HTML5 WebSockets for lightweight bi-directional communication which seems to fit your use case better than WebRTC.

Chris
  • 4,204
  • 1
  • 25
  • 30
0

You can use websockets to create push notifications. I wrote a tutorial for a WebRTC application where I also explain how to set up a websocket server for signaling. You can use that part of the tutorial (starting at "The Server") to share notifications and just ignore the rest of the WebRTC stuff.

Felix Hagspiel
  • 2,634
  • 2
  • 30
  • 43