how to get ip address of pc in android emulator through code

前端 未结 2 1847
孤城傲影
孤城傲影 2021-01-13 19:59

i am using the code of this link How to get IP address of the device from code? but getting ip address different than from my machine....how can i get the ip address of my m

2条回答
  •  不思量自难忘°
    2021-01-13 20:36

    Check this out if you want to access host machine.

    Another solution is to run this on shell

    $ adb shell am start -a android.intent.action.WEB_SEARCH -e query "what is my ip"

    it will display your system IP

提交回复
热议问题