Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,242 Members 50,790 Now Online
XDA Developers Android and Mobile Development Forum

WIFI/Mobile Data as a percentage?

Tip us?
 
Houndcatcher
Old
#1  
Houndcatcher's Avatar
Senior Member - OP
Thanks Meter 9
Posts: 101
Join Date: Oct 2013
Location: Lancing

 
DONATE TO ME
Default WIFI/Mobile Data as a percentage?

I'm currently using the following to return signal strength

Code:
$#NWIFI#!=?#NWSIG#:#NCSIG#$
Is there a way to edit that code to get the value returned as a percentage please?
Cheers Phil

Samsung S4 i9505
Dual Booting
Paranoid Android 4.2Beta4
Gummy 4.4.2
GT-S7275R Rooted CWM Recovery
 
kwerdenker
Old
(Last edited by kwerdenker; 9th January 2014 at 11:50 AM.)
#2  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 2099
Posts: 1,356
Join Date: Apr 2010
Location: Probably the Zooper Forums

 
DONATE TO ME
Quote:
Originally Posted by Houndcatcher View Post
I'm currently using the following to return signal strength

Code:
$#NWIFI#!=?#NWSIG#:#NCSIG#$
Is there a way to edit that code to get the value returned as a percentage please?
Could you please clarify, what you mean with "percentage"? Percentage of available signal levels? Percentage of signal quality?

Please use the forums for your Zooper related questions. I won't respond to PMs with questions that can/should be asked there. Thank you.
 
Houndcatcher
Old
#3  
Houndcatcher's Avatar
Senior Member - OP
Thanks Meter 9
Posts: 101
Join Date: Oct 2013
Location: Lancing

 
DONATE TO ME
Quote:
Originally Posted by kwerdenker View Post
Could you please clarify, what you mean with "percentage"? Percentage of available signal levels? Percentage of signal quality?
Sorry looking for levels if poss
Cheers Phil

Samsung S4 i9505
Dual Booting
Paranoid Android 4.2Beta4
Gummy 4.4.2
GT-S7275R Rooted CWM Recovery
 
Houndcatcher
Old
#4  
Houndcatcher's Avatar
Senior Member - OP
Thanks Meter 9
Posts: 101
Join Date: Oct 2013
Location: Lancing

 
DONATE TO ME
Not possible then maybe?
Cheers Phil

Samsung S4 i9505
Dual Booting
Paranoid Android 4.2Beta4
Gummy 4.4.2
GT-S7275R Rooted CWM Recovery
 
kwerdenker
Old
#5  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 2099
Posts: 1,356
Join Date: Apr 2010
Location: Probably the Zooper Forums

 
DONATE TO ME
Quote:
Originally Posted by Houndcatcher View Post
Not possible then maybe?
Sorry, this totally slipped my mind

While it's certainly possible to calculate a percentage, I doubt its usefulness. The two variables have a small, not continuous range (#NWSIG# 0-9, #NCSIG# 0-31) which results in rather choppy and larger percentage steps.
If you still want to use it though, here is the modified code
Code:
$#NWSTATE=2?(#NWSIG#/9*100):(#NCSIG#/31*100)$%
(the % has to be outside the $ signs)

Please use the forums for your Zooper related questions. I won't respond to PMs with questions that can/should be asked there. Thank you.
The Following User Says Thank You to kwerdenker For This Useful Post: [ Click to Expand ]
 
Houndcatcher
Old
(Last edited by Houndcatcher; 11th January 2014 at 03:54 PM.)
#6  
Houndcatcher's Avatar
Senior Member - OP
Thanks Meter 9
Posts: 101
Join Date: Oct 2013
Location: Lancing

 
DONATE TO ME
Quote:
Originally Posted by kwerdenker View Post
Sorry, this totally slipped my mind

While it's certainly possible to calculate a percentage, I doubt its usefulness. The two variables have a small, not continuous range (#NWSIG# 0-9, #NCSIG# 0-31) which results in rather choppy and larger percentage steps.
If you still want to use it though, here is the modified code
Code:
$#NWSTATE=2?(#NWSIG#/9*100):(#NCSIG#/31*100)$%
(the % has to be outside the $ signs)
Thanks for that

Seems to half work but my WiFi signal never shows more that around 30% even when it is very strong? Seems like the second part of the code is being used for both WiFi and Cellular?
Cheers Phil

Samsung S4 i9505
Dual Booting
Paranoid Android 4.2Beta4
Gummy 4.4.2
GT-S7275R Rooted CWM Recovery
 
kwerdenker
Old
#7  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 2099
Posts: 1,356
Join Date: Apr 2010
Location: Probably the Zooper Forums

 
DONATE TO ME
I made a typing error when transferring it from my mobile. First part should read #NWSTATE#=2 not #NWSTATE=2.

Send from my secret moonbase via space carrier pigeons

Please use the forums for your Zooper related questions. I won't respond to PMs with questions that can/should be asked there. Thank you.
 
Houndcatcher
Old
#8  
Houndcatcher's Avatar
Senior Member - OP
Thanks Meter 9
Posts: 101
Join Date: Oct 2013
Location: Lancing

 
DONATE TO ME
Quote:
Originally Posted by kwerdenker View Post
I made a typing error when transferring it from my mobile. First part should read #NWSTATE#=2 not #NWSTATE=2.

Send from my secret moonbase via space carrier pigeons
Should've seen that myself!! Thanks again
Cheers Phil

Samsung S4 i9505
Dual Booting
Paranoid Android 4.2Beta4
Gummy 4.4.2
GT-S7275R Rooted CWM Recovery

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


[APK] Google News and Weather Gets Material Design Makeover, Minor Maps Updates

Although Google has somewhat gotten out of the habit of their … more

Software Build Automation with Jenkins – XDA Developer TV

Many members of the XDA community come to learn and begin in the exciting … more

Add Bits and Pieces of Honami to Your Current ROM

In the last few months, we’ve talked about quite a few Sony Honami-related projects. … more

Always Enter the Correct Password with HideNoPasswords

If you’ve ever entered apassword on your mobile device, you’ve surely … more