[Nexus 4 General] muyoso:
Figured I would post this over as well as in the original Galaxy Nexus $30 a month post:

Here is my setting for Tasker that is working perfectly for me, but for some reason keeps telling me there are errors, even though its working. . . .

Profile: GV Airplane Toggle (6)
State: Wifi Connected [ SSID:* MAC:* IP:* ]
Enter: Anon (7)
A1: HTTP Get [ Server:Port:[url]www.google.com[/url] Path: Attributes: Cookies: Timeout:10 Mime Type: Output File: ]
A2: If [ %HTTPR != -1 ]
A3: Secure Settings [ Configuration:Airplane Mode Radios: Cell Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ]
A4: Variable Set [ Name:%GVAM To:1 Do Maths:eek:ff Append:eek:ff ]
A5: Secure Settings [ Configuration:Airplane Mode Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ]
A6: Else
A7: Wait [ MS:0 Seconds:30 Minutes:0 Hours:0 Days:0 ]
A8: Goto [ Type:Action Number Number:1 Label: ]
A9: End If

Exit: Anon (8)
A1: Secure Settings [ Configuration:Airplane Mode Disabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ]
A2: Variable Clear [ Name:%GVAM Pattern Matching:eek:ff ]

and

Profile: Calls (9)
State: Call [ Type:Any Number:* ]
Enter: Anon (10)
A1: Profile Status [ Name:GV Airplane Toggle Set:eek:ff ] If [ %GVAM ! Set ]

Exit: Anon (11)
A1: Profile Status [ Name:GV Airplane Toggle Set:eek:n ]

The first one essentially works like this. When wifi is connected, it pings Google to see if it actually has a true connection. If it does, then it sets the airplane radio to cell only, turns on airplane mode, and sets the variable %GVAM to 1. This GVAM variable comes into play for the second profile. Now if the wifi is connected, but it cannot ping Google correctly, it waits 30 seconds and then pings Google again. That pretty much covers what the first profile does.

Now what the second profile does is this. It prevents the phone from going into airplane mode when you are on a cellular call, as that would essentially end your call and piss you off. During the first profile, after wifi is connected and it successfully pings Google, it sets %GVAM variable to 1, and if wifi is not connected, or you leave wifi, it clears the variable value. This second profile activates when a call is active, and it looks for that %GVAM variable. If its not set, then it turns off the first profile, effectively stopping the phone from entering airplane mode. If it IS set, then the profile does nothing. As soon as the call is over, this profile turns the first profile back on, so that you can switch over to wifi if you are within range.

This combination has worked for me for months. I am getting some weird popups telling me there are errors, which I never had with the Galaxy Nexus, but it IS working flawlessly for me so far. Posted it so that others a hell of a lot more knowledgeable than me can take a look at it or tweak it to work even better.

Just to further clarify for Nexus 4 owners wondering what the hell this is all about. This Tasker profile is so that you can have Google Voice forwarding to both your cellular number and GChat at both times, yet only receive cellular calls when you are not connected to wifi, and only receive wifi calls when you ARE connected to wifi. So say for example you are signed up with PBXes and have Sipdroid up and working like I do, you will get 2000 minutes when connected to wifi, and 100 minutes when not connected to wifi from Tmobile. I found that this is the best compromise on the Tmobile $30 a month plan, and results in constant very good call quality and seamless automatic transitions from VOIP to cellular calling. Also, it gets you ridiculous battery life since the cell radio is off as long as you are on wifi, with ZERO loss of function for the phone.