I'm trying to implement WebRTC on an android device supporting API 22 and I'm trying to connect to Kurento Media Server to establish media server capabilities. For my application Server layer, I'm trying to utilize a Java Server based on Tomcat, and this is implementing a Kurento Client API to connect to the Kurento Media Server. The issue I am having is understanding how to go about establishing a connection between the Android device and Kurento and doing a media transfer after the connection has been authorized by the Application Server and a SDP response has been processed by the Kurento Client initialized on the Application/Signaling Server. I came across Kurento Android SDK (Kands) but the repositories are missing sources on Maven and Gradle. Any help here in implementing the WebRtc.org stack with Kurento would be appreciated!
KANDS will not help you much for several reasons. First, it is an outdated and unmaintained project. Second, with the setup you describe, I think you'd be barking at the wrong tree. In your case, the signalling that should be implemented in your Android client, should be between the client and your app server. As you can see in the following image, which depicts your proposed setup, your client will be connecting to an app server using your own signalling protocol, and it is you app server the one in charge of controlling KSM.
In this way, you can implement all your business logic in the app-server, and you'll be able to make upgrades in the media part, shielding your clients by hiding the underlying implementation. The only thing that you'll need, is to get the SDP offer from your client to the KMS (going through your app server), have the KMS process that offer, and send the answer back to your client.
With this setup, you'll also have the posibillity to connect Android clients to any other type of webrtc capable clients, such as browsers.
KANDS was discontinued and SDk for android is only used for them to develop customized apps. Then we switched to webview also.
Related
I want to add chat module to android app. Firstly I want to use XMPP using Nodejs. How nodejs xmpp server works with android client.
Can nodejs xmpp server can communicate with android app? if yes than, how can i create simple nodejs xmpp server and simple android app that both can communicate.
If you have any other solution please let me know.
I am tried socket.io but i dont want to use that. It is not worked stable on android client side. Some messages send some not send. I am used few solutions for solve this problem (ping pong, heartbeath, change java client libraries for socket io, ...). But nothing changed.
My aim is to create stable fast chat module to android and ios application using with nodejs server.
Please guide me, thank you in advance.
Have you tried checking other solutions like ConnectyCube, Firebase, Layer, etc.?
They provide a ready backend and all you need to care about is configuring your client-side app.
Some of them even have ready Android client-side libraries which can be integrated in your app and speed up the development.
For an IoT project, we need to send messages from mobile application (iOS and Android) to Azure IoT Hub. We were able to do it connecting as a device using MQTT library. However, the device simulator too connect as a device and since both uses same device ID, the existing connection is dropped when both connect to IoT Hub at the same time.
We realized we need to connect mobile apps as a service (not as a device) and for that some research shows we need to use following library.
https://github.com/Azure/azure-iot-sdk-java
https://github.com/Azure/azure-iot-sdk-java/blob/master/service/iot-service-samples/service-client-sample/src/main/java/samples/com/microsoft/azure/sdk/iot/ServiceClientSample.java
However, this java sample uses lot of java specific implementations and which are not supported by Android.
Has anyone faced the same problem?
Which library can we use to achieve above from Android mobile application?
Which library can we use to achieve above from iOS mobile application?
Please let me know if any alternate solution is available.
You can use a REST API for sending a D2C message to the Azure IoT Hub. The following screen snippet shows an example of this call. Note, that no library is required for this request.
another solution for your scenario is to use an Azure Function as a pre-processor to the Azure IoT Hub, see the following example:
Thanks
Roman
Just as additional content about another solution for your scenario. Based on my understanding and per my experience, I think you can try to create an App service, such as Mobile App for using Custom API at the side of client & backend, or WebApps, etc, to receive the payload which includes custom json properties from your Android App, and forward the payload message using Azure IoTHub SDK for NodeJS or Java to IoTHub.
After a lot of research i am more confused then before on what kind of server to use for an android app.
My question in a nutshell is: which kind of server is easier to use and deploy.
I want to create an android application that communicates with a server to find other clients, the server uses GCM to notify other clients that one client wants to communicate and is used to exchange the address of the clients. Afterwards the clients should be able to communicate directly to one another.
What i found out is that from the android point of view either would be fine, both is likewise possible and neither produces more work then the other.
On the server side it looks like web service would be better to use, because it is easier to find a server provider. I might be wrong here but it looks like most large server providers don't like to give you enough access to run a jar file.
Google and amazon offer servers that can host web services, i am not sure if a socket server would be possible there, so if anyone can give me some tips on good and affordable server providers i would also like to have some insight there.
I have a very basic design of my entire application, where several users with my app on there android devices commits data to the server (I have used REST web services(java) + postgresql as my server) through HTTP post request from the android application. I am successful in achieving this and app runs absolutely fine. Now i want to implement a scenario where any change(CRUD operations) on my db on server should create a notification on my users android device. How should i achieve this with my server design unchanged? I have looked into Google Cloud Messaging, but could figure out the server implementation.
For now i have implemented db triggers on postgresql and able to get control back into java code using Notify/Listen feature of postgresql. From here i need to connect to android device. How can this be achieved. Is Google Cloud Messaging the only way? I have not seen any insert/update statements in there server implementation. Could anyone please guide me on this?
either you can use GCM or implement a Socket at server end and open a socket connection from mobile but this approach may add some additional processing overhead because it will create a daemon thread to listen socket port from mobile device.
You should use native library (NotificationManager etc.), here you can find a great tutorial.
My Advice is for you to use GCM. GCM normally takes a maximum of 4kb, so you could have your own defined "commands". You could use them to determine the requests on both ends, ie on android app and the server end. A php script on the server would help you in this.
I am working on an app where by the android app sends messages to the server via POST and the server forwards the message to the appropriate user via GCM. In my case I have very many things to share so in that case I am using commands, for example if it is a new incoming message I send a GCM to the app with one variable as the command and the rest as the data. On the android app I use the command variable to determine what to do with the data.
Kindly avoid that socket advice, it will have your app drain the battery to sustain the open socket , besides you don't have to re-invent the wheel while Google servers already has it
I built an Android application with Google App Engine Server. Now I want to add simple chat to my app. And I have some questions.
My users registered with theirs desired email domains like hotmail.com, yahoo.com and even more esoteric domains, thats mean that I need to create JID for them? if so is Google App engine provide JID creations with my app domain that i can manipulate?
I read that Google App Engine act as XMPP client so I need Xmpp Server that can receive and send XMPP messages. So why do I GAE for? is Openfire is my answer? can I integrate Openfire with GAE?
I Also read that if I want to use XMPP in GAE and Android in need aSmack Api for my client and that it is working on HTTP. So I guess that I'll need to poll the server for messages every couple seconds. Is there a better pattern?
can I integrate Openfire with GAE?
You cannot run Openfire on GAE because GAE works only on HTTP so you won't be able to connect over sockets as Openfire does.
My users registered with theirs desired email domains like hotmail.com, yahoo.com and even more esoteric domains, thats mean that I need to create JID for them? if so is Google App engine provide JID creations with my app domain that i can manipulate?
If I understand your question correctly, you shouldn't have any problems here. As long as you're not a spammer, we don't place any restrictions on what domains you can send to.
I read that Google App Engine act as XMPP client so I need Xmpp Server that can receive and send XMPP messages. So why do I GAE for? is Openfire is my answer? can I integrate Openfire with GAE?
You can send and receive XMPP messages via the xmpp API (this is the python version). This calls into the Google Talk infrastructure. You don't have access to what you'd traditionally call an "XMPP server", but you do have access to basic XMPP functionality.
I don't know a lot about OpenFire, but there is a Trusted Tester program for outbound sockets that you can sign up for. This is what you would need if you desire an external XMPP server.
I Also read that if I want to use XMPP in GAE and Android in need aSmack Api for my client and that it is working on HTTP. So I guess that I'll need to poll the server for messages every couple seconds. Is there a better pattern?
I should prefix this by saying I don't know a whole lot about Android or aSmack, but that won't stop me from taking a stab at answering your question. :-)
I think this depends on your usecase, but I can't think of any situation you'd need to do this off the top of my head. Will the user of your application have their own JID on a server they registered for? If so, I don't see any reason you'd have to connect via HTTP, unless that's all aSmack supports. The main use-case for BOSH/XMPP-over-HTTP is in the browser where you don't really have access to open raw sockets.
If you want to use XMPP as a messaging/notification service the user won't know about, it may be more complex. I should note that you can always set up an XMPP server on Google Compute Engine.