How to display Available Time/SMS/Data for CellC (Tasker+Minimailstic Text) PART 1

blyzz

Active Member
Joined
Oct 25, 2012
Messages
37
Reaction score
0
Hi there everyone,

This is my first post on this forum. I use a Samsung Galaxy S4 running Cyanogenmod 11 nightly.

I've had to break this down into 2 posts as there is a 10,000 character limit and this post runs around 16,000.

What you need:
  • Phone running Android (Root NOT required)
  • Be using the CellC network.
  • Tasker - About R33 or so ($2.99)
  • Minimalistic Text (I refer to it as MT from hereon out) - FREE but if you like it, you can use the "Donate version" which is about R22 ($2.05). Totally worth it!

What you'll end up with:
A 1x1 widget that displays the following information:
  • Available Talk-time in Hours:Minutes:Seconds
  • Remaining SMS/MMS
  • Remaining Data
  • Your Usage in Rands this cycle
  • Expected payment date

Additionally, when you double-tap on the widget, it'll get the latest details and update the widget.

Ok, before we start, the very first thing you need to do is add a new contact to your phone book. The number will be +27840001341 and the contact name should be "CellCAccountBalance".

DISCLAIMER!:
I'm pretty certain that this SMS is free, but I haven't tested it on your phone. Nor have I contacted CellC to verify that it is free. Maybe that should be the first thing you do. Give them a shout and ask if there are any costs involved.


Whenever I say Enter "this text" somewhere, do NOT enter the quote marks as well, unless I say so (I won't).
Ok, lets get started!

In Tasker, lets go ahead and click on Tasks to set up the 2 tasks that we'll need:
1: Tap on the + at the bottom of the screen.
2: Enter the name "Send SMS to get balance" - Don't worry, these SMSs are free.
3: Tap on the check mark to open the new empty task.
4: In the new empty task tap on the + to add an action.
5: Tap on "Phone".
6: Tap on "Send SMS"
7: Under Recipient(s) enter "14302"
8: Under Message enter "Balance"
9: Tap on the Tasker icon in the top left of the screen to go back to the task.
9: Tap on the Tasker icon AGAIN in the top left of the screen to go back to the task list.

// Running that task as is will send an SMS, and the reply SMS will have the details in it. You can stop here if you want, but I reckon keep going, it's totally worth it

10: Tap on the + at the bottom of the screen to add another action.
11: Let's call this one "Read SMS"
12: Tap on the check mark to open the new empty task.
13: In the new empty task tap on the + to add an action.
14: Tap on "Variables"
15: Tap on "Variable Search Replace" (You might only see "Variable Search...")
16: Under Variable enter "%SMSRB"
17: This is the painful one. Under Search, enter the following line exactly as it is case sensitivity is VERY important:
(\d\d:\d\d:\d\d)|(\d+(?=\.D))\d*+|(\d\d/\d\d/\d{4})|(\d+\.\d{2})
18: Under Store Matches In, enter "%cellusage"
19: Tap on the Tasker icon in the top left of the screen to go back to the task.

// We'll be repeating the next few steps a few (6) times entering slightly different information
// 1
20: Tap on the + to add an action.
21: Tap on "Plugin"
22: Tap on "Minimalistic Text"
23: Next to Configuration, click on the Pencil icon to edit it.
24: Next to Variable name, enter "%timeleft"
25: Next to Variable content, enter "%cellusage(1)"
26: You may have to close your keyboard to tap on "OK"
27: Tap on the Tasker icon in the top left of the screen to go back to the task.
// 2 - I'll only colour the differences in the rest
28: Tap on the + to add an action.
29: Tap on "Plugin"
30: Tap on "Minimalistic Text"
31: Next to Configuration, click on the Pencil icon to edit it.
32: Next to Variable name, enter "%smsleft"
33: Next to Variable content, enter "%cellusage(2)"
34: Tap on "OK"
35: Tap on the Tasker icon in the top left of the screen to go back to the task.
// 3
36: Tap on the + to add an action.
37: Tap on "Plugin"
38: Tap on "Minimalistic Text"
39: Next to Configuration, click on the Pencil icon to edit it.
40: Next to Variable name, enter "%mbleft"
41: Next to Variable content, enter "%cellusage(3)"
42: Tap on "OK"
43: Tap on the Tasker icon in the top left of the screen to go back to the task.
// 4
44: Tap on the + to add an action.
45: Tap on "Plugin"
46: Tap on "Minimalistic Text"
47: Next to Configuration, click on the Pencil icon to edit it.
48: Next to Variable name, enter "%callcost"
49: Next to Variable content, enter "%cellusage(4)"
50: Tap on "OK"
51: Tap on the Tasker icon in the top left of the screen to go back to the task.
// 5
52: Tap on the + to add an action.
53: Tap on "Plugin"
54: Tap on "Minimalistic Text"
55: Next to Configuration, click on the Pencil icon to edit it.
56: Next to Variable name, enter "%nextbill"
57: Next to Variable content, enter "%cellusage(5)"
58: Tap on "OK"
59: Tap on the Tasker icon in the top left of the screen to go back to the task.
// 6
60: Tap on the + to add an action.
61: Tap on "Plugin"
62: Tap on "Minimalistic Text"
63: Next to Configuration, click on the Pencil icon to edit it.
64: Next to Variable name, enter "%duedate"
65: Next to Variable content, enter "%cellusage(6)"
66: Tap on "OK"
67: Tap on the Tasker icon in the top left of the screen to go back to the task.
68: Tap on the Tasker icon in the top left of the screen to go back to the tasks list.
// Phew!

69: Tap on Profiles near the top of the screen
70: Tap on the "+"
71: Tap on "Event"
72: Tap on "Phone"
73: Tap on "Received Text"
74: Under Type, change "Any" to "SMS"
75: Next to Sender, click on the Search magnifying glass
76: Tap on "A Single Contact"
77: Scroll down to find that contact that we created before we started "CellCAccountBalance" and tap on it.
78: Tap on the Tasker icon in the top left of the screen to go back to the profiles list, A list of Tasks you have created will pop up.
79: Tap on the "Read SMS" task.

Ok, we're all done with Tasker and Part 1. Part 2 (Below) deals with the MT widget that will display the information that you get from the SMS from CellC.
 
Last edited:
How to display Available Time/SMS/Data for CellC (Tasker+Minimailstic Text) PART 2

This is PART 2! If you have not yet done so, please complete PART 1 above before doing the below!

Ok, Welcome back! Here we go, lets jump back in straight from where we left off.

80: Now different phones differ here. For most of the newer ones, you long-press on the screen to add a widget and then drag the widget you want onto the desktop. If you use a different method then do it that way. The widget we're looking for is the "Minimalistic Text (1x1)".

// Once the widget is placed it will automatically open up the MT settings.

81: At the top where is says "Background", scroll to the right until you find "Layout"
82: Tap on "Layout"
83: Lets go ahead and remove the existing item there by tapping on the 3 vertically aligned dots on the right and select "Delete Now"

// OK, we're going to be repeating ourselves again, you know the drill.
// 1
84: On the bottom left, tap on the fat "+".
85: At the top (where it says Battery, Date, etc...) scroll to the right to find "Misc" and tap on it.
86: Tap on the little square next to "Static Text" (It'll automatically put 2 checks in the boxes).
87: Tap on the little square next to "Locale Variable" (It'll automatically put 2 checks in the boxes).
88: Tap on "OK"
89: Now tap on the button that reads "Static text"
90: In the popup next to "Static text" enter "Time:"
91: Tap on "OK"
92: Now tap on the button that reads "Locale Variable"
93: In the popup next to "Variable name" enter "%timeleft"
94: Change the "Style" to "Accented"
95: Tap on "OK"
// 2 - only changes are coloured for you
96: On the bottom left, tap on the fat "+".
97: At the top scroll to the right to find "Misc" and tap on it.
98: Tap on the little square next to "Static Text"
99: Tap on the little square next to "Locale Variable"
100: Tap on "OK"
101: Now tap on the button that reads "Static text"
102: In the popup next to "Static text" enter "SMS:"
103: Tap on "OK"
104: Now tap on the button that reads "Locale Variable"
105: In the popup next to "Variable name" enter "%smsleft"
106: Change the "Style" to "Accented"
107: Tap on "OK"
// 3
108: On the bottom left, tap on the fat "+".
109: At the top scroll to the right to find "Misc" and tap on it.
110: Tap on the little square next to "Static Text"
111: Tap on the little square next to "Locale Variable"
112: Tap on "OK"
113: Now tap on the button that reads "Static text"
114: In the popup next to "Static text" enter "Data:"
115: Tap on "OK"
116: Now tap on the button that reads "Locale Variable"
117: In the popup next to "Variable name" enter "%mbleft"
118: Change the "Style" to "Accented"
119: Tap on "OK"
// 4
120: On the bottom left, tap on the fat "+".
121: At the top scroll to the right to find "Misc" and tap on it.
122: Tap on the little square next to "Static Text"
123: Tap on the little square next to "Locale Variable"
124: Tap on "OK"
125: Now tap on the button that reads "Static text"
126: In the popup next to "Static text" enter "Charge:"
127: Tap on "OK"
128: Now tap on the button that reads "Locale Variable"
129: In the popup next to "Variable name" enter "%callcost"
130: Change the "Style" to "Accented"
131: Tap on "OK"
// 5
132: On the bottom left, tap on the fat "+".
133: At the top scroll to the right to find "Misc" and tap on it.
134: Tap on the little square next to "Static Text"
135: Tap on the little square next to "Locale Variable"
136: Tap on "OK"
137: Now tap on the button that reads "Static text"
138: In the popup next to "Static text" enter "Bill:"
139: Tap on "OK"
140: Now tap on the button that reads "Locale Variable"
141: In the popup next to "Variable name" enter "%nextbill"
142: Change the "Style" to "Accented"
143: Tap on "OK"
// 6 - Slightly different here - we're not adding a Static Text
144: On the bottom left, tap on the fat "+".
145: At the top scroll to the right to find "Misc" and tap on it.
146: Tap on the little square next to "Locale Variable".
147: Tap on "OK"
148: Now tap on the button that reads "Locale Variable"
149: In the popup next to "Variable name" enter "%duedate"
150: Change the "Style" to "Accented"
151: Tap on "OK"

// As it is now, it will work, but not work as well as it should! not much more to do now.

152: At the top (where it says Battery, Date, etc...) scroll to the right to find "Double-Tap Behaviour" and tap on it.
153: Make sure that the 1st option ("Disable special action on Double-Tap") is NOT checked.
154: Tap on "Start Another Activity".
155: Tap on "Select an activity or a shortcut"
156: At the top of the list that pops up, tap on "Shortcuts"
157: Scroll down to Tasker and tap on it.
158: Tap on the area below Tasker that has now opened up.
159: Tap on "Send SMS to get Balance"
160: It will open up the task in tasker. Tap on the icon in the bottom right
161: Tap on "Built-In Icon"
162: Select any icon from the list (I picked the one that looks like a little letter on it's corner).
163: Tap back on your phone
164: Tap back on your phone again and tap on "Yes"

And that's it! WELL DONE!

Now go find the widget you created, and double-tap on it. It might (depending on what version of Android you're running) warn you that Tasker would like to send an SMS that might cost you money. You can check the little box and the click on "Send". This is a free service offered by CellC, so it won't cost you anything - not even an SMS.

Now wait a few moments while CellC sends you a response SMS that will populate the fields in the MT widget.

You can also spend a bit of time in MT customizing the way the widget looks by changing the text colours and by changing font sizes etc.

If you like that nice little blue colour that MT uses in their "Accented" style, and want to match it... the HEX code for it is "FF7DB5CF".

Wait! What was that? you wanted some extra functionality? OK!

165: In Tasker, go to Profiles, and tap that "+" at the bottom.
166: Tap on "Time"
167: Change both times to 09:00 and make sure that "Repeat" is unchecked.
168: Tap on the Tasker icon in the top left of the screen to go back to the profiles list, A list of Tasks you have created will pop up.
169: Tap on "Send SMS...t Balance" (It'll have the little icon that you selected earlier next to it.)
// Excelent, now each morning, your widget will be updated.

More? You want MORE? Come on! give me a break... ok... just one more for now.
170: Go on, tap that "+" at the bottom again.
171: This time, tap on "Event"
172: Then tap on "Phone"
173: Then tap on "Phone Idle"
174: Yeah, it's a blank screen. Go ahead and tap on the Tasker icon in the top left of the screen to go back to the profiles list, A list of Tasks you have created will pop up.
175: Tap on the Tasker icon in the top left of the screen to go back to the profiles list, A list of Tasks you have created will pop up.
176: Tap on "Send SMS...t Balance" (It'll have the little icon that you selected earlier next to it.)
// Now, each time you end a call, the widget will be updated as well.

That's it I'm done.

If you find any errors in this walk-through, please let me know, I'll patch it right up. Also PLEASE let me know if you liked it and if you followed my instructions. Let me know what you think of your new widget!
 
Last edited:
Why didn't you post this as a reply in your other thread?
 
I'm sure it will help the cell c people. Well done on creating this.
 
Well done Blyz. So handy that even though I have no idea what it is I read it ! :thumbup:
 
Why didn't you post this as a reply in your other thread?

To be honest, I only thought about that afterwards. Oops. I typed up the whole thing in one go, and then it wouldn't let me post, because it was 17,000 characters or something, So I chopped the MT part off and put it in another tab and posted them a few seconds apart.
 
Last edited:
One for MTN please?

I've looked into the matter briefly and what I found was that MTN doesn't have the option to check your balance via SMS (the very core of how this works). They only have USSD code (CellC also has this), but you can't use Tasker to intercept and dissect the USSD code.

I haven't looked into what Vodacom do, or if they provide the balance via SMS, but even if they do, I'm not with them, so I'd have no way of testing it.
 
Notification of cool Balance widget for CellC on Android

Hey everyone,

I thought I'd just let you know that I've put up a step-for-step instruction on how to create a blanace reporting widget for Android devices using Tasker and Minimalistic Text. I've posted it on the Android board, but as it relates to CellC specifically, I thought I'd link to it from here.

Part 1
Part 2

Enjoy!
 
I haven't looked into what Vodacom do, or if they provide the balance via SMS, but even if they do, I'm not with them, so I'd have no way of testing it.

Vodacom also have a widget for this
 
My Widget:
14680348791_aa590322e3_o.png

any way to get this image to display on here instead of showing the link?
 
Last edited:
Oh, I've also set up a VERY dirty way of destroying the new-sms notification.

This needs root though.

I basically detect the SMS, make sure that it's from the CellC number, open Messaging, wait 300ms, then kill messaging (that's the bit that needs root).

Opening messaging lets the system know that the notification isn't needed anymore and so kills the notification from the notification bar.

Like I said in the beginning - it's dirty, but it works.
 
This is really complex, I'm on cell c prepaid so I just use tasker to dial the ussd every morning so I know at the beg of the day, I do the same for my wife on a Telkom mobile contract
 
Top
Sign up to the MyBroadband newsletter
X