stf icon indicating copy to clipboard operation
stf copied to clipboard

Need to get device custom name so that It can be identified on rack

Open tadesushilgithub opened this issue 10 years ago • 9 comments

I have 20 devices connected sometimes some devices goes offline means 20 becomes 17 but it's very critical to know which device goes offline. So I renamed devices by setting up there custom name like RACK1DEV3 so that it would be Identified. But I need to extract that and bring it to UI. So I went through some adb getprop i couldn't found. My question if I need to bring device name in UI do I need to change stf.apk? or adb getprop can help me so that I'll write API to get that.

tadesushilgithub avatar Jul 31 '16 06:07 tadesushilgithub

Perhaps you could use the notes column in the detailed view. Double click the value (empty by default) and you should be able to enter a note for each device.

sorccu avatar Jul 31 '16 06:07 sorccu

Also, if the devices go offline often, but you only have 20 devices, then it's probably a hardware issue.

sorccu avatar Jul 31 '16 06:07 sorccu

But the problem is that User's are often change the Notes value every time. Can I get Device name from Android?. The reason of devices goes offline is H/W issue only because I seen that device is not getting connected to the same server but if I remove and add to another server it's work fine and after some days again goes offline :(. I kept usb connection in MTP mode.

tadesushilgithub avatar Jul 31 '16 06:07 tadesushilgithub

What do you mean by device name? What is the value you want to see?

sorccu avatar Jul 31 '16 06:07 sorccu

Please find the Images for more clarity. I want to see RACK 2 RIGHT5 as my device name in UI.

snap1 snap2

tadesushilgithub avatar Jul 31 '16 06:07 tadesushilgithub

Interesting problem, but it looks like it isn't a standard Android feature, and therefore there's no API to access the user-specified device name. Some have had success accessing the bluetooth adapter's device name.

sorccu avatar Aug 01 '16 07:08 sorccu

Ok Thanks @sorccu

tadesushilgithub avatar Aug 01 '16 11:08 tadesushilgithub

I think one way you could do it would be to use Contacts, and look up the device owner's profile or a specific contact. You could then use the contact fields to store information.

Alternatively if you're OK with building your own app, you could just store it in a local file, database or wherever.

sorccu avatar Aug 01 '16 12:08 sorccu

Ya I will try that :).

tadesushilgithub avatar Aug 01 '16 12:08 tadesushilgithub