Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I want to know if there is a way to host a LAN server on Android without using a third party library.
I want the solution to work without rooting the device.
I want to know if there is a way to host a LAN server on Android without using a third party library.
It is possible. You have to use Sockets and ServerSockets, Object[Input/Output]Stream(or a different way to send data). Basically design a server.
Here is an SO post on creating a server
Here is the Java documentation on servers
You can use third party libraries to make servers too(see the first link), and sometimes that may be easier.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
for a project I need a possibility to log in into a bash on an android device over the internet.
At first I thought about ADB over TCPIP, but from what I read it doesn't seem like a secure solution.
The first alternative that came to my mind was SSH. I know that there are many Apps out there which can host a SSH-Server, but I need a solution in an own app, because I would need more control over that server.
So the go-to solution would be an own SSH-Server via a library.
As far as I understand, libraries like JSch are just for connecting to other servers, but not for hosting them.
Is there any open-source library, that can host a SSH-Server and supports Password-Auth? (Some Apps son't support that)
Or is there another alternative path to the solution of that problem?
Thanks for the help.
Given the updates by the OP, the answer is: you are going down the wrong rabbit hole.
A simple app can't just open a ssh server, and allow you to take full control from remote.
You rather have to design a real MDM solution, for example relying on the Samsung Knox technology. But of course, knox only exists for Samsung devices.
A truly robust solution to control arbitrary Android devices is a very advanced undertaking.
A starting point with more information:
https://www.zdnet.com/article/mdm-for-android-devices-what-your-business-needs-to-know/
Given the specific requirements of the OP, the answer might be to install a "regular" ssh server, such as dropbear. When all the devices are rooted anyway, why not simply add a ssh server by itself, relying on a unified password for example. See here for a list of products:
https://android.stackexchange.com/questions/9905/is-there-some-ssh-server-for-android
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I want to develop an external PC application using Java and MsSQL/MySQL.
I want to share it with all people. But I have no idea about how to install MS SQL or MySQL automatically with my Application setup, without a normal manual database installation.
Or is there any other way to develop such an app using "Java + any database server"?
Or is there any best way to success this process with Java?
If you are programming in netbeans you need include the database within netbeans? Here is a guide on how to do this.
https://netbeans.org/kb/docs/ide/mysql.html
Also here is a second guide on Packaging and Distributing Java Desktop Applications
https://netbeans.org/kb/docs/java/javase-deploy.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have spent much time researching how to create a chat system that would work between computers on the same local network, and so far have had no success (in Java). Could anyone provide me with references to things that actually work, or guide me?
Here are some useful resources that I found on Google.
http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
http://www.youtube.com/watch?v=eANjtQ6wJv0
http://www.youtube.com/watch?v=eANjtQ6wJv0
There are many more if you just ask "how to make a LAN chat program in Java" in your favorite search engine. There are tutorials online, but it is recommended that you are pretty competent in the language as well as networking. Go back to the basics and read a bunch of books on Java.
For future reference, don't ask questions like that on Stack Exchange. Put problems that you have about code. Be specific!
You have two problems. One is discovery, the other is connections.
For discovery on the local network you want mDNS aka Bonjour.
jMDNS offers a pure java Bonjour implementation.
You need to setup a service advertisement and a service discovery.
Once you discover a service you can then connect to the daemon you have setup on each machine.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a PC (where a Java program is running), Bluetooth dongle and Android device (2.3. 6) and want to use PC microphone/headset/speakers to answer a call by Bluetooth. I give another question here, but seems we not understand each other. I not want to speak with PC by connected Android device, I want to answer to incoming calls by PC (use PC as Bluetooth headset or HFP headset or something like that). I find app in play.google.com that implemented such things here.
The simplest way would be to make the computer act as a Bluetooth Handsfree Kit, in fact it's already implemented in most OS with or without additional software.
In that case you don't actually need an android application since you can use the built-in HFP client.
If you want to implement the server yourself using Java then you could look at this :
http://today.java.net/pub/a/today/2004/07/27/bluetooth.html
You would also need to take a look at the Bluetooth Hands-Free Profile (HFP) protocol :
http://www.mcpc-jp.org/news/pdf/CCAP_Guideline_Ver10a.pdf
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I know this may not be possible. Here is my question. I have a domain. It is for my game server (Minecraft). I would like to be able to have my domain be typed in as example.com in both the game client and the browser url, and go to different places. In the browser, it would redirect to the website, and in the game client, it would redirect to the game server IP. I can give more clarification if needed. Thanks
This is possible already because the Minecraft server's socket is listening to a different port than an HTTP port.
You should be able to run a webserver and a Minecraft server without any modifications because HTTP listens on port 80 and Minecraft runs on port 25565.
NOTE:
If you are at home, then you will need to also set your router to allow port-forwarding for those two ports. Also, port 80 may become blocked by your ISP.
You can use a SRV record so game server requests go to one place and web requests go to another.
If you have control over the server that the domain name is forwarded to you can use. If you are using a linux server I would recommend IP Tables. Example of Port Forwarding with IP Tables