Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


wintersm

87 posts

Master Geek
+1 received by user: 4

Trusted

#75435 18-Jan-2011 09:31
Send private message

I have created a widget that will show your 2-degrees pre-pay balance on an android phone.

It will update after a phone call or when you click update..


Give it a go..



You can download it from the Android Market - Now called NZ Phone Balance Widget

https://market.android.com/details?id=nz.org.winters.android.nzmobileaccountwidget

I need some feedback, more features will come soon - eg update intervals, only work on a 2degrees connected mobile e.t.c.





Phone: Google Nexus 1 , stock Gingerbread 2.3.4 Self Rooted.

View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2 | 3 | 4 | 5 | 6 | ... | 8
NonprayingMantis
6434 posts

Uber Geek
+1 received by user: 1528


  #428330 18-Jan-2011 09:41
Send private message

How does it get the balance? Does it send an SMS or use the data connection?



bazzer
3438 posts

Uber Geek
+1 received by user: 267

Trusted

  #428331 18-Jan-2011 09:43
Send private message

I don't need to know my balance continuously in real time, so I just added a shortcut that direct dials *100*1#. Other info that gives me is the expiry date, so maybe you'd want to add that?

wintersm

87 posts

Master Geek
+1 received by user: 4

Trusted

  #428332 18-Jan-2011 09:43
Send private message

To get the data, it uses a data connection and parses the 2degrees web site pages, does a login and gets the details from the first page..

I put in an option to only update when connected to wifi as the 2degress pages are enormous at 300k each and it loads 2 or 3 of those..

:)

 




Phone: Google Nexus 1 , stock Gingerbread 2.3.4 Self Rooted.



wintersm

87 posts

Master Geek
+1 received by user: 4

Trusted

  #428333 18-Jan-2011 09:45
Send private message

bazzer: I don't need to know my balance continuously in real time, so I just added a shortcut that direct dials *100*1#. Other info that gives me is the expiry date, so maybe you'd want to add that?


Expiry date is in the screen you get when you click on the widget..


 




Phone: Google Nexus 1 , stock Gingerbread 2.3.4 Self Rooted.

killerteddy
50 posts

Geek
+1 received by user: 1


  #428338 18-Jan-2011 09:59
Send private message

Nice app!
Maybe it can show data balance as well?

wanghou168
453 posts

Ultimate Geek
+1 received by user: 10


  #428344 18-Jan-2011 10:11
Send private message

Thanks for the app
works quite well

Another info about showing txt or data addons?




MOBILE: Huawei P30
OTHER: Thinkpad E14 + Asus Vivobook + Intel NUC5i3 + A family of Raspberry Pi x 9 + Amazon Echo


 
 
 

Shop now at Mighty Ape (affiliate link).
lokhor
2858 posts

Uber Geek
+1 received by user: 171

Trusted

  #428371 18-Jan-2011 11:30
Send private message

Works well however I'm sure you don't need to use data to retrieve this information. You could use the USSD Code *100*1# and then you would not need data. Also showing how much data usage is left would be nice.




All comments are my own opinion, and not that of my employer unless explicitly stated.


wintersm

87 posts

Master Geek
+1 received by user: 4

Trusted

  #428379 18-Jan-2011 11:50
Send private message

Ok, got out of a meeting, seeing some more comments good.. I will try to answer..

Data & text packs, I dont buy them, I need to know if they show up in the screen when you press on the widget, if so, its easy to add it to the front screen if I know how it is displayed, or I need a snippet of the html from the 2 degrees page that shows those balances.


USSD- I did look into that, was my first thought, but the android sdk is missing (maybe on purpose) the ability to retrieve UTMS data after the call is made. 

:)





Phone: Google Nexus 1 , stock Gingerbread 2.3.4 Self Rooted.

timmyh
188 posts

Master Geek
+1 received by user: 48

Trusted

  #428400 18-Jan-2011 12:42
Send private message

Yes I am getting data pack result:

"
PrePay Credit      xx.xx
(expiring on 31 December 2011)

Your 'top up ang get' special rates
(expiring on)

National Data         20.77
(20.77MB expiring on 09 February 2011)
"

cool!

timmyh
188 posts

Master Geek
+1 received by user: 48

Trusted

  #428403 18-Jan-2011 12:46
Send private message

Just added a 50MB data pack and noticed a wee bug:


"
PrePay Credit      xx.xx
(expiring on 31 December 2011)

Your 'top up and get' special rates
(expiring on)

National Data         70.77
(20.77MB expiring on 09 February 2011)
"

The 20.77 underneath didn't update to match the 70.77. Not sure if this is your side of 2deg side.

wintersm

87 posts

Master Geek
+1 received by user: 4

Trusted

  #428404 18-Jan-2011 12:46
Send private message


"National Data         20.77
(20.77MB expiring on 09 February 2011)"

Thanks - need this

I will have a look tonight at putting the data onto the main window where text is, if there is both, I should be able to fit them on..

 




Phone: Google Nexus 1 , stock Gingerbread 2.3.4 Self Rooted.

 
 
 

Shop now on AliExpress (affiliate link).
timmyh
188 posts

Master Geek
+1 received by user: 48

Trusted

  #428406 18-Jan-2011 12:50
Send private message

The 20.77 underneath didn't update to match the 70.77. Not sure if this is your side of 2deg side.


It's a 2deg bug, not yours ;-)

tombrownzz
147 posts

Master Geek
Inactive user


  #428408 18-Jan-2011 13:02
Send private message

wintersm: To get the data, it uses a data connection and parses the 2degrees web site pages, does a login and gets the details from the first page..

I put in an option to only update when connected to wifi as the 2degress pages are enormous at 300k each and it loads 2 or 3 of those..

:)

 


You mean 2degrees homepage is 300kilobytes big? 

wintersm

87 posts

Master Geek
+1 received by user: 4

Trusted

  #428412 18-Jan-2011 13:05
Send private message

yup the login page & the first page you see after logging in are just over 300k each , and thats just the html without the images, so I have to load the login page to get a session ID, login which loads another page which has data, then send a logout which is probably loading another 300k (I need to look into that and see if i can make sure it is not)..

It seems like alot for the pages, bit of an overkill.. not mobile friendly at all..

Edit - my brain was playing tricks, 110k for the login page, so maybe i was thinking that the app is downloading around 300k each refresh.. 




Phone: Google Nexus 1 , stock Gingerbread 2.3.4 Self Rooted.

vita
68 posts

Master Geek


  #428414 18-Jan-2011 13:06
Send private message

The 2Degrees site displays this as the app displays it.
If you have 2 x data packs of the same type - the one with the closet expiry is shown with the amount.
The site would need to list each individual pack with its own balance and expiry for this to change.

Perhaps you should PM the 2D rep and see if there are any options of developing this app with them :) 

 1 | 2 | 3 | 4 | 5 | 6 | ... | 8
View this topic in a long page with up to 500 replies per page Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.