mikepenz / MaterialDrawer

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
https://mikepenz.dev
Apache License 2.0
11.67k stars 2.05k forks source link

Not offering options to the user to control data usage #2743

Closed amazuerar closed 3 years ago

amazuerar commented 3 years ago

About this issue

Dear Developer!

My name is Alejandro Mazuera-Rozo, I am a PhD Student at Universidad de los Andes, and at Università della Svizzera italiana. I am part of a research on the usage of network libraries within Android apps. As result of this we identified some code locations that might have network related problems.

In this case, we address the code locations that are related to a potential issue concerning not offering to the users control over their usage of network resources. If your application performs network operations, you should provide user settings that allow users to control your app’s data habits, such as how often your app syncs data, whether to perform uploads/downloads only when on Wi-Fi, or whether to use data while roaming.

In order to address this issue we recommend:

  1. The declaration of an intent filter for the ACTION_MANAGE_NETWORK_USAGE action to indicate that your application defines an activity that offers options to control data usage. ACTION_MANAGE_NETWORK_USAGE shows settings for managing the network data usage of a specific application.

  2. See: https://developer.android.com/training/basics/network-ops/managing#implement-preference-activity

Potential Code Location not offering options to the user to control data usage

Within the Manifest one can notice the usage of android.permission.INTERNET but no ACTION_MANAGE_NETWORK_USAGE

https://github.com/mikepenz/MaterialDrawer/blob/ab9afaf96b7c369480ff27f81f8df9b3daf3583b/app/src/main/AndroidManifest.xml#L6

Details

Checklist