• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Assistance for first time android dev

batman007

Lurker
Hi,

I am undertaking an android dev project for Uni. It requires me to build an app for an android smart phone that will allow me to remotely shutdown a pc. I have never programmed for phones before so am a little lost as to where to begin. Namely:

- Which is the easiest IDE to use for PC to smart phone connectivety
- Is there any examples or tutorials on establishing a connection between a pc and smartphone

Any assistance would be greatly appreciated.
 
Third, which you didn't mention - is there an acceptable way to remotely turn off a PC without getting into a bit of engineering? (Shutting off the power is to clicking "shutdown" as dropping your neighbors off the 25th floor balcony is to accompanying them down in the elevator to the street.)

You have 2 main paths to follow here, ignoring the point I made above. You can electrically connect the cellphone to the PC, causing some app to electrically do something to th PC to cause it to shut down, or you can use an app to send a wifi or Bluetooth signal to the PC to cause it to shut down. The two are totally different approaches - engineering and programming - and we have no idea what subject this is about.

To answer your questions:

1) Which is the easier fruit to start your car with? The question is meaningless. Eclipse is the normal editor with which to build Android apps. For the PC end? Ask 5 programmers and you'll get at least 15 answers.

2) Again - a hardware connection or a software connection? (It's difficult to externally push a mouse button on a "Shutdown" button on a PC screen. And it's "not the way to go" to just shut the power off.) Actually, I don't think there is an acceptable method of shutting a PC off using a phone - unless the phone is running as a remote terminal to the PC, and the user manually (on the phone screen's representation of the PC's screen) shuts the PC down, but VNC programs were written a long time ago, so you'd be reinventing the spoke, not to mention the wheel, the axle, axle grease and the rest of the entire technology.
 
Thank you for your reponse, and forgive my lack of clarity in my questions.

My intentions are to be able to use an application on my phone, which in turn makes a wifi / internet connection to my pc. The app will have a button of some sort which when pressed will tell the pc to perform 'shutdown' command. This will all be software based as im sure there will need to be a program running on the Pc waiting for these commands.

I require some aid in the basics of establishing a wifi connection with the pc mainly, as it seems that would be the largest obstacle in this project.
 
The basic way to connect to the PC would be to open a socket and connect it to an agreed upon port on the PC. The PC would either have a service listening on that port or have a service registered that would be started when it receives a connection on that port. Look at documentation for Socket. On a Linux box, registered services are listed in "/etc/services" (Windows must have something similar).
 
Back
Top Bottom