Search Unity

How to re-request Unity Ads if the first request failed?

Discussion in 'Unity Ads & User Acquisition' started by ez06, Jul 6, 2015.

Thread Status:
Not open for further replies.
  1. ez06

    ez06

    Joined:
    Feb 18, 2014
    Posts:
    45
    Imagine the player was not connected to the internet when Unity Ads was initialised.

    How can I make the game re-request the ads at a later stage, when the player has access to the internet?

    Like so:

    if (Advertisement.isReady ()) {
    // code to reinitialise or request again??

    }
     
  2. semeno

    semeno

    Joined:
    Jul 26, 2015
    Posts:
    2
    I have the same question please. Do I have to switch to another ad network if Unity ads initialize failed? or any solution working?
     
  3. talrumers

    talrumers

    Joined:
    Jul 17, 2015
    Posts:
    37
    i personally put My Unity Ad Implementation class in the beginning (Splash screen) scene to initialize on start of game, and also i put it on the game scene.
    and in the start i check for !isInitialized
    void InitializeAds() {
    if (!Advertisement.isInitialized) {
    #if UNITY_ANDROID
    Advertisement.Initialize (gameIDForAndroid, false);
    #endif
    #if UNITY_IOS
    Advertisement.Initialize (gameIDForIOS, false);
    #endif
    }
    }
    So every scene in my game it checks if advertisments are initialized and if not, initializing it :D
     
  4. kanzariyahitesh405

    kanzariyahitesh405

    Joined:
    Sep 18, 2019
    Posts:
    5
    i found issue.
    test ads does not show.

    Error :- Unity Ads show failed: Webapp timeout, shutting down Unity Ads
     
  5. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Since this thread is a bit old, any issues you encounter today are probably not the same issues from this thread. Could you create a new thread and provide more details. Specifically, it would be helpful to know:
    • Are you building your game with Unity, XCode, or Android Studio?
    • If Unity, which version are you using?
    • Which version of the Ads SDK are you using?
    • Can you share the code you are using to integrate Unity Ads?
    • Can you provide a device log from your app when Unity Ads is initialized?
    • Are you using mediation? If so, which version of the mediation SDK and adapter are you using?
    • How pervasive is this problem? Is it reproducible 100% of the time or do you have metrics on how often it happens?
     
Thread Status:
Not open for further replies.