Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

new Ping(...) is broken when in Battery Saver mode

Discussion in 'Android' started by Maisey, Aug 24, 2018.

  1. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    300
    I'm pinging Google's 8.8.8.8 with Unity's "Ping" class to detect of the user has Internet connection, but once the user switches to Battery Saver Mode on the device, "Ping.isDone"-flag will never be true (or Ping.time will be -1), and thus, the ping will always timeout indicating that the user has no internet connection (which is not the case).

    This is happening on Google Pixel 2 XL running Android Oreo. But...Is NOT happening on a Pixel 2 running Android P.

    Using Unity 2017.4.2f2. Is this a bug in Unity or Android specific?

    Thanks!
     
  2. Evaldas_Unity

    Evaldas_Unity

    Unity Technologies

    Joined:
    Jun 23, 2016
    Posts:
    69
    Hi Maisey,
    Could you submit a bug report for this (with smallest possible repro project, and some information about on what devices you could reproduce this) and let me know the bug number? : )