Is is possible to simulate the battery charging? I mean, I want to beat the phone (android) to beleive it is charging. The power cable is not connected, but the phone should detect, that it is connected.
Is it possible somehow?
Sure it is. Once you have installed Android Studio with Android Emulator, you can create new AVD (Android Virtual Device) aka Emulator, run your app on it and simulate battery level via Emulator settings. I checked it some time ago and it works fine.
Related
So I've got a project with a mobile and a wear part. Actually, it's the default Basic Activity and Basic Wear Activity project, targeting API 21 on the phone and the latest 7.1.1 for watches. My watch (OG LG Urbane on AW2.0) is plugged in with ADB debugging enabled.
The watch shows up in the list of ADB devices, but when I try to run the 'wear' project on it, I get the following error:
device '506KPQJ0130548' not found com.android.ddmlib.AdbCommandRejectedException: device '506KPQJ0130548' not found at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:862) at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:451) at com.android.ddmlib.SplitApkInstaller.uploadApk(SplitApkInstaller.java:152) at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:78) at com.android.ddmlib.Device.installPackages(Device.java:904) at com.android.tools.idea.run.tasks.SplitApkDeployTask$SplitApkInstaller.installApp(SplitApkDeployTask.java:117) at com.android.tools.idea.run.RetryingInstaller.install(RetryingInstaller.java:86) at com.android.tools.idea.run.tasks.SplitApkDeployTask.perform(SplitApkDeployTask.java:86) at com.android.tools.idea.run.LaunchTaskRunner.run(LaunchTaskRunner.java:120) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.Core... (a minute ago)
The watch then disappears from ADB for a few seconds, like something crashes.
Okay, what it turns out is that there is some incompatibility with USB 3.0 in the cable, charger or watch. When I use another port, there's no problem.
That's really annoying though, all my computer's USB 2 ports are on the back so my watch has to sit in a very awkward location where I can't really test it without going under the desk. You wouldn't think that would be an issue with a modern device, but probably LG's fault.
Yesterday my PC (Windows 8.1) performed an automatic update and now my android devices (a Samsung s4 mini and Samsung Note 8.0 tablet) are not being recognized by Android Studio or Windows in general when plugged in via USB. I have tried the devices on other PCs as they work as normal.
When I plug the devices into the computer I see a charging icon on the phone but no notification of USB connection and no option for selecting between camera and MTP device. The devices also do not appear in Device Manager (not even as unknown devices) or as storage drives in explorer. I attempted to do a system restore but the restore point failed when I tried to launch it and then deleted itself. Re-opening the restore tool now shows that there are no restore points and that the memory allocation for restore points had suddenly been set to zero (perhaps I have a virus).
The USB ports work for other devices, such as USB drives. I have tried plugging the Android devices into a variety of ports with no success. I have also tried different cables. I use the devices for development, so USB debugging is switched on.
Is there any sort of process that is typically launched by Windows that allows an Android device to be recognized? I am trying to understand what may have happened here and how to fix it. Google searches are turning up nothing without being able to see the devices in Device Manager.
Many Thanks
Unbelievably, I tried a fourth USB cable and connectivity is back. I didn't realize there could be so much variation in a cable.
I'm on a MacBook running macOS Sierra and I'm having trouble connecting Android Studio to the phone. The phone is a Samsung Galaxy A3 (2016) running the latest update - Android 6.0.1.
I've tried listing the devices using the command adb devices, but the list is empty.
When I connect the device I can hear a tone and the phone is charging. I do not get a notification when connecting the device, hence trying to tap on the notification and somehow forcing an MTP connection is impossible.
I've already activated the Developer Options and the USB configuration mode is set to MTP (Media Transfer Protocol). When trying to cycle through the available USB modes, if the phone is connected to the computer, it always reverts back to MTP automatically.
Trying to turn off and back on the USB debugging, or the Developer options didn't work. Also restarted both the phone and the computer but nothing changed.
Does anyone have a clue of what is going on?
From my research, the only thing that seems to have worked for other people is to tap the notification that is supposed to appear when I connect the phone to the computer.
Any help would be greatly appreciated. Thanks!
I presume that the cable is broken or just plainly wrong. Changing the cable should help.
I have an android application and I'm able to simulate the network going in and out, however I wish to know if there is a way to simulate an android device without a phone number.
I have a program which can run just through wireless, so the phones don't need service. I'm curious if there is a way to emulate this with the android emulator in eclipse.
I use the Genymotion emulator. This emulator doesn't have a telephony module - for example, switching off wifi switches off all network connectivity. The emulator works great for Eclipse, IntelliJ and Android Studio.
And you also get the benefit of having an insanely fast emulator.
AVD takes forever to load my app. So I was wondering if using my android cellphone would speed things up a bit.
Very simply said, it absolutely will.
Enable USB debugging on your device.
Install phone drivers and connect your phone to your PC. When running your application choose your phone from the list and run.
Read more about all steps on Using Hardware Devices, Android developer site