Why is network bearertype always 0 (unknown0 on iOS

916
2
Jump to solution
09-05-2017 07:49 PM
by Anonymous User
Not applicable

Hi.

The AppFramework has a network object that can return network configurations available, an example of a json object below.

I've found that "bearerType" on iOS always seems to be 0 (unknown).

Windows seems to report Wifi connections as 2 (WLAN), but all others as 0.

Android seems to report all the different types correctly.

I had thought to use this to determine whether the app was on a wifi connection or ethernet etc, to determine whether/when to initiate a sync.

Is this a problem with the AppFramework not returning correct values? Or is it an underlying problem with the Qt framework?

Or, is there a different and more reliable way to determine the current network connection type?

{
"bearerType": 0,
"bearerTypeFamily": 0,
"bearerTypeName": "Unknown",
"children": [],
"identifier": "3278187404",
"isRoamingAvailable": false,
"isValid": true,
"name": "Wi-Fi",
"purpose": 0,
"state": 2,
"type": 0
}

Cheers,

-Paul

0 Kudos
1 Solution

Accepted Solutions
ShobanaSuresh
Esri Contributor

Hi Paul,

This is a limitation in Qt Framework. Based on the comments in below Qt bug report, I understand that the back end implementation for iOS is not available.

[QTBUG-48432] [iOS] [OS X] QNetworkConfiguration bearerType, bearerTypeFamily and etc return Unknown... 

> Or, is there a different and more reliable way to determine the current network connection type?

Currently there is no API in Qt or AppFramework to determine the current network connection type. We had previously raised this as an enhancement request to Qt Company and the progress of it can be tracked using the below bug report.

[QTBUG-58946] QNetworkConfigurationManager::isOnline needs to be replaced with a set of more specifi... 

Thanks

Shobana

View solution in original post

0 Kudos
2 Replies
ShobanaSuresh
Esri Contributor

Hi Paul,

This is a limitation in Qt Framework. Based on the comments in below Qt bug report, I understand that the back end implementation for iOS is not available.

[QTBUG-48432] [iOS] [OS X] QNetworkConfiguration bearerType, bearerTypeFamily and etc return Unknown... 

> Or, is there a different and more reliable way to determine the current network connection type?

Currently there is no API in Qt or AppFramework to determine the current network connection type. We had previously raised this as an enhancement request to Qt Company and the progress of it can be tracked using the below bug report.

[QTBUG-58946] QNetworkConfigurationManager::isOnline needs to be replaced with a set of more specifi... 

Thanks

Shobana

0 Kudos
by Anonymous User
Not applicable

Thanks Shobana.

0 Kudos