I have a project with ESP8266 as a Access Point with Wifi connection. It has no internet connectivity.
Most mobile phones work good. I have problems with never Sony mobiles (Android 8.1 and 9.0).
They connect to the ESP8226, detect there is no internet connectivity and disconnect. I have found Erels solution for this in
https://www.b4x.com/android/forum/threads/mqtt-chat-network-error.90892/
It's based on:
... cm.InitializeStatic("android.net.ConnectivityManager").RunMethod("setProcessDefaultNetwork", Array(Network))
from: https://developer.android.com/reference/android/net/ConnectivityManager
i found this for never Android version:
static boolean setProcessDefaultNetwork(Network Network)
This method was deprecated in API level 23.
This function can throw IllegalStateException.
Use bindProcessToNetwork(Network) instead. bindProcessToNetwork Is a direct replacement.
1. Can someone please help me to implement this (always got error messages)?
2. Is there a better solution? What can i do?
Thank's a lot for your help and best regards from germany
Michael
Most mobile phones work good. I have problems with never Sony mobiles (Android 8.1 and 9.0).
They connect to the ESP8226, detect there is no internet connectivity and disconnect. I have found Erels solution for this in
https://www.b4x.com/android/forum/threads/mqtt-chat-network-error.90892/
It's based on:
... cm.InitializeStatic("android.net.ConnectivityManager").RunMethod("setProcessDefaultNetwork", Array(Network))
from: https://developer.android.com/reference/android/net/ConnectivityManager
i found this for never Android version:
static boolean setProcessDefaultNetwork(Network Network)
This method was deprecated in API level 23.
This function can throw IllegalStateException.
Use bindProcessToNetwork(Network) instead. bindProcessToNetwork Is a direct replacement.
1. Can someone please help me to implement this (always got error messages)?
2. Is there a better solution? What can i do?
Thank's a lot for your help and best regards from germany
Michael