Have anyone successfully used socket.io-client with react-native-android? I did some searching but it seems to be a mix bag.
I'm trying to figure out if I should use it for my project and I don't have the android version setup yet. So I want to see if it actually works before I jump the gun.
I have https://github.com/gcrabtree/react-native-socketio successfully working on android with React-Native 0.39. There does however appear to be an issue with the socketConfig parameters not being parsed correctly when compiled but you can get around this by adding the parameters to the socket connect url (obviously not all paramaters can be passed into the connection url). My code for connecting to a room that has token authentication
this.socket = new SocketIO(`${this.baseUrl}/${this.socketRoom}?token=${GlobalState.socketToken}`);
this.socket.on('connect', () => resolve());
this.socket.connect();
I am yet to get this working on iOS though.
Related
I have implemented the agora in my react native application by following the library documentation and also referred to this link.
I am able to see remote user video and local video in the application when it is running in the foreground state.
The main issue I am facing is when the iOS application is not running state. When I took the call in not running state, I can view my local preview but the remote user video is not visible in the app. But the remote user can see my preview, which means the channel was established successfully.
I tried setting fixed width and height to
RtcRemoteView.SurfaceView
but no change in result.
I am not able to figure out what I am doing wrong. So please help me to find a solution here.
Thank you !!
React Native: 0.62.2
Agora: 3.5.1
I would recommend using the Agora UIKit for React Native, it will take care of a lot of the work for you. The repo you've linked to hasn't been updated in almost a year now.
The UIKits are across 6 platforms, and updated all the time.
Max
The mirror mode is by default enabled when using the front camera and disabled in the rear camera. If you want to enable the mirror mode on the local device, please update the _renderVideo as following (highlighted part)
please use mirrorMode={VideoMirrorMode.Enabled} in RtcLocalView.SurfaceView
Please let me know if this helps or not.
I am trying to implement Signalwire calling in a react-native app. I am facing issue in connecting ice servers. Sometimes it connects and calling between two persons get successful. But most of the time it throws error
"Cannot set properties of undefined (setting 'onicecandidate')"
I have tried to search a lot but could not succeed. Can you please guide me how this issue can be resolved? I am using following iceservers:
iceServers = [
{urls: ['stun:stun.l.google.com:19302','stun:stun1.l.google.com:19302','stun:stun2.l.google.com:19302']}
];
I have tried to find iceserver associated with my signalwire account but could not find, Please guide me how to get ice/turn/stun server urls and credentials. I am using Relay SDK for reactnative
It's not possible from this post to tell if you're using the SignalWire SDKs exclusively, if you're working from third party tools, or if you're doing your own setup. There are also a few variables in terms of how you've set up your app, what errors you're seeing from the SignalWire side, and the config of your ice servers.
With all that in mind, if you could reach out to SignalWire support (from your SignalWire space, select 'Help and Support' at the top right and then Submit a New Support Request) we can take a look at your setup and work through this with you.
For the past days I totally dived into Forge API and managed to get this old-repository that works with React Native and AutoDesk Viewer to work with some URNs I translated, felt like a big achievement but I'm looking to deploy a fast performance app and this example uses a really early version of Auto Desk Viewer (2.17).
So I manage to, following the example on the API latest version, get the autodesk viewer working on my Browser.
With that working my next logical step would be to substitute the code on styles.viewerHTML with that one I mentioned above.
The problem is, I get this error: Chrome Log
Is there a work around to this error?
I notice that in the API is mentioned that Initializer has some cookie settings, is there a way to turn it off? As it is probably why I'm getting this errors.
Any help is appreciated!
Edit:
Putting a snack io to make easier for everyone to help on this issue.
While setting this snack io both versions turned to be working on iPhone, but android still only works with the old version.
To get the Snack IO to work you have to put an URN and a token of yours on lines 15 and 16.
const urn = 'YOUR-URN'; // REPLACE WITH YOUR URN
const token = 'YOUR-TOKEN'; // REPLACE WITH YOUR TOKEN
On line 27 you can choose whether you want the old version (version2dot17) or the latest version of version 7.
source={{ html: version2dot17}} // latestVersion or version2dot17
UPDATE
Specify a baseUri to enable cookies when using html content string - cookies are tied to domains:
<WebView
source={{html, baseUrl:'http://localhost'}}
//...
If you'd like to stop Viewer from setting the cookies turn off useCookie for the built-in i18n:
Autodesk.Viewing.i18n.options.useCookie=false;
Autodesk.Viewing.Initializer( ...
See further discussion here on the cookies error when rendering from html string.
Original Answer
Tested the latest Viewer but unfortunately I was unable to reproduce the same issue - one thing I did differently was I put the HTML content in a separate file and instead of a string:
<WebView source={{ uri: '...'}} ...
Managed to get it to work on my Android Nougat:
No errors in the console log either:
When I tried the demo app https://kevingleason.me/AndroidRTC/, it was working as expected.
But when I tried with two android devices, I can make a call and receive call, but they don't get connected. In both devices, its own camera feed is displayed with a text "Connecting...". I tried on both my home Wifi and mobile data 3G. There is no error that I can find in log.
Could anyone help me to resolve the issue please. What is that I am missing here?
I am using the latest code from https://github.com/GleasonK/AndroidRTC which already has the Xirsys ICE servers configured. But I noticed that the Xirsys ICE servers is not added in the below line from VideoChatActivity.java, so I also tried adding that servers into the PnSignalingParams' constructor, but still facing the same Connecting message only.
List<PeerConnection.IceServer> servers = getXirSysIceServers();
if (!servers.isEmpty()) {
this.pnRTCClient.setSignalParams(new PnSignalingParams(servers));
}
I have fixed the issue. It was little tricky. If you see the log, it will show you that the application always execute createOffer method. So both client A and client B will send an offer in same time. You can fix that issue by giving some condition so if the client A give an offer, and the client B will response by give an answer.
To see if any error occurs you can use method onCreateFailure(String s) and onSetFailure(String s) in PnPeer.java.
Hope this will help.
I am using android studio for developing my android app. SO i created a native API using the worklight 7.1.0 and copied all the jar files to the lib folder and wlclient.properties to the asset folder. So after that i have a set of adapter deployed in my company server, which i have to invoke from native code. So i changed all the values in the wlclient.properties as per the adapter required to call.
I added a listener for the connect and tried connect , it gave a Unexpected error.
I added a listener for invoking the adapter and tried connect, it gave a Application is not found in the server, couldnt register client
You only provided your explanation, and not any real example... so that's not helping to understand the real culprit here.
What I can say is:
So i changed all the values in the wlclient.properties as per the adapter required to call.
What you put in wlclient.properties is the server address for the client application to connect to. It does not relate to the adapter per-se. The adapter is invoked by the server once a request from the client came in.
The adapter then sends a request to what that is defined in the connectionPolicy element of its {adaptername}.xml file.
Various exceptions
Since you did not provide anything useful that can be debugged - I suggest that you will instead review the following tutorial and its sample application: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/server-side-development-category/invoking-adapter-procedures-native-android-applications/
The tutorial mentions the required steps to take in order to use the MobileFirst API in the Android app.