Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Internet Reachability Verifier - Support Thread

Discussion in 'Assets and Asset Store' started by tonic, Jun 19, 2014.

  1. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    NEW in v1.2.0: :D
    WebGL and Facebook platform support.
    • Support for Android 9 security config, where cleartext http traffic is disabled by default (similar to iOS ATS).
    • Compatibility verified up to Unity 2018.3.
    New detection methods: Google204HTTPS, UbuntuHTTPS, MicrosoftConnectTest, MicrosoftNCSI_IPV6, MicrosoftConnectTest_IPV6 (the IPV6 ones only work when the network is IPV6-capable!).
    UnityWebRequest is now used with Unity 2018.3+

    ( Ping @Murcho @Mandelboxed @dasu @rebbort )
     
  2. chaostheorygames

    chaostheorygames

    Joined:
    Jul 10, 2014
    Posts:
    3
    Hi @tonic
    Is there any reason the minimum API level is set so high (Android 8.0, API level 26)?
    We are building a game that requires Android 6.0, API level 23 - have just purchased and implemented your plugin and it is stopping us from building to device.
     
    Indroo likes this.
  3. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    @chaostheorygames is that for the included AAR file (containing network security config)?
    If so, it's probably my mistake and there's no reason to set it that high. I can't verify this right now, but I will soon!
     
    Indroo likes this.
  4. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    @chaostheorygames I think that it's because of the aar file. I sent you privately a new one, hoping you can test if it works with your build.
     
  5. chaostheorygames

    chaostheorygames

    Joined:
    Jul 10, 2014
    Posts:
    3
    Thank you that fix worked! Much appreciated.
     
  6. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    Version 1.2.1 is released and it lowers the minimum / target SDK requirements.
     
  7. NandhuVicky

    NandhuVicky

    Joined:
    Oct 1, 2018
    Posts:
    2
    @tonic
    Question regarding IRV feature

    Does IRV have any feature like slow internet connectivity monitor that detects slow internet connection at runtime?
     
  8. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    Hi @NandhuVicky, thanks for the question. There's no any kind of speed monitoring involved.
     
  9. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    19
    Hi @tonic
    I have problems with checking the internet on Android 9. I have the latest version of your plugin, but it doesn't work on Android 9.

    P.S.: iPhone works. Other Android versions work. Unity 2018.2.
     
  10. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    @Shefich Since proper Android 9 support was added in version 1.2.0, could you provide more details?

    - which version of IRV you're using
    - what Unity version you're using
    - what Android SDK version you are using (and targeting what version)
    - what IRV detection method you're using - default by platform, or one of the others (which one / provide your custom url if you use custom method, you can send that in private message)
    - did you notice anything specific when monitoring adb logcat
     
  11. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    19
    @tonic
    - IRV 1.2.1
    - Unity 2018.2.21 f1
    - Minimum Android API 4.1
    - Target automatic (highest installed) Installed highest = 9.0
    - On Android 9 OneUI 1.0 doesn't work
    - On Android 8.0.0 works
    - IRV detection Default by platform
    - adb logcat:
    Cleartext HTTP traffic to clients3.google.com not permitted

    Upd:
    Adding android:usesCleartextTraffic="true" to the AndroidManifest fixes the problem, but I have no idea why your network security configuration file (aar) doesn't work.
     
    Last edited: Apr 26, 2019
  12. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    @Shefich, thanks!

    There's a few things we could try:

    1. Update to Unity 2018.3 or newer. If you can't upgrade, then alternatively please try to enable UnityWebRequest usage: Find #define IRV_USE_WEBREQUEST in InternetReachabilityVerifier.cs, remove the preceding #if and the next #endif. (This step is bit of a wild guess, and should not affect...)

    2. Make sure this file is in your project and not somehow omitted:
    Assets/InternetReachabilityVerifier/Plugins/Android/InternetReachabilityVerifier_NetworkSecurityConfig.aar
    Also click that file in Unity Project window and make sure in Inspector that the Android platform is [✓] Checked. This file is crucial for the Android 9 support.
    I'm not sure, but it's possible some version of unity would want that file to in this location instead, so you could try it:
    Assets/Plugins/Android/InternetReachabilityVerifier_NetworkSecurityConfig.aar
     
  13. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    19
    @tonic I've tried these.

    1. Can't update because of unstable unity release. At least for some SDKs.
    I removed #if #endif, to define IRV_USE_WEBREQUEST, but it didn't help.

    2. I doubled checked checkbox for InternetReachabilityVerifier_NetworkSecurityConfig.aar
    Also I tried to move it to "Assets/Plugins/Android/". It didn't help also. I have some other SDKs in the project and their plugins works good from separate folders (not the main "Plugins" folder).
     
  14. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    @Shefich I'll try to test with the same Unity version. But I'm starting to suspect this is an issue which only happens with certain Unity or Android SDK version, and if so, the only remedy may be to upgrade either one.
     
  15. tonic

    tonic

    Joined:
    Oct 31, 2012
    Posts:
    372
    @Shefich, yes, just confirmed the cause is that Unity 2018.2.21f1 just doesn't recognize yet the Android 9 platform even if a capable SDK is installed.

    So you either have to upgrade to newer Unity version, or alternatively accept using the android:usesCleartextTraffic="true" workaround in manifest.

    Player Settings Android Target API level in Unity 2018.2.21f1:
    It doesn't let you pick higher than 8.1 'Oreo' (API level 27), so that's highest also for "Automatic".
    android_u2018221.png

    Player Settings Android Target API level in Unity 2018.3.0f2:
    Here Unity lets you pick Android 9.0 'Pie' (API level 28), required for the network security config to work.
    android_u201830.png
     
  16. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    19
    @tonic thank you for the confirmation.