I've seen other posts on streaming live audio and video from an android application to a desktop server, but not yet for simple textual data. Basically, I'm trying to send key values from the android keyboard directly to a desktop server (which is implemented in java) as I type on the client. This would be a simple remote-keyboard sort of application that displays a keyboard on the android device and sends the live key taps to a server, which accesses the PC keyboard via the Robot class. I understand how to send text from the device to a server, but I am stuck on how to make the transfer of the text data to the server instantaneous, as the user types on the device.
I've tried to adapt from the examples for live video/audio streaming, but I couldn't figure out how they worked as I am still very new to client/server programming and programming in general.
Any help would be appreciated. Thank you.
Related
I am working on a little project with a very short amount of time and I’m totally new to developing with android. I’m experienced in Java but don’t know anything about android!
The project essentially consists of using an android phone as a “data collection probe”. My plan is to have an arduino connected via usb sending sensor data at regular intervals and ship that data off to a server in packets as fast as possible when network connection is regained. I also want to capture video with the camera and have it sent on a similar basis. Video is streamed into a file and when network connection is regained it empties out the file and sends it off. Not sure how to implement this video part, any help would be much appreciated.
I am taking a computer science course, and currently we are working on a project where we have to build a simple game application. I am working on a tic-tac-toe game where there is a client and a server. Players can sign into the client and connect to the server where they can interact with one another by playing the game.
I am curious if I could build an angularjs web app that can send and receive data from the server (coded in java) to be able to see who is logged into the game, send messages to the chat box, as well as disconnect users from the server.
Is this something that is possible? If so, could anyone link me to some reference materials so that I can learn how to do this.
Thank you!
Here is the current scenario:
I have two(2) Android phones.
Android Phone 1 as the server phone.
Android Phone 2 as the client phone.
Here is what I want to do:
I want to create an Android-based app (E.g. Student Information app) where it will have basically two (2) modes:
Server - for adding, editing and deleting data on a local database.
Client - for viewing data from the database of the server.
The app will be installed to Android Phone 1 and set to Server mode.
The app will be installed to Android Phone 2 and set to Client mode.
I want to ask these questions:
I want to locally host the database of the Server app, so that Client app will be able to view the data. Is this possible?
If yes, how can I do it?
Note:
I am currently a web developer so I know that connected on the same network is a requirement.
I have implemented the same concept on a medium business where the web-based system is locally hosted so that computers on the same network can access it.
Suggest everything that you want to suggest, except the disadvantage of doing this concept. I am aware of some obvious disadvantages based from my research and willing to face the disadvantages provided that I will be able to implement the concept.
Rooting the phones is an option.
I want to accommodate small-sized business that is why I want to use Android phones rather than using Desktop Computers/Laptop.
I have read similar suggested questions here based on my title.
We have done the exact same thing in my company. The way we solved this is that the server exposes a service using the Android NSD API, so the clients (using the same API) can find it on the network. And after a client has connected to the server, the server sends its database file (yes, the .db file in /data/data/...) to the client via OutputStream. When the client receives the entire database and checks for its integrity, it copies it to its own /data/data/... and restarts part of the app.
Android NSD
I have an app that creates a file based on data entered by the user and writes it to a file, however I need that file to then be transferred to a computer via Bluetooth (the laptops I am using don't have Wi-Fi direct and internet connection cant be relied on) and I cannot figure out how to do it. I have followed the tutorials on the android developers site but I cannot seem to get it to work. Any ideas or code samples that I can try?
I have tried following the android developer tutorials for Bluetooth and sharing and neither of them addressed sending files to a non-android device, they only addressed sending data (in a non-file form) to android devices and sending data to other apps.
this is a theoric question.
I want to deploy an app, actually 3, that:
-Manage a database (SQLite) from the desktop, in JavaFX, Done!!
-Server/WebApp that sends data(JSON) to several android devices.(¿Grails??)
-Android App to recieve and manage the JSON (and more things).
My doubts are:
-In my desktop app when the user chilck the "Send info to device"
the app must do a call to the service app like http://myserver/receiveJSONtoSend and the server listen the request and send the data to the device? and in the device recieve and do things with the JSON, and when the task are finished send other request to the server and the server comunicate to the desktop app. This is right?
-How the server comunicate with the desktop app? by suscribing like a listener?
Sorry abot my english and my non especific question, if some extra information is needed tell to me please!
Thanks a lot!!!
Since Java is painfully object oriented its often a good idea to use a JavaRMI engine for Java to Java communication.
#mod: I see this as a comment, but can't put it there on my own. Thanks!