I'm trying to create an android app which can access my computer's screen and file directory structure over the network.
A simple way would be to create a server running on my computer's localhost and to access it using my smartphone. But one question here is, would I be able to create a native Android app to access this, or would I be restricted to the browser?
Any other methods of achieving this that you would recommend? Maybe a way to SSH from my phone to my Ubuntu PC? Something else?
You can try using TCP Socket. Example: Create an application on PC use C# language, open port 8888 (ex: 192.168.1.200:8888). Then create an android app connect to 192.168.1.200:8888. OK. Some functions the same with FileZilla. When Android app sent command 'C:\ ls' to PC app. It returns a list directories in C:\ and send back again android app...When user double click in a directory (ex: Users) in android app, it will sent command 'cd Users' to PC app...
Hope it help you
Related
I'd like to create and Android app which allows me to control some aspects of my computer (volume, open pre-defined URL's..etc).
Would it be feasible to create a Windows client from an Android device? I'd like to access my PC's terminal in order to execute some commands.
If so..could you please point me out the right direction?
One possibitly (maybe not the best one) would be to host a apache webserver with access to the cmd by executing it with PHP. You could predefine commands which you call from specific URL paths like http://192.168.1.1/myHomeControl/muteSpeakers/ for muting the speakers.
You can execute cmd commands in PHP with
exec('ping');
or
system('ping');
Then you just need to call the URL from your android Device and it should work.
There are many ways to control Windows machine from another device. Every type of connection depends on particular type of protocol. And as result each protocol has its own rules, pros and cons and restrictions.
You can connect to the machine by SSH using JSCH. But you also need to install SSH server on your machine.
Or you can develop your own protocol using TCP/UDP as transport.
Try this software -- https://play.google.com/store/apps/details?id=com.sonelli.juicessh
Install the ssh on your machine:
For Mac:
http://www.maclife.com/article/howtos/how_enable_ssh_your_mac
For
Linux:
http://www.cyberciti.biz/faq/how-to-installing-and-using-ssh-client-server-in-linux/
For Windows:
http://comptb.cects.com/install-configure-ssh-on-windows/
Connect to it and do whatever you want to do. Have Fun!
If you want to create an application, than there is two options again: either you create a SSH tunel to the pc and you kinda let the user configure their SSH or create an External APP such the PHP , or VB.net that kinda detects by protocols and different ports the access to the machine.
I use this software to control volume and stuff : http://www.unifiedremote.com/ it is pretty good when it comes to control the laptop and and certain types even using the mobile as a mousepad -- To do this they created a software that needs to be installed on the machine to control doing so lets call this software the CONVERTER / RECEPTOR that converts all request that i do from mobile to the pc. Seems simple but not rlly :)
Regards!
I have set up a webpage locally on my computer, I wish to run it on my android-phone without pushing it to a server every time. Can I somehow access the site directly from the computer?
(I have the remote debugging up and running)
Yes. Just create a simple Webserver on your Computer (xmpp is working fine or a simple apache). Then you may want to access it by using your Computers IP when it's connected to the same network.
This may be the simplest case. You can also use a simple batch file (build script) which use adb push the html to your device anytime before you run it.
yes u can access it easily if you are on the same lan using a common wifi router...
suppose your computer ip is 192.168.0.10 then you just need to enter that address in the browser and its done...
If you install wamp or lamp or xamp using http://localhost we can access the site if you are on wifi then enter http://192.168.0.10 (supposing your PC address is 192.168.0.10) and you will see the website...
There can be a case where we need to port forward on router for http connections if it does not run...
thx
I want to create application which I want to use to turn off my computer. I think about connection phone with computer in WIFI. But I don't know how can I send commend to computer and how computer translate this commend and turn off computer. Can you show me the way how can I start and what I should to know to create application like this?
You can achieve that with the client/server paradigm. You'll need to develop an android app that will work as client and a pc app that will work as server.
On the server side you need to wait for two commands:
Discover: Used for the client to know what servers are available
Action: Used to let the server know that it must shutdown itself
I have to connect my Android device to my computer via internet connection. How do i go about doing it?
Create a webservice which the application talks to? ( But how to receive the data from webservice on my computer? )
You are on the right track. Look up REST APIs. You can either run the web service in the cloud somewhere and let both the Android and the PC connect as clients, or you can put a LAMP stack on your PC and run the web server and database right there.
If you allow direct USB connections, then you can also get the data off using ADB or Android File Transfer, without even using your app directly.
I've written an android application which reads database through the content providers. And now I want to display the database in a PC program. How can my PC program get the data gained by the android application? In other words, how to do data exchange between Android and PC via adb?
Thanks in advance!
Go in DDMS perspective, then open the File Explorer, there you can find data directories of the applications and system. Navigate to /data/data/you-package-name/databases, the click the Pull out file from the phone icon, save it wherever you want on your PC.
Android will not let you send files from device to PC using ADB. You can use adb pull to get files, but there isn't a way for the device to push. It would be easier to make a simple TCP client/server setup that would send data via WiFi or 3G. If you really need to use USB, you may be able to use the new USB APIs in Android 3.1.