I am working on pubnub to integrate Video calling in my app. I am trying to connect one person with another from a list of random users.
Followed this link : pubnub-webrtc-github
Using the above link i can video chat in a demo application,
but when i follow the same in my main project, i get duplicateEntry : org/webrtc/VideoCapture
I am already using pubnub as library in my project which has a class PubNub < containing a method publish()
But for video chat i am using a variable of class Pubnub which has a method publish(String channel, JSONObject message, Callback callback)
please note above both pubnubs are different class, they have different class names, Pubnub and PubNub.
follow below pictures to see pubnub-library gradle and app-gradle.
pubnub-lib-gradle
App gradle
That's an older version you are using. I recommend using V1 WebRTC SDK because it is stable and works consistently. There is a V2 SDK but it has some instabilities.
You can find PubNub V1 WebRTC SDK here: https://github.com/stephenlb/webrtc-sdk/blob/master/js/webrtc.js and make sure to read the docs!
The WebRTC Simple Calling API + Mobile SDK is a simplified approach to RTCPeerConnection for mobile and web video calling apps.
Related
Greetings to fellow developers,
I am working on a project where I have to display a functional video call between two users. For reference, I have been following this video https://www.youtube.com/watch?v=v9ngriCV0J0
which has given a step-by-step explanation for establishing a video call between two users.
However, the only issue is that the video is having a Firebase backend. Hence, whenever a caller creates a call model with sender and recipient Ids, the recipient immediately receives the same data and a call is established. Whereas, I am using Node/Express backend (manual API calls for updating fetching data) which makes it extremely difficult to receive the required call data from the receiver's end as soon as the caller sends it to the backend. Also, it will be inefficient to listen for fetching the call data the whole time.
I will be very grateful to all of you if you can help me find a working approach so that the receiver can fetch the required call data as soon as the caller creates it in the backend for establishing a video call from separate devices.
Here's my code
https://pastebin.com/AurJnG27
/***pubspec.yaml dependencies***/
dependencies:
flutter:
sdk: flutter
http: ^0.12.0+2
provider: ^4.3.3
socket_io_client: ^0.9.9
permission_handler: ^3.0.0
agora_rtc_engine: ^1.0.8
/***pubspec.yaml dependencies***/
Please let me know if any further information is required from my side. Any feedback for code improvisation (if you feel like it) is also very appreciated.
You're getting that error because of an incorrect or expired token that you might be using. Firstly, I will suggest shifting to the latest version of the Agora SDK and then build your application.
Now, if you're just testing out the platform then from your Agora dashboard you can go ahead and generate a new App ID and select the testing mode which will disable token. So in your joinChannel() method you can pass null for the token value.
But if your application is live or is in production then go ahead and select the secured mode from your Agora dashboard. Then you will have to generate a token server from a deployed server, you can read more about it here.
Now, coming to the Firebase part. You can actually make this process much simpler by using the Agora RTM SDK. Which allows you to send messages, through this you can send peer message about the call details and hence refer it while making a call. You can have a look at this blog which shows how you can use the RTM SDK to do the same: https://www.agora.io/en/blog/building-your-own-audio-streaming-application-using-the-agora-flutter-sdk/
If you're interested you can have a look at this sample code given here which will help you setup a proper video calling application.
I will also recommend you to join the Agora Slack Channel where you can get help from other Agora developers.
We are building calling app in Android using Agora SDK. We checked this samples :
https://github.com/AgoraIO/Basic-Video-Call
in our app, 2 users can do video call. We are using this sample : https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Android-Tutorial-Kotlin-1to1
For the group call, we followed this sample : https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Android
We are trying to implement group call in this way :
User-A calls User-B
Both gets connected (using https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Android-Tutorial-Kotlin-1to1)
User-B can able to invite more users in a ongoing video call.
Does this possible? Please suggest us a correct way?
For a call invitation scenario, you will need to leverage some sort of signaling solution. Agora.io provides the RTM SDK that you can use alongside the Agora RTC SDK. You can refer to Agora's guide to see how the implementation works: https://docs.agora.io/en/Real-time-Messaging/rtm_invite_android?platform=Android
This is how you would actually create the invitation
void inviteCall(final String peerUid, final String channel) {
// Creates LocalInvitation
LocalInvitation invitation = RtmCallManager.createLocalInvitation(peerUid);
invitation.setContent(channel);
// Sends call invitation
RtmCallManager.sendLocalInvitation(invitation);
}
You will also need to use something like Android's ConnectionService to be able to implement call notification. Here's an guide on call notification: https://docs.agora.io/en/Real-time-Messaging/faq/call_invite_notification
I am using the Android SDK to send data to Google Analytics. In this project I cannot use Firebase nor GTM. I should send hits directly to GA. I have already implemented everything, events included. But I cannot create Content Groupings. I think that the follow code is deprecated, isn't it?
mTracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-XXXXXXXX-X");
mTracker.set(contentGroup(1), "Level");
Which is the correct implementation for creating Content Grouping with the Android SDK without using other platforms (I mean sending everything directly to GA)?
Thanks a lot.
I am trying to fetch events from Google Calendar(Online) using Google Calendar API's in Android application but can't find what library need to import in my Android project. Provide link to import exact library to import in my Android application project.
You can use Google Calendar API directly importing to your project. By using that you can create, view, edit and delete any activity.
For more info see this following page.
https://developers.google.com/google-apps/calendar/
u can either use rest,client libraries to access google calendar api's ... client api will be size overhead .. so better use rest calls ... here is the link which explains rest calls and json parsing ...http://www.androidhive.info/2012/01/android-json-parsing-tutorial/
I am creating a android application for eCommerce website.
Here at server side, i am using Shopify's eCommerce software.
So how could i call web service generated through Shopify's eCommerce software.
I have make research on it..
I found one link also link, but that demo is not running.
I need one simple demo where how can i use shopify api in android application
That Demo is working, I checked it today only. You can make a webview and use the Java/Android Library to make the call.
Use this part to make your call (for more details check demo code or api page):
JsonDirectoryCredentialsStore store = new JsonDirectoryCredentialsStore(getFilesDir());
Credential emptyCredential = makeEmptyCredential(shopname);
store.saveCredential(emptyCredential);
APIAuthorization auth = new APIAuthorization(emptyCredential);
URI authRequest = auth.generateAuthRequest();
Pass this authRequest to a webview and set a webviewclient to handle redirections by shopify.
You can then set up a callback to your localhost in the dev store you created and connect to that with the emulator loopback interface 10.0.2.2 from the app to test. At least that's the most convenient way I found.