GB 3g Workaround

Discussion in 'Android Roms' started by betolley, Jan 15, 2011.

  1. BrianHanifin

    BrianHanifin New Member

    Joined:
    Nov 15, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    It may be possible to Toggle Airplane Mode with Locale.

    Theoritical Requirements:
    1. Scripting Layer For Android (SL4A)
    2. Python (from SL4A site)
    3. Locale Call Status Plug-In
    This code is untested, but I believe the following SL4A code would toggle Airplane mode.

    Code:
    import android
    droid = android.Android()
    code = droid.toggleAirplaneMode()
    time.sleep(10)
    code = droid.toggleAirplaneMode()
    SL4A API Reference: toggleAirplaneMode()
     
  2. johnlgalt

    johnlgalt Member

    Joined:
    Nov 12, 2009
    Messages:
    477
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    3rd rock
    Ratings:
    +0
    That is what I was trying to do. I didn't consider scripting it. I got as far as enabling Airplane mode, but could not figure out how to disable it again.

    That particular plug-in though - I installed it and it only has situations of when a call is in progress sand when one is not in progress - it does not actually look at call beginning or ending.

    There is another plug-in that does, but it costs an extra $2....

    I can give your script a shot tonight and see if it works, but I suspect that it will not because of the limited parameters for call status.
     
  3. BrianHanifin

    BrianHanifin New Member

    Joined:
    Nov 15, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    I bought Locale when it came out, but quickly found it had too many limitations that made it useless. I gave up and start using another app to swap profiles manually (ProfileSettings I believe).

    Do not spend extra money on Locale Plugins to get this working. Seriously, put that $2 towards Tasker, it is worth $6. It does everything Locale does plus most of the things you wish Locale would do (like having multiple profiles active at once). :) BTW, most if not all Locale plugins work on Taker as well.
     
  4. johnlgalt

    johnlgalt Member

    Joined:
    Nov 12, 2009
    Messages:
    477
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    3rd rock
    Ratings:
    +0
    Yeah, seeing that now - I've got the 7 day trial to try to get it all set up but for the longest time I used Locale b/c I needed it primarily for auto silence based upon a combination of location and time.

    Now, I'll probably have a lot more stuff going one with Tasker, so....
     
  5. BrianHanifin

    BrianHanifin New Member

    Joined:
    Nov 15, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    This workaround may no longer be necessary. I am running CyanogenMod nightly build #23 and the data connection now restores itself! :)

    I disabled my Tasker "End Call" profile (airplane mode toggle workaround), called myself, answered the call, then within a couple of seconds of hanging up the call I was able to reload a page that wouldn't load during the call.

    I tried this today because I saw the following update on the CM7 changelog:


     
Search tags for this page

tasker phone idle

,
tasker switch to 3g