Occasionally there will be a popup saying the phone is putting apps that haven’t been used in a while to sleep to save battery. Why doesn’t it just do this all the time? Why does an app need to be “awake” if I am not using it?

  • LastYearsIrritant@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 hours ago

    Waking up an app costs processing power and time. If it’s an app you open regularly, like messaging, or a social app, then putting it to sleep and waking it up makes for an annoying user experience, and also wasted battery.

  • ea6927d8@lemmy.ml
    link
    fedilink
    arrow-up
    27
    ·
    17 hours ago

    Battery saving mode can accomplish that, if you will.

    Some apps, however, need to stay “awake” to catch notifications or do some background processing needed for their usual functionality.

    Imagine if you were using a navigation app, put it in the background, and after some time, put it on the foreground and it had to start the whole process of locating you and calculating a route to where you were going.

    That being said, most apps don’t really need to do anything in the background, except for collecting data about your behaviour.

  • Ledivin@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    17 hours ago

    Usually connectivity reasons. If an app is asleep, it can’t receive or send notifications, so there would be absolutely no “background” tasks or receiving messages, etc.

    Some of that is for data theft reasons, like someone else stated, but definitely not all.

  • Em Adespoton@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    17 hours ago

    The real answer is: because the OS lets the app decide whether or not to run in the background. And those “free” development frameworks cheap app developers use monetize via background data collection, so make sure the “run in background” flag is set at compile time. So you get flashlight apps that require your location, microphone and background functionality.

  • Yaky@slrpnk.net
    link
    fedilink
    arrow-up
    2
    ·
    15 hours ago

    Some general examples: Any active navigation keeping track of your location if you switch apps. Pebble monitoring notifications to be sent to a smartwatch. Email or chat client periodically checking for messages.

    There is a Developer Setting in Android to instantly kill off-screen apps, but that would make multitasking a hassle.

    On that note, what I have witnessed is the opposite, phone OS being overly eager to put apps in sleep / idle mode, to the point of ignoring user settings of “do not optimize battery” and “allow background processing”. Many (most “normal”) apps handle notifications through Google, but many FOSS and independent apps need to run in the background to check for messages, updates, etc.

  • StinkyFingerItchyBum@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    4
    ·
    edit-2
    16 hours ago

    Why does an app need to be “awake” if I am not using it?

    Because you aren’t the user. You are the product. An awake app collects more of your data, even when not in use.