On android versions >= 24 manifest registered broadcast receivers for ConnectivityManager.CONNECTIVITY_ACTION
will not receive the broadcast, see: https://developer.android.com/reference/android/net/ConnectivityManager#CONNECTIVITY_ACTION
Details
Details
- Reviewers
albertvaka - Group Reviewers
KDE Connect - Commits
- R225:b29e7eb00052: Need to dynamically register broadcast receiver for ConnectivityManager.
Run app on phone with API > 24 without this patch and this broadcast will not be received any longer
Run app on phone with API > 24 with this patch and this broadcast will be received again
Diff Detail
Diff Detail
- Repository
- R225 KDE Connect - Android application
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
LGTM.
Although, documentation says:
This constant was deprecated in API level 28. Apps should use the more versatile requestNetwork(NetworkRequest, PendingIntent), registerNetworkCallback(NetworkRequest, PendingIntent) or registerDefaultNetworkCallback(ConnectivityManager.NetworkCallback)