On android, does webRTC drain battery life?

596 views
Skip to first unread message

Ibrahim Ethem Demirci

unread,
Mar 2, 2015, 7:37:20 PM3/2/15
to discuss...@googlegroups.com
Dear all,
I'm going to start coding an android project based on webRTC. I researched crosswalk for coding webRTC with javascript. (I also have question about this, maybe you can help me, take a look please:http://stackoverflow.com/questions/28781803/embed-crosswalk-in-android-studio)
I spent too much time to understand webRTC tech. But still I have questions.
  • My android app use webRTC connection untill closing. Does it drain battery?
  • If it so, should I use something like that "close webRTC connection" ?
  • In this project, Android app and other peer (web browser) meet on a web page which role signaling. If I must use "close connection", how can I open back? Is websocket that I use? But it drains battery too?
Thank you for answer.

Ibrahim Ethem Demirci

unread,
Mar 4, 2015, 5:00:08 PM3/4/15
to discuss...@googlegroups.com
Dear discuss-webrtc
I need help. Is there anyone say something. Thanks a lot you

nazmus shakeeb

unread,
Mar 6, 2015, 12:44:06 PM3/6/15
to discuss...@googlegroups.com
  • My android app use webRTC connection untill closing. Does it drain battery?
If you are in connected or candidate gathering state or in ICE check state  of webRTC connection , it will drain battery.  You need to understand STUN , TURN and ICE to get clear picture. If two client are in connected state they can send data directly ( P2P or by TURN). 
only creating RTCPeerConnection will not drain battery.  

  • If it so, should I use something like that "close webRTC connection" ?
This will depend on the state of the connection.

 
  • In this project, Android app and other peer (web browser) meet on a web page which role signaling. If I must use "close connection", how can I open back? Is websocket that I use? But it drains battery too?
You can use websocket or BOSH for signaling. They drain battery too but they are lightweight. you can configure  BOSH  to consume less battery sacrificing response 

time. 

Ibrahim Ethem Demirci

unread,
Mar 6, 2015, 5:41:02 PM3/6/15
to discuss...@googlegroups.com
Thank you so much. I'm new about android programming but really trying to learn ..
may i ask another question? maybe you can say "you really dont know anything about webrtc and android development" but really i've researched too much. but maybe I looked for wrong things. however,
Is it possible develop based on webRTC on android with coding java ? does this link say it is possible? https://code.google.com/p/webrtc/source/browse/trunk/talk/#talk%2Fapp%2Fwebrtc%2Fjava%2Fsrc%2Forg%2Fwebrtc

Nazmus Shakeeb

unread,
Mar 7, 2015, 6:47:50 AM3/7/15
to discuss...@googlegroups.com
>>Is it possible develop based on webRTC on android with coding java ?

You need C++ code also. The link you have provided also has C++ code.  The core part of WebRTC is written in C++.  

In android it is possible to use C/C++ using ndk. For most of cases you don't need to change the core part of WebRTC.

You can code using java only. Java code will use C++ code as a (jni) library.    
Message has been deleted

Ibrahim Ethem Demirci

unread,
Mar 7, 2015, 10:22:14 AM3/7/15
to discuss...@googlegroups.com
Which Api does support?
Reply all
Reply to author
Forward
0 new messages