Android Question Socket not connected with Android 9

jlalexie

Member
Licensed User
Hello,


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

https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/page-2.

)

Here are the B4a and the Android Manifest file.


Thank for help
 

Attachments

  • B4a cemp manifest.txt
    879 bytes · Views: 198
  • AndroidManifest.xml
    1.8 KB · Views: 191

Erel

B4X founder
Staff member
Licensed User
Longtime User
Tip: this is a mistake:
B4X:
<uses-permission
  android:name="android.permission.WRITE_EXTERNAL_STORAGE"
   android:maxSdkVersion="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: https://www.b4x.com/android/forum/threads/mqtt-chat-network-error.90892/#post-574610
 
Upvote 0

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.
 
Upvote 0
Top