Show remaining mobile internet plan as notification

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
User avatar
mbirth
Posts: 80
Joined: 17 Mar 2016 00:02
Location: Berlin, Germany
Contact:

Show remaining mobile internet plan as notification

Post by mbirth » 24 Mar 2016 17:16

http://automagic4android.com/flow.php?i ... 890df5f22e (2 flows, uses AutoNotification plugin)

In Germany, there's no unlimited mobile Internet, but we pay for monthly plans (my carrier calls them "DataPass") where we can use a specific amount of data and after that's used up, mobile internet speed falls down to GPRS speed and becomes unusable. And if you're using a PAYG carrier like e.g. Congstar, such internet plan is valid for exactly 30 days, independent of the length of a month. So the internal data counter of Android becomes almost useless unless you correct the day for resetting the counter regularly.

While you are connected to the mobile data network, you can get information about your current status from a special web page. This page also tells you about when the package ends. It looks like this:

Image

I now made a flow which runs every 30 minutes, downloads that page, extracts the important bits of information (using evaluateXPathAsString) and creates a notification (using AutoNotification) which shows your used up amount and the date when the plan expires. A second flow enables or disables the first one depending on whether you're connected to the mobile data network or not.

Image Image

The notification looks like this:

Image

If you're using another carrier who also provides such web page, you can easily adapt the flow (web page URL and Script: Parse XHTML). You can also replace all the AutoNotification calls by a regular Automagic notification or a widget or something else.
BlackBerry KEY2, Android 8.1.0

Zeench
Posts: 14
Joined: 30 Dec 2014 17:22

Re: Show remaining mobile internet plan as notification

Post by Zeench » 03 Jan 2017 17:14

For me it would be cool to just have the android in build data usage as a notification popping up for 10s after turning screen on...
Is that possible?

User avatar
mbirth
Posts: 80
Joined: 17 Mar 2016 00:02
Location: Berlin, Germany
Contact:

Re: Show remaining mobile internet plan as notification

Post by mbirth » 03 Jan 2017 17:49

Zeench wrote:For me it would be cool to just have the android in build data usage as a notification popping up for 10s after turning screen on...
Is that possible?
IIRC you can't get the actual value from the internal counter. You can, however, get "total transferred bytes since last bootup" and have to manually store them when rebooting the phone and such. Also it will probably deviate a bit from the value the internal data usage function shows. But this is a topic on its own.
BlackBerry KEY2, Android 8.1.0

Bascule
Posts: 16
Joined: 11 May 2015 09:44

Re: Show remaining mobile internet plan as notification

Post by Bascule » 07 Mar 2017 14:03

Clever! I don't need it. But I want it :)

Post Reply