5,596,179 Members 33,830 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Data problem

Tip us?
 
Faxx4840
Old
#1  
Faxx4840's Avatar
Senior Member - OP
Thanks Meter 45
Posts: 156
Join Date: Feb 2013
Location: Welkenraedt, BE
Default [Q] Data problem

Hello,

I use this variable for the data connection #NCCONNS#. Before when I put the data off, a text "None" appears to say i'm not connected.

Now when I put my data connection off the "E" or "H" stay and I would like the see the "None" comeback. I'm not connected on wifi or on data.

Thanks for help
NEXUS 5 BLACK 16 GB
Android KitKat 4.4.2
Kernel ElementalX-N5-0.34
Elix-R Rom | V1.03 | 04/08 | Fast | Elegant | Simple |
Nova Launcher Prime | Zooper Widget Pro | Media Utilities |
-----------------------------------------------------------------------------------
CLOUD DROPBOX - NEXUS 5 CLOUD
GALLERY My Zooper - Made_by_Faxx GALLERY

 
kwerdenker
Old
#2  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 1527
Posts: 1,227
Join Date: Apr 2010
Location: Probably the Zooper Forums
Quote:
Originally Posted by Faxx4840 View Post
Hello,

I use this variable for the data connection #NCCONNS#. Before when I put the data off, a text "None" appears to say i'm not connected.

Now when I put my data connection off the "E" or "H" stay and I would like the see the "None" comeback. I'm not connected on wifi or on data.

Thanks for help
One possible solution:
Code:
$#NDATAON#=1?#NCCONNS#:None$
Mobile: LG Nexus 4 | ROM: Paranoid Android 4.0 + Xposed | Kernel: faux Kernel
Tablet: Asus Nexus 7 (2013) | ROM: Paranoid Android 3+ | Kernel: faux Kernel


 
Faxx4840
Old
#3  
Faxx4840's Avatar
Senior Member - OP
Thanks Meter 45
Posts: 156
Join Date: Feb 2013
Location: Welkenraedt, BE
Quote:
Originally Posted by kwerdenker View Post
One possible solution:
Code:
$#NDATAON#=1?#NCCONNS#:None$
The problem is that with #NCCONNS# the "E" stay but when I change the variable for #NDATAON" it shows me 0 !

Before everything works fine I didn't change anything and now no more "None" when data are Off...
NEXUS 5 BLACK 16 GB
Android KitKat 4.4.2
Kernel ElementalX-N5-0.34
Elix-R Rom | V1.03 | 04/08 | Fast | Elegant | Simple |
Nova Launcher Prime | Zooper Widget Pro | Media Utilities |
-----------------------------------------------------------------------------------
CLOUD DROPBOX - NEXUS 5 CLOUD
GALLERY My Zooper - Made_by_Faxx GALLERY

 
kwerdenker
Old
#4  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 1527
Posts: 1,227
Join Date: Apr 2010
Location: Probably the Zooper Forums
Quote:
Originally Posted by Faxx4840 View Post
The problem is that with #NCCONNS# the "E" stay but when I change the variable for #NDATAON" it shows me 0 !

Before everything works fine I didn't change anything and now no more "None" when data are Off...
Use the full string as I posted it. #NDATAON# just tells if data is on or not. It's used as a condition to decide if #NCCONNS# should be displayed (if #NDATAON#=1) or not (if #NDATAON#=0).
Mobile: LG Nexus 4 | ROM: Paranoid Android 4.0 + Xposed | Kernel: faux Kernel
Tablet: Asus Nexus 7 (2013) | ROM: Paranoid Android 3+ | Kernel: faux Kernel


 
Faxx4840
Old
#5  
Faxx4840's Avatar
Senior Member - OP
Thanks Meter 45
Posts: 156
Join Date: Feb 2013
Location: Welkenraedt, BE
Quote:
Originally Posted by kwerdenker View Post
Use the full string as I posted it. #NDATAON# just tells if data is on or not. It's used as a condition to decide if #NCCONNS# should be displayed (if #NDATAON#=1) or not (if #NDATAON#=0).
When I'm on wifi it says 1 its normal ? When I put wifi and data off it says to me 0 that's ok but one thing I don't understand its after if I choose the variable #NCSTATE# it shows me 3 who says "connected" normally this would be also on 0 if everything is off ?
NEXUS 5 BLACK 16 GB
Android KitKat 4.4.2
Kernel ElementalX-N5-0.34
Elix-R Rom | V1.03 | 04/08 | Fast | Elegant | Simple |
Nova Launcher Prime | Zooper Widget Pro | Media Utilities |
-----------------------------------------------------------------------------------
CLOUD DROPBOX - NEXUS 5 CLOUD
GALLERY My Zooper - Made_by_Faxx GALLERY

 
kwerdenker
Old
#6  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 1527
Posts: 1,227
Join Date: Apr 2010
Location: Probably the Zooper Forums
Quote:
Originally Posted by Faxx4840 View Post
When I'm on wifi it says 1 its normal ? When I put wifi and data off it says to me 0 that's ok but one thing I don't understand its after if I choose the variable #NCSTATE# it shows me 3 who says "connected" normally this would be also on 0 if everything is off ?
In that case I misread the documentation for the variable. I thought it meant cellular data but it seems to be for either cellular or wifi. In that case we just have to test for wifi too:
Code:
$#NDATAON#=1 && #NWSTATE#!=2?#NCCONNS#:None$
Mobile: LG Nexus 4 | ROM: Paranoid Android 4.0 + Xposed | Kernel: faux Kernel
Tablet: Asus Nexus 7 (2013) | ROM: Paranoid Android 3+ | Kernel: faux Kernel


The Following User Says Thank You to kwerdenker For This Useful Post: [ Click to Expand ]
 
Faxx4840
Old
#7  
Faxx4840's Avatar
Senior Member - OP
Thanks Meter 45
Posts: 156
Join Date: Feb 2013
Location: Welkenraedt, BE
Quote:
Originally Posted by kwerdenker View Post
In that case I misread the documentation for the variable. I thought it meant cellular data but it seems to be for either cellular or wifi. In that case we just have to test for wifi too:
Code:
$#NDATAON#=1 && #NWSTATE#!=2?#NCCONNS#:None$
I use this $#NDATAON#=1&&#NWSTATE#!=2?#NCCONNS#: $

Awesome now It shows me a E or H when I'm connected and nothing when I'm off for the data ! That's what I'm looking for a while !

Great thanks to you !
NEXUS 5 BLACK 16 GB
Android KitKat 4.4.2
Kernel ElementalX-N5-0.34
Elix-R Rom | V1.03 | 04/08 | Fast | Elegant | Simple |
Nova Launcher Prime | Zooper Widget Pro | Media Utilities |
-----------------------------------------------------------------------------------
CLOUD DROPBOX - NEXUS 5 CLOUD
GALLERY My Zooper - Made_by_Faxx GALLERY

 
kwerdenker
Old
#8  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 1527
Posts: 1,227
Join Date: Apr 2010
Location: Probably the Zooper Forums
Quote:
Originally Posted by Faxx4840 View Post
I use this $#NDATAON#=1&&#NWSTATE#!=2?#NCCONNS#: $

Awesome now It shows me a E or H when I'm connected and nothing when I'm off for the data ! That's what I'm looking for a while !

Great thanks to you !
Ah ok, my understanding of your question was how to get the 'None' back. If you just want to blend out the #NCCONNS# you can leave the ': ' out entirely so the end looks like this ?#NCCONNS#$

Have fun with it
Mobile: LG Nexus 4 | ROM: Paranoid Android 4.0 + Xposed | Kernel: faux Kernel
Tablet: Asus Nexus 7 (2013) | ROM: Paranoid Android 3+ | Kernel: faux Kernel


 
Faxx4840
Old
#9  
Faxx4840's Avatar
Senior Member - OP
Thanks Meter 45
Posts: 156
Join Date: Feb 2013
Location: Welkenraedt, BE
I am also wondering why the #NCONNS# dont show the none or nothing when the data were off.
And unfortunatly u got me what i was looking for for a long time.

Envoyé depuis mon Nexus 5 avec Tapatalk 4
NEXUS 5 BLACK 16 GB
Android KitKat 4.4.2
Kernel ElementalX-N5-0.34
Elix-R Rom | V1.03 | 04/08 | Fast | Elegant | Simple |
Nova Launcher Prime | Zooper Widget Pro | Media Utilities |
-----------------------------------------------------------------------------------
CLOUD DROPBOX - NEXUS 5 CLOUD
GALLERY My Zooper - Made_by_Faxx GALLERY


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Force Translucent Status Bar in KitKat ROMs with Xposed

It’s been a while since Android 4.4KitKat wasreleased, and we’re slowly … more

Fix the Ambient Light Issues on Your Google Nexus 5 using Xposed

The Google Nexus 5 is a great and rather popular device. This LG-produced … more

Google Glass XE16 Update Factory Image and Rooted Bootloader Now Available

You may recall that early yesterday, we talked about the XE16 … more