Wish Show USB connected

ddk1

Member
Licensed User
The B4A shows in its statusbar whether B4A Bridge is connected, but it doesn't show if android device connected via USB. Using B4A Bridge, every time I compile and load to the device, I must answer prompts about installing the app (I understand its forced by Android). But using USB, these prompts don't happen and it goes on to install straight after compile with no further input from me.
The problem I am having is that although I'm connected via USB C, the connection isn't totally reliable so sometimes after compiling I get a 'no device connected'. I wiggle the cable and then maybe its ok. So now, I test I am connected by running command 'adb devices'. Ideally, B4A could show me in the statusbar that the device is connected (via USB).

As an aside, I really hoped USB C would solve the 'wiggle required' that so often happened with micro USB. Its better, but not solved. My device will sometimes show me the cable is connected, its charging, but the data transfer part is not connected. Where's that 'snap' into place asurity like Apples lightning plug. I'm not generally an Apple fan, but give me lightning, upgraded to usb c speeds :)
 

ddk1

Member
Licensed User
For anyone else who would find this useful, I kludged together a little vb app (attached) that does the job.
It creates a tray icon that indicates if a device is connected. It simply runs "adb device" and reads whether a device is connected.
By default it will indicate any device connected. Put a specific devicename on the commandline if required. Right click the tray icon to see name of device found.
It updates every 2 secs so don't leave it running all the time, just when relevant.
To end app, right click icon & select Exit, or just dblclick icon.
 

Attachments

  • TrayMonMobConnected.zip
    1,012 bytes · Views: 126
Top