"Requiring Wifi permissions limits app availability on TVs that support only Ethernet" warning in Android Studio - can anything be done about this?

70
November 25, 2021, at 05:20 AM

I'm developing an Android app (a game) that supports phones and TVs too, and can play multiplayer via LAN (WiFi or Ethernet) or WiFi Direct.

Android Studio warns me with a Lint warning in the manifest that says that if I "require Wifi permissions", then it will "limit the app availability on TVs that support only Ethernet" (TVs that don't have Wifi).

I would like to support TVs without Wifi too. The multiplayer code is written in a way that it handles the Ethernet-only situation.

However, the Wifi-related permissions are normal permissions, and their declarations can't be removed from the manifest.

Is there anything that can be done here to keep my app available for these TVs without Wifi?

Answer 1

Some permissions, when you request them, cause Android to think that you need the associated hardware. In your case, requesting ACCESS_WIFI_STATE and CHANGE_WIFI_STATE cause Android to think that you need WiFi hardware.

Adding <uses-feature android:name="android.hardware.wifi" android:required="false" /> downgrades that from "must have WiFi" to "can use WiFi". Beyond clearing up the Lint complaint, it will help with actual app distribution, allowing your app to run on hardware that has only Ethernet. In addition to some TV platforms, there may be some Chromeboxes that also are Ethernet-only.

But there is no automatic action for the warning about this TV-Ethernet thing

I do not see a bug report for that in the issue tracker. If you are in position to create a scrap project that has your <uses-permission> elements, you might consider filing a feature request to get the quick-fix that you seek added to Android Studio.

READ ALSO
Trying to pull from a folder of images

Trying to pull from a folder of images

Hi first time here and I'm very new to coding

9
Python is not able to read the file

Python is not able to read the file

Let me rephrase the questionThe equal signs are in the code, i hope that this is showed in the following lines of code

41
Goods list Data import using Excel Sheet

Goods list Data import using Excel Sheet

I'm new to Greater WMSI'm experimenting problems related to Importing Goods List using Excel file

53