I have an app developed and deployed on my HTC mobile phone. I am able to debug this in Eclipse with the USB driver SDK. The mobile phone appears now in the hardware manager ADB interface.
I would now be able to send data through this USB connection to the mobile phone which my app is able to handle. I know some tethering software which does this, therefore there must be a way to communicate with user data and with my app.
Related
So my problem is I want to make an app that can connect to the desktop and communicate with the device in a real production app.... not through usb debugging. In short an app that will connect to a pc and communicate with it either through usb or bluetooth or websocket ports. But I want to do this in a production app, where the user won't enable usb debugging. Kinda like iot
Is there any way i can do so
Is is it possible for Android development to remote debug an app from another network?
I am not talking about WebView/Web Pages debugging but as stated here, as this page talks about remote debugging a WebView or web pages opened in any app and also I don't think it will work on if device and computer are on different networks.
My scenario is that if Device A is connected to Computer A on Wifi A and I want to debug the app running on Device A from Computer B on Wifi B.
There is option to connect your device using the ADB wireless debugging using TCP-IP, but that requires the Device and Computer to be on the same network, but in my case device and computer are on another network.
Based on my understanding of Android Monitor, an Android device needs to be connected to the machine that is running Android Studio in order to profile CPU/memory/GPU usage. Are there any methods that allow profiling an app without connecting it to the PC? For example, writing the debug info that is generated for Android Monitor in a file and process the file later?
My goal is to gather debugging information without connecting the Android device to a PC (either via a USB cable or over the network).
Your initial work with a device usually needs to be over USB. However, after that point, you can switch using adb over the network, using adb connect. Once you have adb connected over the network, everything works just as if you had connected it via USB, including full Android Studio access.
Bear in mind that:
Some devices do not need the initial USB connection, as they are designed to work with adb over the network "out of the box" (e.g., Fire TV)
I think that older devices may not support this, for some value of "older"
You cannot monitor it without an active debugging connection. That being said, debugging connection isn't limited to USB. You need some kind of connection, and that connection can be USB, but it can also be over the internet(refer How can I connect to Android with ADB over TCP?).
Some devices don't support this, some have a setting for it in developer settings, and using root you don't need a connection. For devices that support adb over the internet, but aren't rooted or have the setting in developer settings, you need to have a usb connection initially.
I am looking for an easy way to prompt a user to download app from android (or iOS) when using external accessory/device.
I have a bluetooth device, and would like to prompt user when that device is connected for the first time to a phone. Has someone found a trick to do such a thing?
I believe this is possible with USB connection to phone using http://developer.android.com/reference/android/content/Intent.html#ACTION_UMS_CONNECTED
Any idea when connecting bluetooth classic or smart?
I'm working on a project to automate some tasks (such as play a song, play a video, receive bluetooth data, etc) on an Android phone from a PC.
Basically the PC will send a notifier to the phone and an app or something on the phone would then process the notifier and do 'something'. The opposite of this really:
http://code.google.com/p/android-notifier/
I've seen some examples showing how to send commands to an Android listener app or service via a network connection, but in this case, I would much rather the transmission be over a physical connection.
USB
Ideally, I'd like the connection to be via the USB port. But I've seen some posts online that suggest that the SDK does not natively support this. (Android apps, communicating with a device plugged in the USB port).
Is there some other SDK/API out there that makes this easier?
I've seen some posts on the ADB, but don't really get it... Would that work?
(http://developer.android.com/guide/developing/tools/adb.html)
Serial over USB
I've also seen some sites that show how to use a breakoutbox to perform bi-directional serial communication, but only with the G1. Is this possible with newer phones?
The Phone
I'm open to really any newish phone. I'm currently looking at the Galaxy S, because it has the video out through the headphone jack. I'm open to rooting if need be.
Implement a HTTP server in your app, then put your phone in USB Tether mode. This will create a local network between your phone and your PC. You should then be able to send HTTP request or create websockets using the phone's ip.
EDIT : I tested it, and it works, see here
What you can do is the phone acting as a server and then use adb to forward ports [1].
In this scenario the pc app would connect to localhost which would be redirected to the app on the phone via the usb cable.
But if you go this way, you might just as well simply connect directly to the phone's ip (without the adb port forwarding)...
[1] http://developer.android.com/guide/developing/tools/adb.html#forwardports