• 0 Posts
  • 2 Comments
Joined 2年前
cake
Cake day: 2023年6月17日

help-circle
  • Incorrect. If you aren’t using WifiManager, you don’t need ACCESS_WIFI_STATE or location permissions. ConnectivityManager gives information to know the connection type with only ACCESS_NETWORK_STATE, which is granted automatically on install without prompting the user to allow.

    And besides that, you should really be checking ConnectivityManager.isActiveNetworkMetered() instead of the connection type anyway, since the user could be on tethered wifi, for instance.