aidymp Well-Known Member Licensed User Longtime User Dec 9, 2016 #1 Hi, im searching for a way to find a name of a device on the network. my search failed as I don't really know the terminology. So friendly name, device id, Didn't really help. I would like to get the Name shown in yellow on the picture below. Thanks Aidy
Hi, im searching for a way to find a name of a device on the network. my search failed as I don't really know the terminology. So friendly name, device id, Didn't really help. I would like to get the Name shown in yellow on the picture below. Thanks Aidy
lemonisdead Well-Known Member Licensed User Longtime User Dec 9, 2016 #2 Hello, What you are trying to get is named "net.hostname". You can access it using reflection (or JavaObject) : http://stackoverflow.com/a/21899684 Upvote 0
Hello, What you are trying to get is named "net.hostname". You can access it using reflection (or JavaObject) : http://stackoverflow.com/a/21899684
aidymp Well-Known Member Licensed User Longtime User Dec 9, 2016 #3 lemonisdead said: Hello, What you are trying to get is named "net.hostname". You can access it using reflection (or JavaObject) : http://stackoverflow.com/a/21899684 Click to expand... Thanks for the rapid reply, I will take a look, do you mean I have to use inline java?? Thanks Aidy Upvote 0
lemonisdead said: Hello, What you are trying to get is named "net.hostname". You can access it using reflection (or JavaObject) : http://stackoverflow.com/a/21899684 Click to expand... Thanks for the rapid reply, I will take a look, do you mean I have to use inline java?? Thanks Aidy
lemonisdead Well-Known Member Licensed User Longtime User Dec 9, 2016 #4 aidymp said: do you mean I have to use inline java Click to expand... Probably and I am currently trying but can't manage to make it accepted (I am not good at Java). Perhaps someone here could help more ? Upvote 0
aidymp said: do you mean I have to use inline java Click to expand... Probably and I am currently trying but can't manage to make it accepted (I am not good at Java). Perhaps someone here could help more ?
lemonisdead Well-Known Member Licensed User Longtime User Dec 9, 2016 #5 No, I am sorry. Using inline Java or my solution won't provide you the hostname (as I understand it, it looks for the net.hostname in the context of the app and not the system). I can't go further Lately edited for someone coming here : Erel already provided some code to access the net.hostname of the device https://www.b4x.com/android/forum/threads/net-hostname-with-reflector.53495/#post-335290 Attachments test.zip test.zip 7 KB · Views: 365 Last edited: Dec 9, 2016 Upvote 0
No, I am sorry. Using inline Java or my solution won't provide you the hostname (as I understand it, it looks for the net.hostname in the context of the app and not the system). I can't go further Lately edited for someone coming here : Erel already provided some code to access the net.hostname of the device https://www.b4x.com/android/forum/threads/net-hostname-with-reflector.53495/#post-335290
aidymp Well-Known Member Licensed User Longtime User Dec 9, 2016 #6 lemonisdead said: Probably and I am currently trying but can't manage to make it accepted (I am not good at Java). Perhaps someone here could help more ? Click to expand... Me too! lol I also the stackoverflow post seems to relate to the device the code is running on, im looking for that name from a device on the network, not the device i am using. basically i was looking for a clever way to find the iP of FreeSat (in the above picture) Thanks Aidy Upvote 0
lemonisdead said: Probably and I am currently trying but can't manage to make it accepted (I am not good at Java). Perhaps someone here could help more ? Click to expand... Me too! lol I also the stackoverflow post seems to relate to the device the code is running on, im looking for that name from a device on the network, not the device i am using. basically i was looking for a clever way to find the iP of FreeSat (in the above picture) Thanks Aidy
Erel B4X founder Staff member Licensed User Longtime User Dec 11, 2016 #7 I don't think that it is possible. What you can do is to send a UDP packet to the broadcast address with the device ip address. Upvote 0
I don't think that it is possible. What you can do is to send a UDP packet to the broadcast address with the device ip address.