Android Question Socket not connected with Android 9

Discussion in 'Android Questions' started by jlalexie, Aug 15, 2019.

  1. jlalexie

    jlalexie Member Licensed User


    I'm programming with B4A 9.0 and I'm happy with this product (easier than Android Studio).

    I use a TCP Client socket to communicate with a Wi-Fi ESP8266 access point (no internet connection): "Public CltSock As Socket".

    Everything works great for Android versions 5 to 8.

    But no Wi-Fi connection with an Android 9.0 smart phone (Huawei). "Sub Client_Connected (ConStatus As Boolean)" returns "ConStatus" false.

    In the manifest, I added: "CreateResourceFromFile (Macro, Core.NetworkClearText)" but nothing in Wi-Fi connection (as it is said in


    Here are the B4a and the Android Manifest file.

    Thank for help

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    Tip: this is a mistake:
    "28" />
    It should be 18 if you are only accessing RuntimePermission.GetSafeDirDefaultExternal.

    What is the output of Log(LastException) in Client_Connected?

    Make a test, put the device in airplane mode and enable wifi (cellular network should be disabled). Does it work? Android will prefer the network with internet connection.

    See this:
  3. jlalexie

    jlalexie Member Licensed User

    thank you,
    I do not currently have the Android 9 smart phone to control the Log(LastException) in Client_Connected.
    I will do the tests as soon as I get the SP.
  4. jlalexie

    jlalexie Member Licensed User

    I put the device in airplane mode, enable wifi. And it works perfect.
    Thank for your help.
    Erel likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice