App is closed when user cancels Unity Ads Video

Hello fellow developers,

When using Unity Ads (code below) and the user cancels the video by pushing the home screen button (from the mobile phone) sometimes the app is closed permanently, so when the player taps the icon again, the application restarts. But sometimes that works fine, meaning that the app keeps running in the background and when the players taps its icon again it gets back to the appropriate screen in the game. BTW, I’ve done the tests in Samsung S5/S6 and Motorola Moto-X always with the developer mode OFF. Any thoughts? Is there any general way to prevent the app from closing when the players pushes the mobile’s home screen?

Thanks!

    // Show Video Ad
    void showVideoAd()
    {
        // Video Ad
        if (Advertisement.IsReady("rewardedVideo"))
            Advertisement.Show("rewardedVideo", 
                new ShowOptions { resultCallback = HandleShowResult });
    }

    // Video Ad callback
    void HandleShowResult(ShowResult result)
    {
        switch (result)
        {
            case ShowResult.Finished:
                videoAdReward();
            break;
            default:
                videoAdFailed();
            break;
        }
    }

Anyone please???

If the app is restarting when returning to the foreground, it sounds like the app is crashing when being sent to the background while the video is playing. Are you using the latest version of Unity Ads?

The latest version of the asset package is version 1.3.3, the latest version of Unity is 5.2.2p1.

Any debug output you can provide through could prove useful. Try the following commands via the terminal before loading your game while your device is connected via USB:

adb logcat -c; adb logcat -s Unity UnityAds

Please post a link to your output, or send me the link directly via private message.

Thanks Nikkolai, I’ll do that. I’ve been using Unity Version 5.2.0f3 and didn’t need to import the asset package for Unity Ads, but when I do that, I get the following compiler error: The imported type `UnityEngine.Advertisements.ShowResult’ is defined multiple times. So, I guess that it’s not necessary to import that asset. Right?

Right, if you’re using Unity Ads via the Services window in Unity 5.2 or later, you don’t need to import the Unity Ads asset package. Doing so will throw a duplicate definition error like you’re seeing.

You are using an older version of Unity though. I’d recommend updating to the latest version.

Thanks again Nikkolai. Could please take a look at this another post of mine?
http://answers.unity3d.com/questions/1090880/game-restarts-after-facebook-sharing-share-intent.html

I’ve updated to the lastest version and here’s the what I got from adb:

--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
D/Unity (30844): GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_
AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_fr
amebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2
10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_textu
re GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_inde
x_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_progra
m_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_r
gba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_t
exture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_ve
rtex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM
alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_globa
l_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCO
M_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB

de
D/Unity (30844): code GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_re
nder_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT

disjoint_timer_query

The problem is quite random… it has happened only once in my tests now…

Is there a similar command to help figuring out what is happening in my other post?
http://answers.unity3d.com/questions/1090880/game-restarts-after-facebook-sharing-share-intent.html

Thank you!

That debug output is just from the initial Unity application startup. To see more debug output, make sure you have Development Build enabled in Build Settings before building your app.

I’m not very familiar with the code involved with your other issue. However, if you’re not already aware, Facebook did recently make some changes to their API. We’ve had to make appropriate changes to our Everyplay asset package to support the new API. I’d recommend checking out their developer portal for more info.

unity-nikkolai, please check the log below. Now I’m in the development mode and I managed to pinpoint in the log where the share intent starts. BTW, about your comment on the Facebook API, I guess that this is not a problem in the FB API because I’m using a native android share intent, and the problem occurs on FB, Gmail (less frequently though), etc. Thanks for your attention.

C:\Program Files (x86)\Android\android-sdk\platform-tools>adb logcat -c
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb logcat -s Unity
--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
I/Unity (25547): splash_mode = 0 (integer)
I/Unity (25547): hide_status_bar = True (bool)
I/Unity (25547): useObb = False (bool)
D/Unity (25547): surfaces: attach glview
I/Unity (25547): Choreographer available: Enabling VSYNC timing
I/Unity (25547): onResume
D/Unity (25547): [EGL] Attaching window :0x6083a9a8
D/Unity (25547): [EGL] Attaching window :0x6083a9a8
I/Unity (25547): windowFocusChanged: true
D/Unity (25547): SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 4, Memory = 882mb
D/Unity (25547): SystemInfo ARM big.LITTLE configuration: 4 big (mask: 15), 0
little (mask: 0)
D/Unity (25547): [SHA1] 0dcdd14f07fe830fabe518f93780f8fbe60e9ba9 21491839 by
tes ~ lib/armeabi-v7a/libunity.so
D/Unity (25547): [SHA1] 6efb68e5c046e0b51f99d237a93fca862b492883 44013 by
tes ~ lib/armeabi-v7a/libmain.so
D/Unity (25547): [SHA1] 3f9c6aadd03554cd6a4a07defc46c12444437e5b 3758496 by
tes ~ lib/armeabi-v7a/libmono.so
D/Unity (25547): [SHA1] 3d82ccd3d7064e010f00d3fbf889fd8ecde217ee 25211394 by
tes ~ lib/x86/libunity.so
D/Unity (25547): [SHA1] 1598292187e5b0be9af4dbb215a7d41c1ce4549b 27052 by
tes ~ lib/x86/libmain.so
D/Unity (25547): [SHA1] c3f02aff64c835e59f1c6391ab9999d1286acf4f 3636444 by
tes ~ lib/x86/libmono.so
D/Unity (25547): Mono path[0] = ‘/data/app/com.deimostudios.sugartris-2.apk/as
sets/bin/Data/Managed’
D/Unity (25547): Mono config path = ‘assets/bin/Data/Managed’
D/Unity (25547): PlayerConnection initialized from /data/app/com.deimostudios.
sugartris-2.apk/assets/bin/Data (debug = 0)
D/Unity (25547): PlayerConnection initialized network socket : 0.0.0.0 55090
D/Unity (25547): PlayerConnection initialized unix socket : Unity-com.deimostu
dios.sugartris
D/Unity (25547): Multi-casting “[IP] 192.168.1.103 [Port] 55090 [Flags] 2 [Gui
d] 4083846700 [EditorId] 2552703306 [Version] 1048832 [Id] AndroidPlayer(motorol
a_XT1032@192.168.1.103) [Debug] 0” to [225.0.0.222:54997]…
D/Unity (25547): InitializeScriptEngine OK (60ed3ee0)
D/Unity (25547): PlayerConnection already initialized - listening to [192.168.
1.103:55090]
D/Unity (25547): PlayerInitEngineNoGraphics OK
D/Unity (25547): [EGL] Request: ES 3.0 RGB0 000 0/0
D/Unity (25547): [EGL] Found: ID[1] ES 3.0 RGB16 565 0/0
D/Unity (25547): GfxDevice: creating device client; threaded=1
D/Unity (25547): [EGL] Request: ES 3.0 RGB0 000 0/0
D/Unity (25547): [EGL] Found: ID[1] ES 3.0 RGB16 565 0/0
D/Unity (25547): [EGL] Request: ES 3.0 RGB16 565 0/0
D/Unity (25547): [EGL] Found: ID[1] ES 3.0 RGB16 565 0/0
D/Unity (25547): ANativeWindow: (720/1280) RequestedResolution: (0/0) EGLSurfa
ce: (720/1280)
D/Unity (25547): Renderer: Adreno ™ 305
D/Unity (25547): Vendor: Qualcomm
D/Unity (25547): Version: OpenGL ES 3.0 V@66.0 AU@04.04.02.048.018 (CL@)
D/Unity (25547): GLES: 3
D/Unity (25547): GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_
AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_fr
amebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2
10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_textu
re GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_inde
x_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_progra
m_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_r
gba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_t
exture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_ve
rtex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM
alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_globa
l_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCO
M_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB

de
D/Unity (25547): code GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_re
nder_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT

disjoint_timer_query
D/Unity (25547): OPENGL LOG: Creating OpenGL ES 3.0 graphics device
D/Unity (25547): InitializeGfxDevice OK
D/Unity (25547): Initialize engine version: 5.2.2p2 (67d68477bb52)
D/Unity (25547): AudioManager: Selecting AudioTrack output…
D/Unity (25547): Begin MonoManager ReloadAssembly
D/Unity (25547): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/UnityEngine.dll (this message is harmless)
D/Unity (25547): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/UnityEngine.dll into Unity Child Domain
D/Unity (25547): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/Assembly-CSharp.dll (this message is harmless)
D/Unity (25547): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/Assembly-CSharp.dll into Unity Child Domain
D/Unity (25547): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/UnityEngine.Advertisements.dll (this message is harmles
s)
D/Unity (25547): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/UnityEngine.Advertisements.dll into Unity Child Domain
D/Unity (25547): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/UnityEngine.UI.dll (this message is harmless)
D/Unity (25547): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/UnityEngine.UI.dll into Unity Child Domain
D/Unity (25547): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/UnityEngine.Networking.dll (this message is harmless)
D/Unity (25547): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/UnityEngine.Networking.dll into Unity Child Domain
D/Unity (25547): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/System.Core.dll (this message is harmless)
D/Unity (25547): - Completed reload, in 0.178 seconds
D/Unity (25547): PlayerInitEngineGraphics OK
D/Unity (25547): Found 6 native sensors
D/Unity (25547): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity (25547): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity (25547): Requested framebuffer: resolution[720x1280], rgba[5/6/5/0], d
epth+stencil[on], samples[1]
D/Unity (25547): Created framebuffer: resolution[720x1280], rgba[5/6/5/0], dep
th+stencil[24/8], samples[0]
D/Unity (25547): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/System.dll (this message is harmless)
D/Unity (25547): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity (25547): Setting up 1 worker threads for Enlighten.
D/Unity (25547): Thread → id: 6b21daf8 → priority: 1
D/Unity (25547): Unloading 3 Unused Serialized files (Serialized files now loa
ded: 0)
D/Unity (25547): UnloadTime: 58.274998 ms
D/Unity (25547): System memory in use before: 95.7 MB.
D/Unity (25547): System memory in use after: 95.8 MB.
D/Unity (25547):
D/Unity (25547): Unloading 12 unused Assets to reduce memory usage. Loaded Obj
ects now: 2664.
D/Unity (25547): Total: 14.603000 ms (FindLiveObjects: 2.381000 ms CreateObjec
tMapping: 0.371000 ms MarkObjects: 10.984000 ms DeleteObjects: 0.860000 ms)
D/Unity (25547):
I/Unity (25547): onPause
D/Unity (25547): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro

HERE IS WHERE I TAP TO SHARE ON FACEBOOK OR GMAIL (SAME RESULT) START AN ANDROID SHARE INTENT

I/Unity (25547): windowFocusChanged: false
D/Unity (25547): [EGL] Attaching window :0x0
I/Unity (26223): splash_mode = 0 (integer)
I/Unity (26223): hide_status_bar = True (bool)
I/Unity (26223): useObb = False (bool)
D/Unity (26223): surfaces: attach glview
I/Unity (26223): Choreographer available: Enabling VSYNC timing
I/Unity (26223): onResume
I/Unity (26223): onPause
I/Unity (26223): onResume
D/Unity (26223): [EGL] Attaching window :0x6083a968
D/Unity (26223): [EGL] Attaching window :0x6083a968
I/Unity (26223): windowFocusChanged: true

AND THE APP IS RESTARTED…
AFTER SHARING, INSTEAD OF GOING BACK TO THE GAME

D/Unity (26223): SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 4, Memory = 882mb
D/Unity (26223): SystemInfo ARM big.LITTLE configuration: 4 big (mask: 15), 0
little (mask: 0)
D/Unity (26223): [SHA1] 0dcdd14f07fe830fabe518f93780f8fbe60e9ba9 21491839 by
tes ~ lib/armeabi-v7a/libunity.so
D/Unity (26223): [SHA1] 6efb68e5c046e0b51f99d237a93fca862b492883 44013 by
tes ~ lib/armeabi-v7a/libmain.so
D/Unity (26223): [SHA1] 3f9c6aadd03554cd6a4a07defc46c12444437e5b 3758496 by
tes ~ lib/armeabi-v7a/libmono.so
D/Unity (26223): [SHA1] 3d82ccd3d7064e010f00d3fbf889fd8ecde217ee 25211394 by
tes ~ lib/x86/libunity.so
D/Unity (26223): [SHA1] 1598292187e5b0be9af4dbb215a7d41c1ce4549b 27052 by
tes ~ lib/x86/libmain.so
D/Unity (26223): [SHA1] c3f02aff64c835e59f1c6391ab9999d1286acf4f 3636444 by
tes ~ lib/x86/libmono.so
D/Unity (26223): Mono path[0] = ‘/data/app/com.deimostudios.sugartris-2.apk/as
sets/bin/Data/Managed’
D/Unity (26223): Mono config path = ‘assets/bin/Data/Managed’
D/Unity (26223): PlayerConnection initialized from /data/app/com.deimostudios.
sugartris-2.apk/assets/bin/Data (debug = 0)
D/Unity (26223): PlayerConnection initialized network socket : 0.0.0.0 55334
D/Unity (26223): PlayerConnection initialized unix socket : Unity-com.deimostu
dios.sugartris
D/Unity (26223): Multi-casting “[IP] 192.168.1.103 [Port] 55334 [Flags] 2 [Gui
d] 3662339177 [EditorId] 2552703306 [Version] 1048832 [Id] AndroidPlayer(motorol
a_XT1032@192.168.1.103) [Debug] 0” to [225.0.0.222:54997]…
D/Unity (26223): InitializeScriptEngine OK (61150ee0)
D/Unity (26223): PlayerConnection already initialized - listening to [192.168.
1.103:55334]
D/Unity (26223): PlayerInitEngineNoGraphics OK
D/Unity (26223): [EGL] Request: ES 3.0 RGB0 000 0/0
D/Unity (26223): [EGL] Found: ID[1] ES 3.0 RGB16 565 0/0
D/Unity (26223): GfxDevice: creating device client; threaded=1
D/Unity (26223): [EGL] Request: ES 3.0 RGB0 000 0/0
D/Unity (26223): [EGL] Found: ID[1] ES 3.0 RGB16 565 0/0
D/Unity (26223): [EGL] Request: ES 3.0 RGB16 565 0/0
D/Unity (26223): [EGL] Found: ID[1] ES 3.0 RGB16 565 0/0
D/Unity (26223): ANativeWindow: (720/1280) RequestedResolution: (0/0) EGLSurfa
ce: (720/1280)
D/Unity (26223): Renderer: Adreno ™ 305
D/Unity (26223): Vendor: Qualcomm
D/Unity (26223): Version: OpenGL ES 3.0 V@66.0 AU@04.04.02.048.018 (CL@)
D/Unity (26223): GLES: 3
D/Unity (26223): GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_
AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_fr
amebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2
10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_textu
re GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_inde
x_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_progra
m_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_r
gba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_t
exture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_ve
rtex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM
alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_globa
l_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCO
M_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB

de
D/Unity (26223): code GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_re
nder_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT

disjoint_timer_query
D/Unity (26223): OPENGL LOG: Creating OpenGL ES 3.0 graphics device
D/Unity (26223): InitializeGfxDevice OK
D/Unity (26223): Initialize engine version: 5.2.2p2 (67d68477bb52)
D/Unity (26223): AudioManager: Selecting AudioTrack output…
D/Unity (26223): Begin MonoManager ReloadAssembly
D/Unity (26223): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/UnityEngine.dll (this message is harmless)
D/Unity (26223): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/UnityEngine.dll into Unity Child Domain
D/Unity (26223): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/Assembly-CSharp.dll (this message is harmless)
D/Unity (26223): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/Assembly-CSharp.dll into Unity Child Domain
D/Unity (26223): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/UnityEngine.Advertisements.dll (this message is harmles
s)
D/Unity (26223): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/UnityEngine.Advertisements.dll into Unity Child Domain
D/Unity (26223): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/UnityEngine.UI.dll (this message is harmless)
D/Unity (26223): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/UnityEngine.UI.dll into Unity Child Domain
D/Unity (26223): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/UnityEngine.Networking.dll (this message is harmless)
D/Unity (26223): Loading /data/app/com.deimostudios.sugartris-2.apk/assets/bin
/Data/Managed/UnityEngine.Networking.dll into Unity Child Domain
D/Unity (26223): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/System.Core.dll (this message is harmless)
D/Unity (26223): - Completed reload, in 0.207 seconds
D/Unity (26223): PlayerInitEngineGraphics OK
D/Unity (26223): Found 6 native sensors
D/Unity (26223): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity (26223): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity (26223): Requested framebuffer: resolution[720x1280], rgba[5/6/5/0], d
epth+stencil[on], samples[1]
D/Unity (26223): Created framebuffer: resolution[720x1280], rgba[5/6/5/0], dep
th+stencil[24/8], samples[0]
D/Unity (26223): Platform assembly: /data/app/com.deimostudios.sugartris-2.apk
/assets/bin/Data/Managed/System.dll (this message is harmless)
D/Unity (26223): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity (26223): Setting up 1 worker threads for Enlighten.
D/Unity (26223): Thread → id: 639129f8 → priority: 1

unity-nikkolai, BTW, I found an demo app doing exactly what I want, but that is working. So, maybe there is something weird in my settings? Please check out its log. It shares and gets back to the app, as it should be.

C:\Program Files (x86)\Android\android-sdk\platform-tools>adb logcat -s Unity
--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
I/Unity ( 3848): splash_mode = 0 (integer)
I/Unity ( 3848): hide_status_bar = True (bool)
I/Unity ( 3848): useObb = False (bool)
D/Unity ( 3848): surfaces: attach glview
I/Unity ( 3848): Choreographer available: Enabling VSYNC timing
I/Unity ( 3848): onResume
D/Unity ( 3848): [EGL] Attaching window :0x60810560
D/Unity ( 3848): [EGL] Attaching window :0x60810560
I/Unity ( 3848): windowFocusChanged: true
D/Unity ( 3848): SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 4, Memory = 882mb
D/Unity ( 3848): SystemInfo ARM big.LITTLE configuration: 4 big (mask: 15), 0
little (mask: 0)
D/Unity ( 3848): [SHA1] 0dcdd14f07fe830fabe518f93780f8fbe60e9ba9 21491839 by
tes ~ lib/armeabi-v7a/libunity.so
D/Unity ( 3848): [SHA1] 6efb68e5c046e0b51f99d237a93fca862b492883 44013 by
tes ~ lib/armeabi-v7a/libmain.so
D/Unity ( 3848): [SHA1] 3f9c6aadd03554cd6a4a07defc46c12444437e5b 3758496 by
tes ~ lib/armeabi-v7a/libmono.so
D/Unity ( 3848): [SHA1] 3d82ccd3d7064e010f00d3fbf889fd8ecde217ee 25211394 by
tes ~ lib/x86/libunity.so
D/Unity ( 3848): [SHA1] 1598292187e5b0be9af4dbb215a7d41c1ce4549b 27052 by
tes ~ lib/x86/libmain.so
D/Unity ( 3848): [SHA1] c3f02aff64c835e59f1c6391ab9999d1286acf4f 3636444 by
tes ~ lib/x86/libmono.so
D/Unity ( 3848): Mono path[0] = ‘/data/app/com.daniel4d.testshare-1.apk/assets
/bin/Data/Managed’
D/Unity ( 3848): Mono config path = ‘assets/bin/Data/Managed’
D/Unity ( 3848): PlayerConnection initialized from /data/app/com.daniel4d.test
share-1.apk/assets/bin/Data (debug = 0)
D/Unity ( 3848): PlayerConnection initialized network socket : 0.0.0.0 55244
D/Unity ( 3848): PlayerConnection initialized unix socket : Unity-com.daniel4d
.testshare
D/Unity ( 3848): Multi-casting "[IP] 192.168.1.103 [Port] 55244 [Flags] 2 [Gui
d] 660012091 [EditorId] 2697569014 [Version] 1048832 [Id] AndroidPlayer(motorola
XT1032@192.168.1.103) [Debug] 0" to [225.0.0.222:54997]…
D/Unity ( 3848): InitializeScriptEngine OK (61125ee0)
D/Unity ( 3848): PlayerConnection already initialized - listening to [192.168.
1.103:55244]
D/Unity ( 3848): PlayerInitEngineNoGraphics OK
D/Unity ( 3848): [EGL] Request: ES 2.0 RGBA32 8888 0/0
D/Unity ( 3848): [EGL] Found: ID[5] ES 2.0 RGBA32 8888 0/0 AFBT
D/Unity ( 3848): ANativeWindow: (720/1280) RequestedResolution: (0/0) EGLSurfa
ce: (720/1280)
D/Unity ( 3848): Renderer: Adreno ™ 305
D/Unity ( 3848): Vendor: Qualcomm
D/Unity ( 3848): Version: OpenGL ES 3.0 V@66.0 AU@04.04.02.048.018 (CL@)
D/Unity ( 3848): GLES: 3
D/Unity ( 3848): GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_A
MD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_fra
mebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2

10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_textur
e GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index
_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program
binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rg
ba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_te
xture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_ver
tex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM

alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global
_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM
_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_d
ec
D/Unity ( 3848): ode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_ren
der_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_d
isjoint_timer_query
D/Unity ( 3848): ETC2 1
D/Unity ( 3848): OPENGL LOG: Creating OpenGL ES 2.0 graphics device
D/Unity ( 3848): InitializeGfxDevice OK
D/Unity ( 3848): Initialize engine version: 5.2.2p2 (67d68477bb52)
D/Unity ( 3848): AudioManager: Selecting AudioTrack output…
D/Unity ( 3848): Begin MonoManager ReloadAssembly
D/Unity ( 3848): Platform assembly: /data/app/com.daniel4d.testshare-1.apk/ass
ets/bin/Data/Managed/UnityEngine.dll (this message is harmless)
D/Unity ( 3848): Loading /data/app/com.daniel4d.testshare-1.apk/assets/bin/Dat
a/Managed/UnityEngine.dll into Unity Child Domain
D/Unity ( 3848): Platform assembly: /data/app/com.daniel4d.testshare-1.apk/ass
ets/bin/Data/Managed/Assembly-CSharp.dll (this message is harmless)
D/Unity ( 3848): Loading /data/app/com.daniel4d.testshare-1.apk/assets/bin/Dat
a/Managed/Assembly-CSharp.dll into Unity Child Domain
D/Unity ( 3848): Platform assembly: /data/app/com.daniel4d.testshare-1.apk/ass
ets/bin/Data/Managed/UnityEngine.UI.dll (this message is harmless)
D/Unity ( 3848): Loading /data/app/com.daniel4d.testshare-1.apk/assets/bin/Dat
a/Managed/UnityEngine.UI.dll into Unity Child Domain
D/Unity ( 3848): Platform assembly: /data/app/com.daniel4d.testshare-1.apk/ass
ets/bin/Data/Managed/UnityEngine.Networking.dll (this message is harmless)
D/Unity ( 3848): Loading /data/app/com.daniel4d.testshare-1.apk/assets/bin/Dat
a/Managed/UnityEngine.Networking.dll into Unity Child Domain
D/Unity ( 3848): Platform assembly: /data/app/com.daniel4d.testshare-1.apk/ass
ets/bin/Data/Managed/System.Core.dll (this message is harmless)
D/Unity ( 3848): - Completed reload, in 0.190 seconds
D/Unity ( 3848): PlayerInitEngineGraphics OK
D/Unity ( 3848): Found 6 native sensors
D/Unity ( 3848): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity ( 3848): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity ( 3848): Requested framebuffer: resolution[720x1280], rgba[8/8/8/8], d
epth+stencil[on], samples[1]
D/Unity ( 3848): Created framebuffer: resolution[720x1280], rgba[8/8/8/8], dep
th+stencil[24/8], samples[0]
D/Unity ( 3848): Platform assembly: /data/app/com.daniel4d.testshare-1.apk/ass
ets/bin/Data/Managed/System.dll (this message is harmless)
D/Unity ( 3848): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity ( 3848): Setting up 1 worker threads for Enlighten.
D/Unity ( 3848): Thread → id: 64bc20f8 → priority: 1
I/Unity ( 3848): onPause
D/Unity ( 3848): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro

SHARE INTENT

I/Unity ( 3848): windowFocusChanged: false
D/Unity ( 3848): [EGL] Attaching window :0x0
D/Unity ( 3848): [EGL] Attaching window :0x65c0c218
D/Unity ( 3848): [EGL] Attaching window :0x65c0c218
I/Unity ( 3848): windowFocusChanged: true
I/Unity ( 3848): onResume
D/Unity ( 3848): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro
D/Unity ( 3848): ANativeWindow: (720/1280) RequestedResolution: (0/0) EGLSurfa
ce: (720/1280)
I/Unity ( 3848): onPause
D/Unity ( 3848): Sensor : Accelerometer ( 1) ; 0.009810 / 0.00s ; LIS3D
H 3-axis Accelerometer / ST Micro

unity-nikkolai, I’ve performed some additional tests and initially I didn’t face any issues. Then, out of the blue, it arises. One thing I’ve noticed in the log is that everytime the app works fine I see this: D/Unity (3848): ANativeWindow: (720/1280) RequestedResolution: (0/0) EGLSurface: (720/1280). Thanks for your attention.