PUN is disconnecting, after watching google rewarded video ads.

Options
Hi.
I built an online game with unity using PUN for networking.
After watching google rewarded videoAd, every gameobjects with photonview components are gone on the screen. connected servername is changing to 'none'.
And I'm using photonChat for players in same room. photonChat remains connected after watching video ad, when PUN gets disconnected.

Disconnection occurs both on android and iOS.
and I've checked timeout disconnection, but it wasn't the problem.
and It's not about test device or test ad. I've tried using both of registered test device and test ad.
and It doesn't make any error log about being disconnection. logs are only about AFTER disconnection.
and PUN run in background option of unity inspector is checked.
and weird thing is, It worked good until few days ago. And I haven't changed any code about PUN connection.

is there any further things that I am missing???
Thanks in advance. !

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @FlippingFlop,

    Thank you for choosing Photon!

    It's funny that it works for Photon Chat and not PUN.
    PUN should be able to keep in the background on Android.
    I assume you use PUN1 (Classic) with PhotonChatApi that it includes.
    How long do ads last? more than a minute? it's the default value for PhotonNetwork.BackgroundTimeout.
    Read more about "Mobile Background Apps" Known Issue.

    Also, make sure Photon Chat is really connected by testing exchange of messages between clients.
  • Hello @JohnTube .

    Thanks for your comment.

    I've set the timeout option to 60 sec. and it's still disconnecting when I open video ad and close it right away within 3 seconds.
    Is there any possibility for server to get changed, when I change my PUN subscription plan??
    because I've recently changed my subscription from 500 CCU to 100 CCU one-time purchase plan.
    That's all I have done about server setting within last few days.
    I'm sure that Photon chat is remaining connected. I've checked it using two devices of my own.
    and the disconnection is occurring right after it starts to show the video ad. not during or after.

    And I'm gonna check for android Logcat as well.
    so do you know any keywords to look in the logcat about this issue ?? cause It's logging huge amount of data... so it might be better if I know which words to search for.

    Thanks.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2018
    Options
    Hi @FlippingFlop,

    On iOS, we cannot do anything about it.
    You need to reconnect manually using Reconnect and ReconnectAndRejoin.

    Is there any possibility for server to get changed, when I change my PUN subscription plan??
    because I've recently changed my subscription from 500 CCU to 100 CCU one-time purchase plan.
    No this is unrelated. Same public Photon Cloud is used for both.
    and the disconnection is occurring right after it starts to show the video ad. not during or after.
    maybe you have a call to Disconnect somewhere in an OnApplicationPause method?
    so do you know any keywords to look in the logcat about this issue ??
    No sorry but I recommend you save logcat logs of your application only and from Unity in a file then you can search that file easily.