Is there a working Android react-native application for Janus?

1,044 views
Skip to first unread message

Ahmet Uzun

unread,
Mar 26, 2018, 3:33:27 AM3/26/18
to meetecho-janus
Hi,

I am evaluating Janus to be used in our call center projects and a mobile app is a must for our use cases.

I tried 3 github projects listed on the Janus Resources page for using on Android: (https://janus.conf.meetecho.com/docs/resources)


This is a native solution. I managed to run video room and echo tests with this application. 


This is a react-native application but it crashes on my Galaxy S8 when started. It seemed to start up on an emulator but I could not test it extensively.


This is also a react-native application. It has a library which has to be compiled using Android ndk. 

After setting up Android ndk properly and adding a local.properties file to the android folder pointing to the ndk location (ndk.dir=C\:\\android-ndk-r11c) it compiled successfuly.

However it crashes at startup.

Does anyone know a working Android react-native sample application?

Ahmet Uzun

unread,
Mar 29, 2018, 2:44:55 AM3/29/18
to meetecho-janus
I suppose there is no interest in using react-native as a foundation for building a mobile application for Janus.

Thanks anyway...

26 Mart 2018 Pazartesi 10:33:27 UTC+3 tarihinde Ahmet Uzun yazdı:

Fabrizio Bertone

unread,
Mar 29, 2018, 3:06:05 AM3/29/18
to Ahmet Uzun, meetecho-janus
Hi Ahmet,

I tried to create a Janus app with react-native some months ago but did not completely succeed.

The problem IMO is that react-native-webrtc uses a very old version of webrtc native libraries (M58 while we are already at M64)

Apparently they are in the process of updating to M63 but we don’t know when it will be ready

Fabrizio

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

joost vermeulen

unread,
Mar 29, 2018, 3:48:21 AM3/29/18
to meetecho-janus
Use this fork of react-native-webrtc, they already upgraded to M63 in december 2017...



Op donderdag 29 maart 2018 09:06:05 UTC+2 schreef Fabrizio Bertone:

Ahmet Uzun

unread,
Mar 29, 2018, 4:35:26 AM3/29/18
to meetecho-janus
Joost, Fabrizio,

Thank you very much for your answers.

Joost,

Do you think the mobile app of the Jitsi platform can be customized to use Janus Javascript api and server?

Is it worth giving a try?

in...@nakajima-akinori.com

unread,
Mar 29, 2018, 9:02:23 AM3/29/18
to meetecho-janus
FYI, my repo atryenoria seems to work when using jitsi react native. Actually, I did succeed.

Ahmet Uzun

unread,
Mar 29, 2018, 9:49:25 AM3/29/18
to meetecho-janus
Nice to hear that. :)

I could not find your repo on github. 

Can you share a link?

Ahmet Uzun

unread,
Mar 29, 2018, 10:21:57 AM3/29/18
to meetecho-janus
Ok, I found it. (https://github.com/atyenoria/react-native-webrtc-janus-gateway)

Your application is one of the apps that is listed on Janus Resources page and I tested it on Android.

It crashes on my Galaxy S8 when started. 

It seemed to start up on an Android emulator but I could not manage to use it.

In your TODO list, "Android works" item is unchecked so I considered it does not work on Android, yet.

Is that true? Have you tested the app on Android?


in...@nakajima-akinori.com

unread,
Mar 29, 2018, 10:24:02 AM3/29/18
to meetecho-janus
yes. Did you try changing the jitsi react native webrtc or my fork? It should work.

Ahmet Uzun

unread,
Mar 29, 2018, 10:53:41 AM3/29/18
to meetecho-janus
I am testing it on Samsung Galaxy S8 with Android 8.0.

I downloaded the jitsi fork (https://github.com/jitsi/react-native-webrtc

I replaced it with the installed react-native-webrtc folder under ./node_modules.

However the app crashes again without giving any output on the react-native bundler.

When my janus server is down, it tries to connect and gives an error to check if the server is down.

When my janus server is up, it tries to connect for some time and then crashes.

Do you have any sıggestions where I can look to find out where the problem might be?


Ahmet Uzun

unread,
Mar 29, 2018, 12:03:51 PM3/29/18
to meetecho-janus
This is the java exception I see in the device error log:

Process: com.reactnativejanuswebrtcgateway, PID: 9422
                                                 java.lang.NullPointerException: Attempt to invoke interface method 'boolean com.facebook.react.bridge.ReadableMap.hasKey(java.lang.String)' on a null object reference
                                                     at com.oney.WebRTCModule.GetUserMediaImpl.getUserVideo(GetUserMediaImpl.java:436)
                                                     at com.oney.WebRTCModule.GetUserMediaImpl.getUserMedia(GetUserMediaImpl.java:339)
                                                     at com.oney.WebRTCModule.GetUserMediaImpl.access$000(GetUserMediaImpl.java:28)
                                                     at com.oney.WebRTCModule.GetUserMediaImpl$1.invoke(GetUserMediaImpl.java:302)
                                                     at com.oney.WebRTCModule.GetUserMediaImpl$3.invoke(GetUserMediaImpl.java:560)
                                                     at com.oney.WebRTCModule.PermissionUtils$2.onReceiveResult(PermissionUtils.java:216)
                                                     at android.os.ResultReceiver$MyRunnable.run(ResultReceiver.java:50)
                                                     at android.os.Handler.handleCallback(Handler.java:789)
                                                     at android.os.Handler.dispatchMessage(Handler.java:98)
                                                     at android.os.Looper.loop(Looper.java:164)
                                                     at android.app.ActivityThread.main(ActivityThread.java:6938)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) 

in...@nakajima-akinori.com

unread,
Mar 29, 2018, 10:41:44 PM3/29/18
to meetecho-janus
Can you try https://github.com/atyenoria/react-native-webrtc ?
I did succeed by this.

joost vermeulen

unread,
Mar 30, 2018, 2:29:27 AM3/30/18
to meetecho-janus
in your package.json file just use:

"react-native-webrtc" : "github:jitsi/react-native-webrtc"

instead of

"react-native-webrtc" : "^1.58.3"

then hit npm install and the errors should be gone..

joost vermeulen

unread,
Mar 30, 2018, 2:30:11 AM3/30/18
to meetecho-janus
I did forgot to mention, to use react native link as described in the readme from the repo

Ahmet Uzun

unread,
Mar 30, 2018, 2:55:47 AM3/30/18
to meetecho-janus
Finally :))

Thank you very much.

This worked with the demo room 1234.

Maybe you should consider changing the following line in the package.json file. This will help the new-comers to successfully run the app.

    "react-native-webrtc": "git+https://github.com/atyenoria/react-native-webrtc.git",

Can you please point out the important changes you made in your fork of react-native-webrtc?


30 Mart 2018 Cuma 05:41:44 UTC+3 tarihinde in...@nakajima-akinori.com yazdı:

in...@nakajima-akinori.com

unread,
Mar 30, 2018, 9:52:55 AM3/30/18
to meetecho-janus

Ahmet Uzun

unread,
Mar 31, 2018, 7:03:38 AM3/31/18
to meetecho-janus
Thank you very much. :)

emalla...@gmail.com

unread,
Mar 26, 2019, 4:31:45 AM3/26/19
to meetecho-janus
Hi akinori nakajima,

I've have installed you janus react native project, i've run npm install and react-native run-android
But i've got this..
> Configure project :react-native-incall-manager
The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead.


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-incall-manager'.
      > No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Any ideas about how to fix this :/ ?

akinori nakajima

unread,
Mar 26, 2019, 7:16:21 AM3/26/19
to meetecho-janus
I have the plan of updating the repo when multistream is implemented in janus. Please wait.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages