I have a native application written in C++. I would like to write an Android application that would be able to comunicate with my native application when user is in connected to the same WiFi network as my PC.
How this things are done. I mean what technologies are used behind it. Maybe you have some samples?
You could use a peer-to-peer library, like AllJoyn from Qualcomm. The idea is that both your PC and the Android device will use TCP/IP to communicate with each other. You still need a protocol above that however that will handle discovery, session establishment and exchange of data.
Related
I have to develop an biometric authentication application.
The application will be written in java and it will be an desktop app, I want to use my smartphone for the fingerprint sensor, but I don`t know how to build this connection betwenn application and phone.
The main application will be installed on a computer without web.
I would be grateful if you have any idea or examples how to do this. Thank you!
You should have an app on your smartphone which uses the fingerprint authentication API.
If you are looking to use an android phone, you can refer this
https://developer.android.com/about/versions/marshmallow/android-6.0#fingerprint-authentication
You can create a simple APP using this API.
When user authenticates, then you can send message to your desktop java application from this App.
By 'without web' if you mean without internet, but can be connected to a local network, then you can send message via TCP/UDP.
Or if you wont be able to connect to any network, then you can try bluetooth.
If bluetooth is also not available, then you can connect your phone to your computer via a USB cable and communicate using Serial communication. There are a few external libraries available for this.
I'm looking to program a network application. I was going through: http://www.stanford.edu/class/ee368/Android/Tutorial-3-Server-Client-Communication-for-Android.pdf which talk about server and client programming for android. Now imagine I don't have an internet connection and I want both server and client applications run on either same android device or different android devices locally.
Is it possible to develop and run both server and client applications using TCPIP/UDP/Multicast locally on either standalone android device or multiple android device?
Yes, it is possible to communicate between Android devices or applications that are not connected to the Internet.
If you are using different devices, you probably want to use sockets, but it is possible to run an HTTP server on the server device and then use HTTP. Make sure they are connected to the same wifi network.
There are several different ways to communicate between different processes on the same Android device. The easiest might be to use a Messenger service but sockets and HTTP are also possible here.
Yes, it is possible in some manner.You can either use sqlite database present in android device to store various types of data in table form and data retreive from same.
Another way is to use Parse cloud as a server or backend of your client application.It allows your app to run even when you are not connected to internet.It stores the data in cache memory with its api and then uploads data to the server cloud as soon as you get connected to Intenet.
You can ask if you have any further queries. :)
I want to connect my android application to an applet which is running on my pc on Google chrome on Wi-fi.. where my phone works as a wi-fi hotspot and pc as the connected device. I want the connection to work uniquely as I want commands to be passed from my application to the specific applet, on the execution of which my applet does specific tasks. Please tell me the APIs which I can look in both Java and Android or the technology I have to use to make it work..
You need to use any program, such as wamp server, to make your computer to be a localserver. It will install PHP 5, MySQL and Apache. In other hand, you will also need a little bit of knowledge in Php language to create you own web services.
Another thing you need to be aware is that to handle you connection between server and device (and by this I mean which IP you are going to use) you will have a little headache; but first things first..break your problem in little parts thus will be easier to solve them.
I recommend this tutorial.
I think the simple way to connect these two softwares is using UDP.
It is fast, it is easy to program but it is generally unreliable according to TCP. But it is already local network. I dont think that is a case you need to take care in your local wifi network.
So take a look at this tutorial http://tutorials.jenkov.com/java-networking/udp-datagram-sockets.html
There are other ways like https://www.alljoyn.org/. It has more functinality but more complicated.
You must install Server on your PC(Apache httpd or apache tomcat or other based on your interest). A server listens to request from clients. When your mobile is connected to your pc(doesn't matter wire or wireless), you can make a request to an url(say, localhost:8080/welcome) from your app.
Create an applet and connect it with your web application(in the server) using java.net.URL and java.net.URLConnection.
On performing some operation on the client, call the url of the server application and forward the response to the applet.
I'm building a web application that will run locally on each of the users' pc (local web server using Jetty application server). I want the users to be able to talk to each other (on to one, not group) using video and audio. The users can exchange messages between each other in a p2p way, but they don't have a central server that will host one application. Is this possible? Can users talk using opentok, from different applications? Is there another solution other than opentok? I'm looking for something free and open source.
Thank you
Opentok platform supports both P2P mode and using their servers... So you can use OpenTok for your application. I wouldn't recommend it... you won't have this back up.
Peer-to-peer streaming uses UDP. A firewall may block UDP and cause peer-to-peer streaming to fail. If peer-to-peer streaming fails, either when streams are initially published or during the course of a session, the session falls back to using the OpenTok servers for relaying streams.
P2P with Opentok
I am now trying to do a project which is, there will be a server on windows pc and there are some clients on android devices.The point is the server one should control the android devices.For example it choose a image or video, send them to the clients and the clients play or show them.Remember the clients should be control by the server.
So could anyone tell me a proper way to do that, which protocol should i use, how do i send the files to the clients and how do the clients react? I am thinking of using java for the server and of course the client will use android application.
Thank you.
You might find Cloud to Device Messaging (c2dm) useful: http://code.google.com/android/c2dm/index.html
In essence, c2dm allows a remote server to send an Intent to an Android app. The device-side app can then respond to that intent to take the requested action. Chrome2phone works this way to open web links on a target device. http://code.google.com/p/chrometophone/