I want to make some server and client type program but I don't know how to do that. I will describe it below:
It will have a GUI on windows and when I enter some text there and click send, it will first check if my mobile is connected with it or not (via Bluetooth or WiFi or cable anything), if it's connected it will send that message to an app or program in my phone. If my phone is not connected directly it will send that message via internet (assuming both my PC and mobile has active internet connection) to my particular mobile only. And this should be a two way communication.
I don't want to use any 3rd party APIs or software as long as possible. Is such a thing possible? How can I achieve it? Or what should I learn to make such a thing?
It seems like you don't need to learn another language to do this and you don't have to use external application and APIs. Your project benefits well from the master/slave architecture.
The project will contain 3 systems
Mobile: This will the slave device. You want to intercept SMS and phone calls to forward that information to the computer. Along side that you also want to receive commands from the computer, ex: the computer commanding the phone to send an SMS to caller/contact. This requires an application that can listen to Android events for incoming calls and SMS. It is straight forward to do this with Android programming.
Computer: You can make a GUI application that connects to an API and can send and receive data to mobile clients through the API. Python can do this job and you can connect to your personal assistant if it's also written in Python. This will be the master device.
Server API: The computer and mobile will not communicate directly with each other. The server API will be a gateway for them to communicate, all you need is internet connection for both devices. This eliminates the need to use other type of connectivity such as Bluetooth and USB, and you don't need to have the devices in close proximity. It won't be an issue if it's a requirement to implement proximity. The API can be made with Python as a push API. You can immediately notify the computer once an incoming call is detected or when you want to send an SMS from the computer through the phone. An alternative to push APIs is a combination of REST API and TCP socket communication.
Here are quick illustrations over how the systems can communicate:
Once the data from the SMS/call is sent to the computer, you can forward the information and let the personal assistant handle it.
There are multiple ways you can develop this project, this is one way you can to go at it.