Requirement: I want to control my android phone through my laptop using WI-Fi. For this I need to run a web server and a "customized" web app that runs on the android phone over a particular port and the wifi adapter's ip address. For example , I can connect to the web application running on my phone through the browser in my laptop using : http://(ip address of the phone):port
Things I have tried: I evaluated a few webservers for android that lets me run java based servlets like (ijetty). There are others like TWJS , KWS , PAW etc. So far, I am able to run them on the phone and access the web server through my laptop.
My Question: Of all the resources and materials pertaining to developing apps for Android , I'm having a real hard time finding any useful and clear information on what web technology should I create a web application that can use the android APIs and effectively communicate with the phone just as any native Android application.
i-Jetty claims to support Web Applications that can use the android apis , but lacks any sincere documentation on how to build to such web application/servlets that uses Android APIs.
While,my requirement is similar to what to an existing application for Android does namely AirDroid, it is not open source and neither it discusses anything related to its implementation architecture. So, I am open to any suggestions that can help me create a web application for the managing the android phone wirelessly.
How can I control my Android phone from PC wirelessly? You need a competent third-party app like AirDroid Personal to control your Android phone from PC wirelessly. As the best Android remote control app, AirDroid allows users to control Android from PC via wifi and remote connection mode.
Connect Android to PC via WiFi You can also control Android from PC via WiFi but do note both devices should connect to the same network. Launch the application on Android device, choose “WiFi Connection” mode and hit “M” icon. Then select the device name with “Apowersoft” inside.
Giving a look at the i-jetty example application you can see that it's possible to retrieve the Context
and ContentResolver
objects:
android.content.ContentResolver resolver = (android.content.ContentResolver)config.getServletContext().getAttribute("org.mortbay.ijetty.contentResolver");;
android.content.Context androidContext = (android.content.Context)config.getServletContext().getAttribute("org.mortbay.ijetty.context");
through which you can access system services, read and write preferences, execute queries to retrieve contacts etc. as if it was a normal android application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With