1. Download our Official Android App: Forums for Android!

Toggle an app on/off automatically when the screen is off?

Discussion in 'Android Apps & Games' started by Plecto123, May 10, 2016.

  1. Plecto123

    Plecto123 Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    20
    Joined:
    Mar 15, 2016

    Mar 15, 2016
    20
    0
    15
    Male
    Facebook messenger is using loads of battery when I'm outdoors and connected to 4G. I would love for it to just connect for a short time once every 2-3 minutes or so, but how can that be done? Is there an app that can automatically start the messenger app and then terminate it again? Or even better, an app that toggles mobile data on and off while the screen is off and phone asleep?
     

    Advertisement

  2. Thom

    Thom  
    VIP Member
    Rank:
     #22
    Points:
    1,318
    Posts:
    11,964
    Joined:
    Feb 16, 2011

    Feb 16, 2011
    11,964
    4,947
    1,318
    Male
    Software Developer
    Keene, NH USA
    Welcome to Android Forums.

    The ability to toggle data on/off was removed in un-root-ed devices. The reason was security.

    Is your device root-ed?

    ... Thom
     
  3. Dannydet

    Dannydet Android Expert
    Rank:
     #31
    Points:
    818
    Posts:
    3,391
    Joined:
    Jan 16, 2016

    Jan 16, 2016
    3,391
    1,714
    818
    Male
    Graphics Manager / Sales
    USA
    Tasker may help with this.
     
  4. Plecto123

    Plecto123 Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    20
    Joined:
    Mar 15, 2016

    Mar 15, 2016
    20
    0
    15
    Male
    No, it's not. It's possible to have an app start and kill the messenger app though, right? How come the messenger app doesn't have any settings to account for stuff like this, surely I'm not the only one wanting people to be able to reach me on messenger while I'm outside without it using 30% of my batteri? :(
     
  5. steiny180

    steiny180 Android Enthusiast
    Rank:
     #175
    Points:
    78
    Posts:
    425
    Joined:
    Aug 7, 2014

    Aug 7, 2014
    425
    170
    78
    Male
    Have a look at Automateit at the playstore.

    Create rules to toggle the data when screen turns on/off.
     
  6. Thom

    Thom  
    VIP Member
    Rank:
     #22
    Points:
    1,318
    Posts:
    11,964
    Joined:
    Feb 16, 2011

    Feb 16, 2011
    11,964
    4,947
    1,318
    Male
    Software Developer
    Keene, NH USA
    What version of Android are you using.

    You can do it un-root-ed with Tasker on an older version of Android (4.4.4 or earlier I believe).

    ... Thom
     
  7. Plecto123

    Plecto123 Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    20
    Joined:
    Mar 15, 2016

    Mar 15, 2016
    20
    0
    15
    Male
    I have android version 5.1.1. How do I "downdate" it to 4.4.4 and what would be the consequences? Won't I run into problems if I refuse to update android in the future?

    I could make Automateit start an app when the screen turns off, but I can't find an option to have something happen after set time intervals other than a specific time of day. I'm looking into Tasker, seems like it have a lot of options at least :p
     
  8. Thom

    Thom  
    VIP Member
    Rank:
     #22
    Points:
    1,318
    Posts:
    11,964
    Joined:
    Feb 16, 2011

    Feb 16, 2011
    11,964
    4,947
    1,318
    Male
    Software Developer
    Keene, NH USA
    Flashing to an older version of Android ... I have no experience. If you can it will beg you constantly to update. The solution there is to rename the distribution file that is resident on your phone. That requires root.

    Toggling Mobile Data was removed in 5.0 and later versions of the system.

    You could have a Tasker profile that was triggered every x min. That profile could start an app. Accessing the controls in the app requires you to be root-ed.

    ... Thom
     
  9. Plecto123

    Plecto123 Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    20
    Joined:
    Mar 15, 2016

    Mar 15, 2016
    20
    0
    15
    Male
    Alright. I've played around with Tasker for a bit, but I don't think Tasker can completely kill an app without root access? It launches Messenger just fine, but it won't kill it. Guess I'm left with turning mobile data off when I'm not using it :(
     
  10. AZgl1500

    AZgl1500 Android Expert
    Rank:
     #43
    Points:
    618
    Posts:
    6,400
    Joined:
    Feb 3, 2011

    Feb 3, 2011
    6,400
    3,144
    618
    Male
    Retired and loving it.
    Oklahoma grasslands
    if you don't already know how to program Tasker, it is worthless.

    MacroDroid lets you pick from a list of features and covers nearly everything we need to do.

    and MD can terminate an app when the screen closes. that said, I am still on 5.1.1 and have no experience yet with 6.x

    * MacroDroid - Device Automation - Android Apps on Google Play
     
  11. Plecto123

    Plecto123 Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    20
    Joined:
    Mar 15, 2016

    Mar 15, 2016
    20
    0
    15
    Male
    "Root only" MD says when looking at "Kill application" in the list of actions :(
     
  12. chanchan05

    chanchan05 The Doctor
    Rank:
     #26
    Points:
    1,108
    Posts:
    15,131
    Joined:
    Jun 30, 2011

    Jun 30, 2011
    15,131
    4,803
    1,108
    Male
    Won't matter if you kill it because it will start right back up. Honestly that "30%" of battery is very subjective. As I said in your previous thread, it could simply be that high because no other app is using the battery.

    Facebook using 70% of the battery, with the phone draining at 3% per hour because it's the only app running, is way better than Facebook using 5% of the battery but it's draining 15% an hour because of some other app.

    It will be easier to help you if you mention how much you're actually draining per hour.
     
  13. electricpete

    electricpete Android Expert
    Rank:
     #68
    Points:
    393
    Posts:
    2,072
    Joined:
    Jan 7, 2012

    Jan 7, 2012
    2,072
    1,028
    393
    Male
    Electrical Engineer
    Tasker has a kill app function with root. However I have had bad experience with it... after killing an app the app somehow continues to use juice at an increased rate as if it turned into a rogue app. So I don't use kill app in Tasker anymore. But turning data off is an option with root as mentioned.
     

Share This Page

Loading...