Hello,
Regarding the 2nd point, we found a way to detect when the app is put to the background/minimized which result in the camera going off :
#if ENABLE_WINMD_SUPPORT CoreApplication.EnteredBackground += (sender, args) => { }; CoreApplication.LeavingBackground += (sender, args) => { }; #endif
We can now restart the camera when the application comes to the foreground again.
Questions 1 and 3 remain, thank you in advance
Thales team.
Hi and sorry for the late response.
Regarding the stopping camera: Unfortunately I couldn't reproduce your issue using our SDK examples (using a Windows Surface Pro 4). Could you download the 9.10 version of our SDK from here and test if the camera is still showing the erroneous behavior? (The samples were temporarly disabled in 9.12 but will be available again in future versions)
If the error doesn't occur any more you could try to check if there are any differences between our sample code and yours which might cause the issue.
Best regards,
Peter
Hello,
Sorry for the delay.
I have been able to perform tests on your SDK 9.10 Samples and the issue persists.
Here is the full setup :
Wikitude SDK : Unity Professional 9.10
Project : SDK 9.10 Samples
Unity Version : 2020.3.2f1
Devices :
PC :
Microsoft Windows 10 Entreprise LTSC
10.0.17763
HP ZBook Fury 15 G7 Mobile Workstation
x64
Integrated HP HD Camera
Tablet :
Microsoft Windows 10 Professional
10.0.19045
Surface Pro 6
x64
Integrated Intel(R) AVStream Camera 2500
Build Options in Unity :
- Run In Background : true
- Default is Full Screen : true
- Target Device : Any Device
- Architecture : x64
- Target SDK Version : 10.0.19041.0
- Minimum Platform Version : 10.0.10240.0
- Visual Studio Version : 2022
Building / Starting the application in Debug, Release or Master configuration always produced the same results.
On PC :
- Building "Executable Only, then launching UWPPlayerLauncher.exe" or "D3D Project, then launching the app in Visual Studio" produced the same results.
- When app is in Full Screen :
- Alt+Tab or Open other app from the Taskbar -> Camera stops
- Reduce the application's window -> Camera stops
- When app is not in Full Screen :
- Alt+Tab or Open other app from the Taskbar -> Camera keeps running
- Reduce the application's window -> Camera stops
On Tablet :
- The folder containing the "UWPPlayerLauncher.exe" has been transferred to the Tablet, then I launched "UWPPlayerLauncher.exe".
- The tablet has a "Tablet Mode" that can be activated or not (see screenshot attached).
- With Tablet Mode ON :
- When app is in Full Screen :
- Open other app from the Taskbar -> Camera stops
- (Reducing the application's window is not possible in Tablet Mode)
- When app is not in Full Screen :
- Open other app from the Taskbar -> Camera stops
- (Reducing the application's window is not possible in Tablet Mode)
- With Tablet Mode OFF and external Keyboard connected to the Tablet :
- Same behaviors than PC.
By "Reducing the application's window", I meaning clicking on the top-right corner of the screen on the "reduce" icon. (See screenshot attached).
I hope you can reproduce the issue on your side to give us some feedback.
Regards,
Thales team
Hello Team Thales,
glad to hear that you found a way of detecting when the application leaves the active state.
Regarding your questions:
With best regards,
Peter
Hello,
You were right, we can just disable and re-enable the WikitudeCamera gameobject when the application comes to the foreground again.
Obviously it would be better for us if the Camera did not stop at all, since we use it in a VideoConference / Remote Assistance application. So if the user puts the application to the Background (like reducing the window and ALT+Tab), other participants in the call do not receive any video feed anymore (we do not have this problem on Android).
But at least we have an efficient workaround to restart the Camera.
Best regards
Hello Team Thales,
I can relate that this is not a desired outcome. Unfortunately UWP has some certain peculiarities that iOS and Android do not have which sometimes makes it rather difficult.
Glad to hear that the work around is at least a sufficient one.
With best regards,
Peter
Hello,
Any update or comment on this issue ?
Regards
TeamThales RaRv
Hello
We noticed that the WikitudeCamera script uses the "OnApplicationPause" event that should call "Start/StopWikitudeNativeSDK", but the event "OnApplicationPause" is not called on PC and Windows Surface when minimizing the application.