Wish For the next B4A versión Customize phones IDs with names

Daniel-White

Active Member
Licensed User
Longtime User
Hi, It is not a must, only aesthetic wish. and it is not really high priority wish neither.

Can we associate the ID of the phones connected by USB. usually, I am working with two phones and perhaps someday with 3. :eek: One with Lollipop, another with Kitkat, etc. one very but very poor in hardware and another one with very nice hardware.

I would like to customize the names to show after compile, it will be more easy to select the correct device to test. ;),

upload_2016-2-22_8-44-2.png


instead of 05c9xxxxxx show MyslowyPhone
instead of 4d00f9cxxxx show MypowerfullPhone etc.

Thanks
 

Johan Schoeman

Expert
Licensed User
Longtime User
Seems like it can be achieved with BluetoothAdapter on some devices but someone commented that:

Note that even having a "Settings->About->DeviceName" is a vendor customization, rather than a part of Android itself. – Chris Stratton May 24 '13 at 2:10

...and thus for some devices (manufacturers) it will return the model number and not the user device name that has been set.

".....This got me what I was needed... http://cmanios.wordpress.com/2012/05/09/bluetooth-adapter-device-name-and-mac-address-in-android/

BluetoothAdapter myDevice =BluetoothAdapter.getDefaultAdapter();String deviceName = myDevice.getName();
Make sure you add

<uses-permission android:name="android.permission.BLUETOOTH"/>
to your manifest......"
 

DonManfred

Expert
Licensed User
Longtime User
Seems like it can be achieved with BluetoothAdapter on some devices but someone commented that
I for myself are using always USB-Connected devices
Note that even having a "Settings->About->DeviceName"
My device, when connected to usb are listed with the given Name in my Explorer (S6 EDGE) but inside the B4A Ide it is listed as just a long number.

No problem if i only connect one device to my pc. But while developing i usually want to connect more devices at once.
The problem starts here :D

I now get a list of all IDs (the long number) to choose from which device i want to use (at each compile)...

Seeing a Device NAME instead of a long id could be much of help.
 
Top