-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Incorrect device cutout status upon app launch #98
Comments
I'm running the example using Unity 2021.3.14f1 against a Pixel 6 and I'm getting the following results. It appears that the cutouts is correct when FirstScript.start is executed.
|
I think you'll find that earlier in the log |
I've removed all the Appboy libraries and used "com.unity3d.player.UnityPlayerActivity" in the AndroidManifest.xml, and the app is behaving in the same way. Value is incorrect at first, but then eventually is correct. I believe this is a Unity bug. |
Can you try going into Just to be very clear, I'm unsure if this problem is caused by the AppBoy Unity SDK or a problem with Unity player activity overriding (this second possibility could indeed be considered a Unity bug). Unity requires that |
OK, I see that behavior if I turn off the custom manifest. When I have no Braze code or library anywhere, and I'm just using the custom manifest using the UnityPlayerActivity directly, I'm getting a 0 the first time. So that makes me think it's something on the Unity side. When we display In-App Messages, we'll read the displayCutout values to adjust the margins of some of our views, but we're not writing to that value. |
If you're not modifying the app layout settings at all then this would appear to be a Unity issue after all. Let me look into this further and I'll get back to you when I figure out a solution. |
We've tracked down the problem to the custom player activity that your documentation specifies here. As no theme is specified in the player activity, the app launches in an unknown layout that can cause delays when the Unity engine requests for the required app layout. The solution is to specify Unity's default theme in your player activity (i.e. |
Braze Unity SDK Version
3.11.0
Steps To Reproduce
bug-appboy-cutout.zip
@@@
Expected Behavior
Log message should print
@@@ Screen.cutouts.Length: 1
to indicate the correct status of the cutout on the device.Actual Incorrect Behavior
Log message prints
@@@ Screen.cutouts.Length: 0
that indicates that there are no cutouts on the device.Verbose Logs
No response
Additional Information
I'm unsure if this problem is caused by the Appboy Unity SDK or a problem with the SDK integration with Unity.
Does the Appboy Unity SDK attempt to modify the app layout in any way?
The text was updated successfully, but these errors were encountered: