Photon wont start on older Android devices unless I restart after game install
Options
Hi there,
I have a pretty weird and random issue. I'm trying to optimize my game so it works on older devices such as a Samsung Note 3. On the Note 3, when I first install the game, for some reason it won't connect to the Photon Cloud. If I restart my phone after the install, it works great, no issues at all. For now I found a work around where if I detect that Photon doesn't work, I give the player a message asking them to restart their phone. However I would like to solve this issue if possible. Any ideas at all why this could be happening? I'm pushing the game from my Unity Editor straight to the phone via a USB cable. I don't have a newer Android device to test this on unfortunately so I'm not sure if this is happening on older devices or all android ones either...
Thanks in advance for any suggestions!
I have a pretty weird and random issue. I'm trying to optimize my game so it works on older devices such as a Samsung Note 3. On the Note 3, when I first install the game, for some reason it won't connect to the Photon Cloud. If I restart my phone after the install, it works great, no issues at all. For now I found a work around where if I detect that Photon doesn't work, I give the player a message asking them to restart their phone. However I would like to solve this issue if possible. Any ideas at all why this could be happening? I'm pushing the game from my Unity Editor straight to the phone via a USB cable. I don't have a newer Android device to test this on unfortunately so I'm not sure if this is happening on older devices or all android ones either...
Thanks in advance for any suggestions!
0
Best Answer
-
Yes, the issue you describe is correct. If I restart the device after the install, everything works well without any issues. I haven't tried a different Unity version, just the most recent one. I did try the same thing on a Nexus tablet from 2013, so around the same period. On the Nexus tablet, if the game is uninstalled so I install a fresh copy, the same thing happens. However if the game is already installed and I install over it, it does connect without any issues. I also tried adding a button in the middle of the screen that calls PhotonNetwork.ConnectUsingSettings(GameVersion); instead of running that from Start(); but it didn't do anything.
I will try logcat and DDMS when I get a chance, I haven't so far. I thought maybe someone else encountered a similar situation and I just had to change some settings or something like that. For example one post on a different forum said something about using .Net subset instead of .Net so I was hoping it was something similar.0
Answers
-
Btw, if this helps, the game is able to connect to the internet as that's the first thing I check for. And only after it detects that it can connect to the internet, I check to see there's any change in the network connection through "PhotonNetwork.connectionStateDetailed.ToString();".0
-
Also, when there is no internet, I generally at least get the "Peer Created" status message. With my issue I'm getting nothing at all.0
-
Hi @stefanplc,
This is a weird issue!
So to describe it:
every time you push and install a new APK version you need to restart your Samsung Note 3?
Maybe it is related to the Unity version you are using.
Did you try a different Unity version or different devices?
I can guarantee that Photon has no issues with multiple old or new devices I tried, Nexus 5, HTC M8 and other generic cheap Android devices.
So this must be specific to Note 3 probably.
Do you use logcat? Maybe you can spot something useful in the logs.
If you have Android Studio, try DDMS.0 -
Yes, the issue you describe is correct. If I restart the device after the install, everything works well without any issues. I haven't tried a different Unity version, just the most recent one. I did try the same thing on a Nexus tablet from 2013, so around the same period. On the Nexus tablet, if the game is uninstalled so I install a fresh copy, the same thing happens. However if the game is already installed and I install over it, it does connect without any issues. I also tried adding a button in the middle of the screen that calls PhotonNetwork.ConnectUsingSettings(GameVersion); instead of running that from Start(); but it didn't do anything.
I will try logcat and DDMS when I get a chance, I haven't so far. I thought maybe someone else encountered a similar situation and I just had to change some settings or something like that. For example one post on a different forum said something about using .Net subset instead of .Net so I was hoping it was something similar.0