question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deep links don't work if Unity app supports VR and headset is set to Daydream View

See original GitHub issue

[Update] - Changing issue title as this bug happens regardless of the app being in the background or not running at all.

Using the current Branch SDK in the GitHub repo and Unity 2017.1.0f3 I am unable to get deep linking to work when Unity is configured to use the native daydream integration (using VRSettings.LoadDeviceByName) and the viewer is set to the Daydream View headset. If I force the viewer to use the Cardboard headset in the settings, everything works as designed. I believe the issue may be around the “Place your phone into the Daydream headset” interstitial UI.

When headset is configured as Daydream View and app is minimized and a deep link is clicked:

08-22 09:02:03.378 31041-31062/? I/Unity: OnApplicationPause
08-22 09:02:03.401 31041-31062/? E/Unity: Error trying to call delegated method pause. null
08-22 09:02:03.905 1579-1952/? I/WindowManager: Destroying surface Surface(name=SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2067 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:896 com.android.server.wm.WindowState.destroyOrSaveSurface:2094 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:575 com.android.server.wm.WindowStateAnimator.finishExit:526 com.android.server.wm.AppWindowAnimator.stepAnimationLocked:438 com.android.server.wm.WindowAnimator.updateAppWindowsLocked:176 
08-22 09:02:03.909 1579-1952/? I/WindowManager: Destroying surface Surface(name=com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2067 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:896 com.android.server.wm.WindowState.destroyOrSaveSurface:2094 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:575 com.android.server.wm.AppWindowAnimator.stepAnimationLocked:438 com.android.server.wm.WindowAnimator.updateAppWindowsLocked:176 com.android.server.wm.WindowAnimator.animateLocked:678 
08-22 09:02:07.594 720-720/? D/SFPerfTracer:        layers: (4:11) (StatusBar (0x7bf2782400): 4:30253) (com.android.systemui.ImageWallpaper (0x7bf2764c00): 4:27009) (DimLayerController/Stack=0 (0x7bf270c000): 0:215)* (Sprite (0x7bf0651800): 0:26)* (NavigationBar (0x7bf0653400): 16:13667) (animation background stackId=1 (0x7bf276bc00): 0:44)* (SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf0681c00): 0:77)- (SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf2787800): 0:343)- (com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf068c400): 0:76)- (com.android.launcher3/com.android.launcher3.Launcher (0x7bf2a75c00): 0:48)- (com.android.systemui/com.android.systemui.recents.RecentsActivity (0x7bf07f8400): 28:40) 
08-22 09:02:12.592 1579-1801/? I/ActivityManager: START u0 {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=panomoments://open?link_click_id=389139376531203519 flg=0x10000000 pkg=com.MomentCaptureInc.PanoMoments cmp=com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (has extras)} from uid 10103 on display 0
08-22 09:02:12.634 2992-2992/? I/ConfigStateTracker: Active VR component changed to: com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity
08-22 09:02:13.832 1579-13357/? I/WindowManager: Destroying surface Surface(name=SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2067 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:896 com.android.server.wm.WindowState.destroyOrSaveSurface:2094 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.AppWindowToken.notifyAppStopped:389 com.android.server.wm.WindowManagerService.notifyAppStopped:4517 com.android.server.am.ActivityStack.activityStoppedLocked:1267 com.android.server.am.ActivityManagerService.activityStopped:7172 
08-22 09:02:13.832 1579-13357/? I/WindowManager: Destroying surface Surface(name=com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2067 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:896 com.android.server.wm.WindowState.destroyOrSaveSurface:2094 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.AppWindowToken.notifyAppStopped:389 com.android.server.wm.WindowManagerService.notifyAppStopped:4517 com.android.server.am.ActivityStack.activityStoppedLocked:1267 com.android.server.am.ActivityManagerService.activityStopped:7172 
08-22 09:02:15.965 720-720/? D/SFPerfTracer:        layers: (2:15) (StatusBar (0x7bf2782400): 4:30367)* (com.android.systemui.ImageWallpaper (0x7bf2764c00): 3:27121)* (DimLayerController/Stack=0 (0x7bf270c000): 0:215)* (Sprite (0x7bf0651800): 0:26)* (NavigationBar (0x7bf0653400): 3:13779)* (animation background stackId=1 (0x7bf276bc00): 0:46)* (SurfaceView - com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (0x7bf0655000): 0:45)- (SurfaceView - com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (0x7bf2a75c00): 0:127)- (com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (0x7bf0658800): 0:59)- (SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf07ec000): 0:64)- (SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf06abc00): 0:64)- (com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf07edc00): 0:63)- (com.google.vr.vrcore/com.google.vr.vrcore.transition.TransitionViewActivity (0x7bf2758800): 3:53) 
08-22 09:02:20.826 2992-2992/? W/VrSessionManager: DON flow failed for ComponentInfo{com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity}, pendingIntent=PendingIntent{f881130: android.os.BinderProxy@8f1c2b7}
08-22 09:02:20.911 2992-2992/? I/ConfigStateTracker: Active VR component changed to: com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity
08-22 09:02:21.263 31041-31062/? I/Unity: callbackDictString: 
                                          
                                          {"callbackId":"BranchCallbackId7","params":{"universalObject":{},"linkProperties":{}}}

When headset is configured as Cardboard and app is minimized and a deep link is clicked:

08-22 09:03:32.300 31041-31062/? I/Unity: OnApplicationPause
08-22 09:03:32.396 31041-31062/? E/Unity: Error trying to call delegated method pause. null
08-22 09:03:32.832 1579-1952/? I/WindowManager: Destroying surface Surface(name=SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2067 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:896 com.android.server.wm.WindowState.destroyOrSaveSurface:2094 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:575 com.android.server.wm.WindowStateAnimator.finishExit:526 com.android.server.wm.AppWindowAnimator.stepAnimationLocked:438 com.android.server.wm.WindowAnimator.updateAppWindowsLocked:176 
08-22 09:03:32.834 1579-1952/? I/WindowManager: Destroying surface Surface(name=com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2067 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:896 com.android.server.wm.WindowState.destroyOrSaveSurface:2094 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:575 com.android.server.wm.AppWindowAnimator.stepAnimationLocked:438 com.android.server.wm.WindowAnimator.updateAppWindowsLocked:176 com.android.server.wm.WindowAnimator.animateLocked:678 
08-22 09:03:32.849 720-720/? D/SFPerfTracer:        layers: (4:10) (StatusBar (0x7bf2782400): 14:30903) (com.android.systemui.ImageWallpaper (0x7bf2764c00): 14:27599) (DimLayerController/Stack=0 (0x7bf270c000): 0:215)* (Sprite (0x7bf0651800): 0:28)* (NavigationBar (0x7bf0653400): 14:14287) (animation background stackId=1 (0x7bf276bc00): 0:48)* (SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf0656c00): 14:229)* (SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf064fc00): 14:646)* (com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf065a400): 14:228)* (com.android.launcher3/com.android.launcher3.Launcher (0x7bf2a82000): 14:29) 
08-22 09:03:42.356 1579-15323/? I/ActivityManager: START u0 {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=panomoments://open?link_click_id=389139376531203519 flg=0x10000000 pkg=com.MomentCaptureInc.PanoMoments cmp=com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (has extras)} from uid 10103 on display 0
08-22 09:03:42.402 2992-2992/? I/ConfigStateTracker: Active VR component changed to: com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity
08-22 09:03:42.579 1579-1952/? I/LaunchCheckinHandler: Displayed com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity,wp,wa,222
08-22 09:03:42.813 31041-31062/? I/Unity: callbackDictString: 
                                          
                                          {"callbackId":"BranchCallbackId9","params":{"universalObject":{"$canonical_identifier":"","$canonical_url":"","$og_title":"","$og_description":"","$content_type":"","$publicly_indexable":"0","$keywords":[],"$exp_date":"0","metadata":{"~creation_source":"1","~marketing":"true","+clicked_branch_link":"true","+match_guaranteed":"true","+click_timestamp":"1503407021","~referring_link":"http:\/\/app.panomoments.com\/BudapestBathsOne","data":"BudapestBathsOne%2CBudapest%20Baths%20-%20243%20frames%20around%208%20seconds%2C243%2C0%2C2048%2C2048","$marketing_title":"BudapestBathsOne","~feature":"marketing","+is_first_session":"false","~id":"401791441409650346","$one_time_use":"false"}},"linkProperties":{"~tags":[],"~feature":"marketing","~alias":"","~stage":"","~duration":0,"~channel":"","control_params":{"$marketing_title":"BudapestBathsOne","$one_time_use":"false"}}}}
08-22 09:03:42.910 720-720/? D/SFPerfTracer:        layers: (4:12) (StatusBar (0x7bf2782400): 10:30993) (com.android.systemui.ImageWallpaper (0x7bf2764c00): 10:27687)* (DimLayerController/Stack=0 (0x7bf270c000): 0:215)* (Sprite (0x7bf0651800): 0:28)* (NavigationBar (0x7bf0653400): 10:14388) (animation background stackId=1 (0x7bf276bc00): 0:48)* (SurfaceView - com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (0x7bf0655000): 0:43)- (SurfaceView - com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (0x7bf2a82000): 0:197)- (com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (0x7bf0656c00): 0:59)- (SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf2766800): 10:23)* (SurfaceView - com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf2763000): 10:23) (com.MomentCaptureInc.PanoMoments/io.branch.unity.BranchUnityActivity (0x7bf2787800): 10:22) 
08-22 09:03:43.016 31041-31062/? I/Unity: NetworkReachability tweaks. MinStreamSize = 65536 MaxStreamSize = 65536 InitialFrameCount = 20

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:33 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
antonargunovcommented, Sep 26, 2017

Hey @dustinkerstein , I discussed this issue with our android devs. They offer me a way. In theory, the way can solve that issue. I will try to implement this way this week.

1reaction
antonargunovcommented, Sep 18, 2017

I am discussing that issue with our android developers. I am not able to fix that issue from Unity3d side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deep links don't work if Unity app supports VR and headset ...
I believe the issue may be around the "Place your phone into the Daydream headset" interstitial UI. When headset is configured as Daydream...
Read more >
Application.deepLinkActivated doesnt work
Hello guys i want to make a deep link between chrome and my unity android app..I have done all the steps i had...
Read more >
Play Not Working in Unity with XR Toolkit and Link
When I select "Play" in Unity editor, I do not see the VR playing in my headset. Link is working and my desktop...
Read more >
Getting started with VR development in Unity
For instructions on how to configure your Project using the XR Plug-in Management system, see the Configuring your unity Project for XR page ......
Read more >
Deep Linking Not working for my app : r/Unity3D
I want a link on my local web server to open a page of my Unity Android app. My intended user flow is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found