Can you simulate IME_ACTION_DONE commands on the adb shell?
I have used this but it does not work
adb shell input ime IME_ACTION_DONE
I am trying to use this system command on my calabash test by running the above command using the system function
Use the Calabash-Android method press_user_action_button to simulate these interactions. Notice that your application should still handle enter keys (e.g. press_enter_button) as some phones will have a physical or bluetooth keyboard connected.
Related
I looking for toggle my android phone mobile data with adb command. that is usually i do it with touch my mobile data icon in settings.
i found many reference to do it, for example this question , but nothing work for me, i try use:
$ adb shell svc data enable
$ adb shell svc data disable
when i look to my android phone nothing happen.
my android is KitKat 4 and i sure have rooted
Thanks.
Is it possible to simulate or mimic a call coming in on an Android device programmatically from the device (not connected to a computer)? I am doing a safety demo about the dangers of calls while driving and I would prefer not to have to create my own copy of the call app.
Yes you can!
Use adb for that, for emulators you can also use the android-studio tools.
adb -s <serial> shell am start -a android.intent.action.CALL -d tel:0612345678
Where <serial> should be your device or emulator id (like emulator-5555)
If you want to do it on the device itself, you can try to call yourself (yes it kind of works on most devices).
adb sentevent
adb input event
Above event are not working. But 'adb getevent' works properly. while using input tap the android os restarts, and no response while using adb sentevent
Please turn off the developers option, then the input tap event works without restart.
I'm (trying) to use Analog Keyboard for Android Wear from Microsoft Research.
The wearable (Moto360) is properly setup for Bluetooth debugging and the install procedure for the Keyboard finishes as expected:
$ adb devices
List of devices attached
4df11bb241805f93 device
localhost:4444 device
$ adb -e install com.microsoft.research.analogkeyboard-Signed.apk
50 KB/s (5322694 bytes in 103.401s)
pkg: /data/local/tmp/com.microsoft.research.analogkeyboard-Signed.apk
Success
$ adb -e shell ime enable com.microsoft.research.analogkeyboard/.KeyboardService
Input method com.microsoft.research.analogkeyboard/.KeyboardService: now enabled
$ adb -e shell ime set com.microsoft.research.analogkeyboard/.KeyboardService
Input method com.microsoft.research.analogkeyboard/.KeyboardService selected
After that, the Analog Keyboard app is visible in the list of installed apps on the watch and, when opened, works really fine.
The challenge is to make it replace voice commands. Is that possible?
No, it is not possible to intercept or change the voice input mechanisms used throughout Android Wear.
I want to simulate a Bluetooth headset being connected to a phone, to see how my code reacts to the intents and the connection as a whole. I'm testing on a real device connected via USB, in Eclipse.
I have been able to simulate the pressing of a "media button" by running the following:
adb shell input keyevent <keycode>
I was hoping for something similar, where I can set the device name, device class etc and trigger it?
Running the following produces instructions on various calls that can be made to adb:
adb shell am start
The way to trigger an intent "ACL_CONNECTED" is by typing this:
adb shell am broadcast -a android.bluetooth.adapter.action.ACL_CONNECTED
further options can be added in the command, as per the instructions from above.
The problem is, I want to simulate all the functionality of a Bluetooth device, not just the few intents it triggers. In other words, I want a dummy Bluetooth device which is indistinguishable from a real device from the phone's point of view.