WebRTC on Android - android

I would like to use WebRTC on Titanium. In the end of last year, WebRTC was implemented on Chrome for Android. I would like to make an application with WebRTC on Android.
I have a few questions:
Is it possible to use WebRTC on native webview or it is only for chrome?
What is the simplest way to implement webRTC on Android?
I have found the old article about webRTC on mobile here WebRTC on a standalone mobile app but it is old, how has the situation changed now?

Just an update on WebRTC for those seeing this post later:
WebRTC Library
If you are only catering to Android L (5.0), you can use the updated WebView. I am not sure you can support older Android versions with a WebView though. You can take the native option of course.
As other users mentioned, compiling WebRTC source files is certainly a viable option if you have the time and resources. However, if you would like to get up and running faster, Pristine.io is dedicated to hosting up to date WebRTC Android artifacts. To begin using WebRTC natively on your Android, you can add the following to your app's build.gradle:
dependencies {
...
compile 'io.pristine:libjingle:9694#aar'
}
At the time I am writing this, I have been working with WebRTC on Android for the past few months, and the most recent revision I have been using is 9694. Find the most recent revision here.
Getting Started on Android
As with WebRTC's javascript library, you will need a service to take care of user discovery and SDP signaling. I built a WebRTC Signaling API using PubNub for the signaling service. You can include it and begin to use it right away by adding the following to your app's build.gradle:
dependencies {
...
compile 'io.pristine:libjingle:9694#aar'
compile 'me.kevingleason:pnwebrtc:1.0.6#aar'
compile 'com.pubnub:pubnub-android:3.7.4' //optional
}
Additional Resources
Signaling API Documentation
Sample Android WebRTC App
Tutorial on making an Android WebRTC app with signaling library

Check this link, it is sample android application provided for apprtc demo of webrtc. Follow the instructions on this link, you will get android application which you can test on two android devices, also on android to web apprtc demo works fine. Following the source code you may get some clue for developing your own android application for android.
Note:The link provided in this example for gclient config command is older one. Follow this link
gclient config http://webrtc.googlecode.com/svn/trunk
Good luck.

Yes, it's possible in Android using crosswalk. Please refer to this https://crosswalk-project.org/

Related

How to use module in kotlin Mutliplatform moblie

Hey I am learning Kotlin Multiplatform mobile. I starting learning from the doc. I successfully run the module in android and ios platform, without any problem. Now I want to implement this in real project. I successfully created the module inside my pre-existing android directory. According to this Make your cross-platform application work on iOS we can only use module inside the android directory. I work as android developer and my other team have ios developer. So the problem is we have different system for android and ios. So how can I share this module to the Ios team. Please guide me how to achieve this. I read somewhere ios need XCFramework. But I am not sure, how can I achieved this. Can someone guide me step wise? Thanks
In general, Kotlin Multiplatform Mobile provides you with an ability to build frameworks for iOS. It can be delivered in several ways:
Simple ModuleName.framework file ready to be imported into your teammate's app,
CocoaPods integration, providing your teammate with the ability to rebuild this framework from sources and to use third-party libraries from Kotlin code,
Universal (fat) framework and XCFramework. These two are designed to provide the framework user with the ability to build the result app for different CPU architectures. This would be helpful when publishing the app.
If your aim is to just show the iOS team an example of Kotlin Multiplatform Mobile power, I think it would be enough to declare the framework, build it by executing the appropriate gradle task and share the result file.
If they would also like to put some code into the iOS-specific part of your module, adding the CocoaPods integration will be a good idea.

Using crosswalk standlone without cordova

I am building an hybrid android app using crosswalk webview as my app needs webrtc support. I have a query in my mind as cordova webview is not stable over android versions and also do not have webrtc support therefore we add crosswalk plugin ,then why not use use crosswalk standalone . In this case we will also have some control over native features of android. THen what is the advantage of using cordova + crosswalk over using crosswalk webview alone.
You can do it, I have and there are some things you need to be aware of.
You will run into errors, the crosswalk community is way smaller, and therefore some solutions to your errors will be harder to find in the usual places.
Then you will have to make some decisions (space-wise). In crosswalk you have Shared and Embedded modes.
https://crosswalk-project.org/documentation/shared_mode.html
You will run into some trouble with embedded mode and testing with x86 and 64-bit phones. (You need to change your gradle dependency to 64-bit).
With proguard and architecture splits you can package your app to a "reasonable" size ( under 40mb ), depending on the contents of your assets folder. (Embedded mode)
As a java developer, I don't see the advantage of using cordova + crosswalk in most projects, but I do wish that the documentation available for crosswalk would be updated more frequently.
To get started, add this to your gradle file:
repositories {
mavenLocal()
maven {
url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
}
}
dependencies {
compile 'org.xwalk:xwalk_core_library:20.50.533.12'
}
Cordova is a complete HTML5 development framework with plenty of plugins that can help you to use Web API to do some works that only native code can do originally. By default, Cordova is using the system WebView on Android.
In contrast, Crosswalk is a HTML5 engine with the main purpose of being more powerful WebView. If you're developing pure web application, Cordova is the recommended way and you can replace the system WebView with Crosswalk by installing the Crosswalk plugin. But if you already have lots of native Java code and want to build a hybrid application, it's more convenience to use the embedding API of Crosswalk directly.
If you do that you are basically repackaging a website into an app. I don't know about Android, but Apple will not approve your app for sure, which defeats the purpose of using a hybrid framework anyway.

Can I build Android apps with react native?

The recently launched react native features just iOS app example and docs.
Yes.
React Native for Android was released September 14th, 2015.
Docs: http://facebook.github.io/react-native/
No. You can't build Android apps with this release.
Facebook has indicated that they are working on an Android version, and famously said "give us 6 months", which some people have taken as a promise. I wouldn't base any important business decisions on the illusion that it will be unveiled when the 6 months is over, but you can at least take some hope in the fact that they're serious about making it production-ready before they give us access to it, and that it's not just a pie-in-the-sky hope.
Also, as others have pointed out, Facebook has already release apps that they've built with the Android version of React Native. So at least parts of it are ready for prime time.
UPDATE
Early support for React Native for Android has been pushed to GitHub!
As noted, there are several things that are currently not working if trying to port an application from iOS. But it's worth checking out.
https://github.com/facebook/react-native/commit/42eb5464fd8a65ed84b799de5d4dc225349449be
It is not aiming to be a cross platform, write-once run-anywhere, tool. It is aiming to be learn-once write-anywhere. -Colin Eberhardt, from Raywenderlich
Good news is that React Native for Android is finally here. (https://code.facebook.com/posts/1189117404435352)
while you can't do it right now, it shouldn't take that long.
The first React Native Android App has been published about two weeks ago in the play store as tweeted by the reactjs twitter account:
https://twitter.com/reactjs/status/615638361328349185
Great news! Now its possible!
"And so it happens, the commit we're waiting since about 6 months!" - usereact.com
Please read more on: http://www.reactnative.com/react-native-for-android/
Watch this video: https://www.youtube.com/watch?v=MNNR01NF290
I've tried out Facebook react native on Android and it really worked.
Simple Ubuntu install guide can be found here
Simple js files: link
Yes , We can now developed android apps too in react-native.
and some of the apps are already developed in react-native for android
suchs as:
1)F8
2)Facebook ads manager
3)Squad
4)Discovery VR
5)Ziliun etc..
and many more still counting.
Developers from around the world now opting react-native for mobile app development because of easy of use of JSX syntax.
and also it is commonly noted as simply the V in MVC.
Since React makes no assumptions about the rest of your technology stack, it's easily embeddable within an existing non-React Native app.
TLDR; Yes,
Detailed answer (As of November 2017)
React Native android application development is very stable and a good number of Android applications have been already built and used in production using React-Native.
You can find a showcase of applications here. Most of them have both IOS and Android versions.
You can also easily integrate your native Android java code to react-native. Refer here
As a developer who is building Android app using react-native with a lot of native java code dependencies, react-native runs stable and I found the documentation and community support is adequate.
Yes, it works for both the platforms ios and android, be sure to mention code entry points in app.js if it uses different code for different platforms. However native functions like native events or location manager need to be coded in native languages and then exported using RCT_EXPORT, you can find more about it in the docs
Sure,
Using React Native you can build real mobile app. real app means close to platform or simply can say 99% native app.react native provide easy way for building native android app using javascript for lucrative design.You have basic knowledge of android studio and error fixing in android studio related native module integration and good understanding of react.js then you can build android app using react native.
Basic Requirement for android app
1. Configure android studio please follow below link and avoid installation of python.
https://facebook.github.io/react-native/docs/getting-started .
2. for UI you will learn flex-box from official documentation.
I thing that is enough
Yes, not just with android but also with iOS using XCode
Yes, you can make real-world mob application with React-Native. React-Native is used to create a hybrid mobile application. In this, we write code in javascript which gets converted to swift for ios and java for android.
Yes, You can build the Android app using React Native. For this, you have to install Android Studio with all the required SDKs. You can run your React Native app in Android simulator by using Android Studio and command line both.
For command line, run the following command:
react-native run-android
Otherwise you can open the android project in Android Studio which is created by React Native in android folder and run the project from there.
Happy Coding.. :)
Yes, you can definitely build android apps using react-native.This is one of the great benefits of React Native. Before Facebook created it, you had to build your app twice and with different code : one for iOS using Swift or Objective-C and one for Android using Java or Kotlin.

How to add WebRTC functionality in android app

How can I easily add WebRTC functionality to my android app so that I would be able to play video stream in MediaPlayer?
What library (.jar file) do I have to add to referencies?
Could you add some code example please?
Actually, there is no such ".jar" files for you to reference right now.
WebRTC is designed for web browsers, even if it can be build for android and iOS.
for your question, I think you may need to learn how to build WebRTC on Android or iOS.
for Android, you should know NDK and JNI first. then build whole webrtc projects or standalone VoE\ViE even NS\AECM\VAD\AGC modules for android.
for iOS, you should also build it by yourself, but you may need this help.
all of these info can be found on the internet, especially google group.
checkout following link : http://www.webrtc.org/reference/getting-started
I have added my project on github: https://github.com/SDkie/Webrtc-for-Android, you can fork and make changes in it.
Please take a look at http://www.webrtc.org/native-code/android.
It has all the information on how to build webRTC for android.
The java wrapper for the native webRTC libraries:
https://code.google.com/p/webrtc/source/browse/trunk/talk/app/webrtc/java/#java%2Fsrc%2Forg%2Fwebrtc
It has the instructions on how to build the native libraries.
It also has an example app that uses webRTC to talk to the https://apprtc.appspot.com.
https://code.google.com/p/webrtc/source/browse/trunk/webrtc/examples/android/media_demo/README
I could not find instructions on how to create an Android Studio Project and build it with gradle though. If anyone finds it, please share.
I hope it helps
One option is to use the crosswalk, you can create a native app using the crosswalk as a webview in your project.
In my case the Web-RTC worked without any problems.
Here are some tutorials on how to add the crosswalk on your project.
https://diego.org/2015/01/07/embedding-crosswalk-in-android-studio/
https://crosswalk-project.org/documentation/embedding_crosswalk.html
I hope this helps.

Are plugins for Android's native Web Browser version dependent?

I've been trying the code Google provides with Android source code for a Browser Plugin, more specifically, following this README,
https://www.codeaurora.org/git/projects/qrd-gb-dsds-7225/repository/revisions/cc99b832a941dc8cbb86f1607d04eb87935ddbfd/entry/android/development/samples/BrowserPlugin/README
My question is, will I need to distribute a separate plugin for each platform(Froyo, Gingerbread, Honeycomb, etc)?. I'm planning to include native code within the plugin.
Thanks in advance!

Categories

Resources