Page 1 of 1

Show remaining mobile internet plan as notification

Posted: 24 Mar 2016 17:16
by mbirth
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.

Re: Show remaining mobile internet plan as notification

Posted: 03 Jan 2017 17:14
by Zeench
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?

Re: Show remaining mobile internet plan as notification

Posted: 03 Jan 2017 17:49
by mbirth
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.

Re: Show remaining mobile internet plan as notification

Posted: 07 Mar 2017 14:03
by Bascule
Clever! I don't need it. But I want it :)