Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quota in Smart Data Allocation does not seem to be enforced #240

Open
4 tasks done
lfos opened this issue Apr 27, 2024 · 10 comments
Open
4 tasks done

Quota in Smart Data Allocation does not seem to be enforced #240

lfos opened this issue Apr 27, 2024 · 10 comments

Comments

@lfos
Copy link

lfos commented Apr 27, 2024

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed.
  • I have taken the time to fill in all the required details in an appropriate descriptive way. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.

Affected app version

v2.4.0

Steps to reproduce the bug

  1. Enable Smart Data Allocation with a custom plan. (Other types of plans may or may not trigger the bug too.)
  2. Enable the Daily Quota Alert feature.
  3. Use up data, beyond the daily quota limit.

Expected behavior

An alert is displayed. If I understand the feature correctly, data should also be throttled/limited.

Actual behavior

Neither an alert seems to be triggered, nor does the data get limited, even when going >200% above the displayed quota.

Screenshots/Screen recordings

No response

Logs

No response

Affected Android/Custom ROM version

Android 14

Affected device model

Pixel 7

Additional context

No response

@lfos lfos changed the title Quota in Smart Data Allocation does not seem to be enfored Quota in Smart Data Allocation does not seem to be enforced Apr 27, 2024
@itsdrnoob
Copy link
Owner

So I tested this out and it's working as intended on my end.

photo_2024-04-29 15 38 55

Though I've to test it out on an A14 device to confirm this. Can you make sure Data Monitor has alarm permissions? Also, was the device rebooted during this time?

@lfos
Copy link
Author

lfos commented May 10, 2024

Can you make sure Data Monitor has alarm permissions? Also, was the device rebooted during this time?

Data Monitor notifications are all enabled in app permissions. The device was not rebooted. However, note that I have disabled the Set up notifications setting in the app; should the quota alert still appear? (I would like to disable sticky notification with current data usage.)

Can you also clarify whether reaching the quota should automatically disable/block mobile data to prevent further data consumption?

Thanks for all the work put into this feature; would love to see a few corner cases fixed here, as Smart Data Allocation is one of the main reasons I'd like to use the app, even if beta!

@itsdrnoob
Copy link
Owner

Data Monitor notifications are all enabled in app permissions. The device was not rebooted.

Is the app excluded from battery optimisation settings? If not this could cause Alarms & Reminders permission to be automatically denied to the app. You can check this in Apps > Special App Access > Alarms & Reminders. Note that if battery optimisation is disabled for Data Monitor, it won't show up in the list.

I've made changes to handle this behaviour in 704eee4 and 67ae965

Can you also clarify whether reaching the quota should automatically disable/block mobile data to prevent further data consumption?

Right now, no, mobile data won't be turned off when the quota is reached; instead, an alert is shown to notify of this.

Thanks for all the work put into this feature; would love to see a few corner cases fixed here, as Smart Data Allocation is one of the main reasons I'd like to use the app, even if beta!

Thanks :)

@lfos
Copy link
Author

lfos commented May 12, 2024

Is the app excluded from battery optimisation settings? If not this could cause Alarms & Reminders permission to be automatically denied to the app. You can check this in Apps > Special App Access > Alarms & Reminders. Note that if battery optimisation is disabled for Data Monitor, it won't show up in the list.

Thanks! Data Monitor does not show up in that list indeed. How can it be added/enabled?

Can you also clarify whether reaching the quota should automatically disable/block mobile data to prevent further data consumption?

Right now, no, mobile data won't be turned off when the quota is reached; instead, an alert is shown to notify of this.

Thanks for the clarification. Is the plan to add this, eventually? With that, I am also a bit unclear on what the different configuation toggles for Smart Data Allocation do. What happens if I enable Smart Data Allocation but leave daily quota alerts disabled?

@itsdrnoob
Copy link
Owner

Data Monitor does not show up in that list indeed. How can it be added/enabled?

If Data Monitor is not in the list, then battery optimisation must be disabled for the app which automatically grants the Alarms & Reminders permission.

Is the plan to add this, eventually?

I'm not planning on adding this to Daily quota alert itself but maybe I can look into adding an additional toggle to automatically turn mobile data off when data limit is reached.

What happens if I enable Smart Data Allocation but leave daily quota alerts disabled?

Smart Data Allocation divides and allocates the data plan into daily quotas and enables the data rollover feature. Daily quota alert is responsible for showing an alert when a day's data quota has been exhausted.

@lfos
Copy link
Author

lfos commented May 13, 2024

Data Monitor does not show up in that list indeed. How can it be added/enabled?

If Data Monitor is not in the list, then battery optimisation must be disabled for the app which automatically grants the Alarms & Reminders permission.

I believe I had battery optimization disabled but I must admit I don't fully understand how battery optimization settings work. When I disable battery background usage for Data Monitor, the app now shows up in the Alarms & Reminders list but when opening the app, I get the expected warning that Data Monitor can't work with battery optimization disabled. When I enable battery background usage again, Data Monitor disappears from the Alarms & Reminders` list again.

Is the plan to add this, eventually?

I'm not planning on adding this to Daily quota alert itself but maybe I can look into adding an additional toggle to automatically turn mobile data off when data limit is reached.

That sounds awesome!

What happens if I enable Smart Data Allocation but leave daily quota alerts disabled?

Smart Data Allocation divides and allocates the data plan into daily quotas and enables the data rollover feature. Daily quota alert is responsible for showing an alert when a day's data quota has been exhausted.

Right, but what exactly does "divides and allocates the data plan into daily quotas and enables the data rollover feature" mean if the quota doesn't trigger alerts and doesn't limit data? Just that the numbers are computed and displayed when the app is opened; without having any real effect? (If true, that is quite surprising behavior from a UX perspective: When I hear that "my data is allocated with daily quota", I implicitly assume the quota is also applied, and data is limited accordingly. There might be an opportunity to improve either functionality or documentation here.)

Thanks again!

@itsdrnoob
Copy link
Owner

When I disable battery background usage for Data Monitor, the app now shows up in the Alarms & Reminders list but when opening the app, I get the expected warning that Data Monitor can't work with battery optimization disabled. When I enable battery background usage again, Data Monitor disappears from the Alarms & Reminders` list again.

This is the intended behaviour in Android 14. When battery optimisation is disabled for an app, it's by default granted the Alarms & Reminders permission and is not shown in the list. On the other hand, when enabled, the app has restrictions on background operations including the Alarms & Reminders permission, which can now be granted or denied.

Right, but what exactly does "divides and allocates the data plan into daily quotas and enables the data rollover feature" mean if the quota doesn't trigger alerts and doesn't limit data?

There are certain data plans with a daily limit, but if that limit is not reached, the remaining data is carried over to the next day's limit, hence the rollover feature. A separate toggle for alert helps the user decide whether or not to receive an alert in such a situation.

@lfos
Copy link
Author

lfos commented May 30, 2024

When I disable battery background usage for Data Monitor, the app now shows up in the Alarms & Reminders list but when opening the app, I get the expected warning that Data Monitor can't work with battery optimization disabled. When I enable battery background usage again, Data Monitor disappears from the Alarms & Reminders` list again.

This is the intended behaviour in Android 14. When battery optimisation is disabled for an app, it's by default granted the Alarms & Reminders permission and is not shown in the list. On the other hand, when enabled, the app has restrictions on background operations including the Alarms & Reminders permission, which can now be granted or denied.

Thanks for the explanation. Any other ideas as to why the notifications are not showing? (If I understand correctly, my permission settings look correct.)

Right, but what exactly does "divides and allocates the data plan into daily quotas and enables the data rollover feature" mean if the quota doesn't trigger alerts and doesn't limit data?

There are certain data plans with a daily limit, but if that limit is not reached, the remaining data is carried over to the next day's limit, hence the rollover feature. A separate toggle for alert helps the user decide whether or not to receive an alert in such a situation.

Gotcha. I think it'd be good to explain/document the current state better. When I read "allocate plan into quotas", I am implicitly assuming the quota are effective, i.e., data is limited once it reaches the given amount.

@itsdrnoob
Copy link
Owner

Any other ideas as to why the notifications are not showing?

Still need to figure that out. Does this happen every time? Also, do other notifications, such as custom plan expiry or renewal, show up correctly?

@lfos
Copy link
Author

lfos commented Aug 21, 2024

Any other ideas as to why the notifications are not showing?

Still need to figure that out. Does this happen every time? Also, do other notifications, such as custom plan expiry or renewal, show up correctly?

I just tested; custom plan expiry seem to be triggered correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants