Need to call Kurento Media Server opencv plugin in Android client - android

What i did:
I have installed the opencv-plugin-sample in the Kurento Media Server.
https://www.kurento.org/docs/6.0.0/installation_guide.html
https://github.com/Kurento/kms-opencv-plugin-sample
  
I have modified the kms-crowd detector client-js to call opencv plugin.
Run the following command and load the page in browser.
bower install
http-server
http://localhost:8080/index.html?ws_uri=ws://localhost:8888/kurento#
It works well.
What i have to do:
I want to replace the client-js to android mobile client.
I have tried to run the AppRTCDemo application. it works well.
https://github.com/apeunit/AppRTC-Kurento-Example
Now I want to call KMS and apply "opencv plugin" filter from android client.
I don't have any references to add the "opencv plugin" call form "android" client.
How to add apply the opencv plugin filter from android client?

There is no Android mobile client. My suggestion is to follow a different application architecture, and have your Android app connecting to an application server that acts as signaling server. This server will be the one controlling KMS, and your app will only need to communicate with your application server, following this schema
That will simplify your Android client development. You can check tutorials following both approaches: NodeJS and Java
EDIT 1
If you still decide that you want to directly control the media server from your Android app, you'll need to implement the Kurento Protocol: a JSON-RPC based protocol that controls the media server, through a websocket connection. The NodeJS, JS and JAVA clients are just implementations of this protocol, to ease the development process.
When you define your module in the .kmd file, you are declaring the interface for it. Whatever methods you have there, are to be invoked via the websocket control port.
I'm sure you are bound to find some Android client implementation of the Kurento Client in Github, but bear in mind that it is not officially supported.
EDIT 2
There's another option, which is to build your app using the Ionic Framework, which will allow you to use the Kurento Client for Javascript, and also the code generated by the module creator.

Related

Embed a server within Android or iOS app that uses Python

I have a python library that I want to use for the core logic of an Android and iOS app. One solution would be to put the python logic into a server and interact with my app through HTTP. If the server is remote though, the user will have to remain online to use the app. Is there anyway I can embed a HTTP server within the apps so that the user doesn't have to be online?

NodeJS on IOS/Android

Maybe what I'm about to ask is stupid, generally I don't have so experience with server-side.
I'm building an Angular web application, with nodeJS on the server-side.
I need that the server (Node.exe) will installed in the device itself (IOS/Android), and nodeJS will open a localhost socket to communicate with the device.
(According to nodeJS official web site, nodeJS only support windows/Mac OS/Linux)
It's possible to do that?
If not, there is another server can I install in the device?
Yes you can with JXCore (a fork of nodejs), more info in this link
Build Mobile Apps with JavaScript and the Node.js Ecosystem repository is in here.
And how to compile it is in here JXCore - How to Compile
But if you need it to be nodejs (not the last version) you can use this link to do what you need Building and running Node.js for Android
UPDATED 27-09-2018
Like someone has pointed out, that project is no longer maintained but I have found and alternative by Using Termux on an Android phone you can use nodejs / gcc / vim / etc and more tools to do many thing
This link show how to do it for nodejs ( and I have tested it on my phone ):
Building a Node.js application on Android - Part 1: Termux, Vim and Node.js
First install termux from playstore, of course.
I don't understand the point of using a server tool on the client side.
If your application should work with an offline mode, you should put all data and other in your client app (using cordova).
If your application works with an online mode the server side is needed to serve your data. Here you can setup a nodeJS API which provides routes for your application to have content to print.
I'm not sure I brought you the wanted answer, so can explain more the point of using a server tool on a client device?
What you are trying to achieve, turns your device into a server.
A server side language is meant to stay on the server.
I don't really see why you need to open a localhost socket on the device to communicate with itself. Is it for offline testing? You can do that since you have a computer and a device, and both are connected to the same network.
I believe a really good start would be understanding the concept of the Client-Server architecture first.
But in short, the proper way of implementing a Client-Server app using your chosen technologies would be:
A server should provide the client with answers to his requests.
So in Node.js (server-side), write whatever you want to communicate with your database (Create, Read, Update, Delete), do custom processing, etc...
and return a structured answer.
The client is expecting answers to his requests, and is supposed to handle the answers in code. So the program written in AngularJS (which is your client-side language) will be installed on devices.
The client has to know the format of the server's answer. Is it plain text? XML? JSON? ...
so you mean you would like to have an app can run some services via http?
not sure if iOS allows application with JS virtual machine executing code ...
and for Android
searching on Github and I find how to build NodeJS for Android
https://github.com/dna2github/dna2oslab/tree/master/android/build
Here is an example to run compiled Nginx binary on Android at https://github.com/dna2github/dna2mtgol/tree/master/fileShare
You may modify a little more to replace Nginx to NodeJS. The code to run Nginx is not very nice; maybe you can try an Android Service to let the server run on backend on Android device.
Hope it is what you want.

NodeJS Alternative For Android

I have visited many blogs and questions looking for a way to use android as a client and nodejs as a server for my app. I came up with a solution that is to use PhoneGap like frameworks so that it could act like native but is not in reality. I need to use native android sdk and connect with NodeJS server (using SocketIO) to create my app. Is there any way I could do this?
P.S I want to know that while I set up by GCM can I pass my IP and port that I have created in my socket.io file to the GCM?
Cordova (hence PhoneGap) allows you to use most of the hardware APIs. PhoneGap nowadays is just a build service of some sorts.
The Cordova website and plugin store explain all the details. But t WebSockets are just an upgraded protocol or feature of TCP. Any newer technology supports it without any dependencies, but in dependence of the network you're traveling in.
Without diving deep into the code here at socket.io-website, I reckon that the initial build of your Cordova app is a WebSocket implementation to the server. So you got everything bootstrapped already.
What this tutorial doesn't explain is how to connect to the server. But read it up here.
I have no prior experience but Google Cloud Messaging seems not to be in the scope of the problem of socket.io. Once you have a connection to the socket you can send to the client whatever payload you want and might or might not need GCM anymore. If you need to send stuff via GCM read up on the the GCM node module.
Passing IPs around shouldn't be much of a problem since you're are running a public service anyway. You'd need to secure it anyhow of course.

Converting a GWT web app on app engine to android app

I have a GWT App deployed on Google App Engine that makes use of RPC Calls to function.It uses Bigquery Cloud as a backend for database operations.How can i create an android app from existing google app or do i have to code again to build a native android app for this application.
You can use a combination of mgwt and GWT-Phonegap to create apps for Android and iOS.
if RPC is your problem, you can use GWT-P REST to change your RPC in REST-FULL service. You need to refactoring your GWT client code and Server code. I had ever use in project GWT-P rest with an SPRING-REST on server side, that's work well. This can solve the problem's of RPC and serialization policy from GWT.
If you want to use the client code from gwt and use this in android Application, your only choice is to use phonegap and MGWT to create responsive design, but you must separate you server code and client code in three differents module with maven (client - server - DTO).
In first if i was at your place, i will transform my RPC service in REST-FULL service.
After if your application is only to android and not too complexe, i advise to create an Native App android. MGWT + PHONEGAP + GWTP is more to create mobile cross-platform application.

How to implement wifi chat between android to IOS

is it possible chat android to IOS using wifi in same network?
if yes,give sample code available for the same. I previously checked for bluetooth chat but it is not possible so now I look on wifi chat help please.
Alljoyn is c++ based library to build up bus connection for two or more devices. You can build up multiplayer game, chat messaging . - https://www.alljoyn.org/
If you would like to make it global ( I mean TCPIP based which i used Node.js is suitable for your project )
You do not get in to deep level. Node.js is here for help developers to build http level socket stream . I builded my own app android and ios with using Node.js client. And server part socket.io library will be handle messaging tail and also with database driver

Categories

Resources