I was wondering if it is possible to detect whether or not my Android phone is plugged into windows, so that if it is, I can run another command?
By the way, I mean for a Java app that is on the computer not the phone.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A simple way is to use the adb tool that comes with the Android SDK, which will list connected debuggable devices.
Less simple is to list your connected USB devices directly and identify Android devices that way.