J jlalexie Member Licensed User Longtime User Aug 15, 2019 #1 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 B4a cemp manifest.txt 879 bytes · Views: 429 AndroidManifest.xml AndroidManifest.xml 1.8 KB · Views: 377
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
Erel B4X founder Staff member Licensed User Longtime User Aug 15, 2019 #2 Tip: this is a mistake: Code: Copy <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
Tip: this is a mistake: Code: Copy <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
J jlalexie Member Licensed User Longtime User Aug 15, 2019 #3 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
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.
J jlalexie Member Licensed User Longtime User Aug 23, 2019 #4 I put the device in airplane mode, enable wifi. And it works perfect. Thank for your help. Upvote 0