I'm creating an android app that should communicate with a PC application.
At first, I wrote the PC application as the server side of the connection (on Python),
but for some reasons I want to change it and to make the android app to the server side.
My problem is that the connection should be over the internet.
As I know, the android device (phone) is inside a private network of the cellular company,
which makes a problem to access the device over the internet.
Is there any way that the android device will be accessed directly from the internet?
Yes. IF you have access to TCP/UDP ports (they are not blocked on your private domain),
give a shot to Java Socket Programming.
Whether the server is mobile or PC is totally up to you.
If you need to learn about socket programming, the best place to start is this tutorial on official Oracle documentation website.
This is yet another learning by example tutorial.
Related
Is it possible to connect my Android phone (Redmi Note 7) directly to my Windows (10) PC in such a way that I can make network connections to the PC from the phone, with/without a per-existing WiFi network?
My specific issue is that I want to be able to connect the camera of my android phone with the web browser using a specific IP address. This IP address when typed on the browser would open a screen that would help us to connect with the android device, basically feeding in everything what the android device camera sees.
I've already done my work on the camera2API interface work, I just need some help with the network connection part.
Ideally I'd like a solution that doesn't involve the Internet at all - neither from the PC nor the phone. In my particular situation, it would also be ideal if this can be done over a WiFi network connected via a single IP(same for phone and to be typed on the browser) would suffice.
I really need help with developing an android app that would help me to setup the connection between the android phone and PC using the TCP/IP protocol. There is already an app for serving such a purpose whose link I am providing below, but I have to add some security and login features on the existing app. All i am asking is how would I set up such a connection in the first place and proceed forward with the app.Also, Bluetooth provides a very less upload speed, and about the USB, i am trying to make the total process wireless. the link to the existing app: ip-webcam.appspot.com
Well, I am working at a similar app, and I use a modified web server for configuration and delivering images (I am doing it on the native side though, but I am sure there are plenty of Java web servers out there).
I have a client - server application which I developed and tested on my pc where I use a certain port number and the IP "10.0.2.2" now I wanna move the client to my android device which is located on the same wifi network as my pc ... what do I need to change ?
You need to port it to android platform in context of UI and
frameworks.
Both Android Client and PC Server must be there on same
wifi network, so that they can discover each other.
You must go with a Hello World Program of Android, if you do not have prior
experience with same.
Networking Demos.
Also, threading will be required I think!
In the app i'm making, i want the user to be able to access the android phone(not the emulator) from pc via internet (different network connections) (not via usb).
I've been experimenting about this subject since i'm just a beginner in android and in networking.
This question android socket communication through internet is related to what i'm asking, but there, the communication is made between windows and emulator.
Is it possible to make this communication and to be able to edit my contacts for example?
If yes, can someone please provide some code snippet?
Thank you.
I'm writing an Android application for Hotel Management. That each employee has own tablet running Android OS. this app sometimes will send data to host (that the room has been booked) or host will send data to client (about new condition of other rooms).
Host can be an another Android smartphone or a PC, and those device will connect together through same wifi network.
I don't know which way is easier (using smartphone for host or PC for host). If using PC, I decide that PC will have local server running database, and each tablet will connect to this server and update data from database. Does this easy to implement ?
Please help me figure out those problems. thanks :)
You want to use PC/Server for the host so you can run a proper RDBMS.
There are tons of examples available for creating Android apps that talk to a variety of RDBMS systems. On your server you'll run an interpreter (PHP, ASP.NET, Node) and your Android app will connect to this over the Wifi network using http.
See example here:
http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/
I want to establish a socket connection between my mobile Android device and my PC, so that a string will be sent from my mobile phone to the Android application running on the PC.
See this tutorial for setting up a TCP connection, which is probably the one you're looking for, based on Java in the PC side which might be the server or the client:
Link
For more basic information about coding a client-server software you can also check this series of YouTube tutorials