[KB] Android 8 and ACR loading and cloud upload notifications

Issue #1623 resolved
Anonymous created an issue

hi, my telephone is sony xz premium, operator system is android 8.0, I install acr and update to license version, but when incoming call on phone sleeping, the acr will loading, the top tray acr icon not display, but drag the top tray to screen, the acr icon is gray and click it, it display loading, please help me. thanks

Official response

  • copluk repo owner

    When you enable cloud uploads ACR schedules a job to scan for failed or missed uploads. This job runs every 20 minutes in the background.

    However, if you have Android 8 you would also see a notification. This due to changes on Android 8 and cannot be prevented. Google has decided that all apps doing background operations must show a notification or finish the process in 5 seconds. Since ACR cannot finish the process in 5 seconds it show notification.

    On top of that, you would also see ACR loading notifications on Android 8 plus because ACR needs to be started on boot or after it is closed by the system. We had to add intermediate notification to workaround Android 8 limitations related to background operations

Comments (12)

  1. copluk repo owner

    When you enable cloud uploads ACR schedules a job to scan for failed or missed uploads. This job runs every 20 minutes in the background.

    However, if you have Android 8 you would also see a notification. This due to changes on Android 8 and cannot be prevented. Google has decided that all apps doing background operations must show a notification or finish the process in 5 seconds. Since ACR cannot finish the process in 5 seconds it show notification.

    On top of that, you would also see ACR loading notifications on Android 8 plus because ACR needs to be started on boot or after it is closed by the system. We had to add intermediate notification to workaround Android 8 limitations related to background operations

  2. David Alleyn

    I understand that this is the way that Android Oreo+ is, but maybe this could be enhanced so that the background operation occurs in a configurable manner?

    • Toggle allowing the background operation to occur when the screen is off (or some equivalent)?
    • Make the background operation interval configurable: 20 to 360 minutes?

    A toggle could allow the background operation to still occur but the actual meat of the operation can be skipped thus it will certainly finish in under 5 seconds.

    I am not sure if there is some other alternative to this proposed modification.

  3. copluk repo owner

    Hi,

    Toggle allowing the background operation to occur when the screen is off (or some equivalent)?

    That is not really ideal. You can detect when the screen is off however, it would require some sort of database to compare with previous runs to not to spam the cloud service. Otherwise you would scanning uploads whenever screen is off

    Make the background operation interval configurable: 20 to 360 minutes?

    Is much more ideal and easy to implement. I'll wait for user feedback before going ahead with this. Android 8 is still not on many devices

  4. David Alleyn

    Ok great!

    To expand further on "Toggle allowing the background operation to occur when the screen is off (or some equivalent)?":

    • When the background operation happens (every X (20+) minutes)
    • Check the user's preference for allowing screen-off cloud operations.
      • If screen-off background cloud operations are allowed, proceed as normal
      • Otherwise post-pone the check until the next interval.

    This actually reduces the impact on cloud services providers.

  5. Log in to comment