Using Android 6.0 AOSP.
From logs : wasDataTurnedOn: false;
Maybe change to something like this? :
public static bool IsMobileDataEnabled()
{
bool result = false;
try
{
Context context = //get your context here or pass it as a param
if (Build.VERSION.SdkInt >= BuildVersionCodes.JellyBeanMr1)
{
//Settings comes from the namespace Android.Provider
result = Settings.Global.GetInt(context.ContentResolver, "mobile_data", 1) == 1;
}
else
{
result = Settings.Secure.GetInt(context.ContentResolver, "mobile_data", 1) == 1;
}
}
catch (Exception ex)
{
//handle exception
}
return result;
}
Using Android 6.0 AOSP. From logs : wasDataTurnedOn: false;
Maybe change to something like this? :