Forum Discussion
motorsep
9 years agoMember
[Gear VR] How to shut down app on exit to the Store ?
When I use OVRQUITMENU or exit to Oculus Home from Universal Menu, shouldn't the app/game shut down automatically ? If it should - then it's a bug. If not, what do I need to do to shut it down? ...
- 9 years agoYes, short-press brings up the confirm quit menu and if you confirm quit, then it should quit the app and take you to home. If that isn't happening, it would be a bug. We need a lot more information about the problem. What app is having the problem? What hardware and versions of UE4, the integration, Android, and SystemActivities are you using? Can you provide complete logcat from a failing run?
- 9 years agoYeah, it seems working:
D/UE4 (28611): [2016.04.07-01.59.59:261][64000]LogHMD: GearVR shutdown.
D/UE4 (28611): [2016.04.07-01.59.59:307][64000]LogWindows: FAndroidMisc::RequestExit(1)
Why do you think it doesn't exit? If you refer to the "ghost app" that you still see if you press the Tasks button on the phone, then I can say it is not a real app. If you select it, the app will be started from the beginning. I don't know why that 'ghost app' stays in the tasks, seems like this is how the System.exit(0) works on Android (see implementation of AndroidThunkJava_ForceQuit() in Engine\Build\Android\Java\src\com\epicgames\ue4\GameActivity.java - 9 years agoSo, the list where you see the 'ghost app' is called 'recently used apps' list and it just shows the list of recently used apps. To make sure your app is not in memory you may use 'top' command in 'adb shell'.
Alternatively, you can exclude your app from appearing in the recently used apps list. You need to add android:excludeFromRecents="true" attribute to <activity> section in AndroidManifest.xml. In UE4, just go to 'Project Settings' -> 'Platforms' -> 'Android' -> 'Advanced APK packaging' and add the android:excludeFromRecents="true" line into 'Extra tags for UE4.GameActivity <activity> node'. Re-package and re-deploy.
motorsep
9 years agoMember
Alright, got my debugging setup working. Here is the link to logcat file and a screenshot showing my app still running even though I exited to Oculus Home and then removed device from Gear VR:
Logcat file: https://drive.google.com/open?id=0BwE6dxM0O2PseEhCN2ZTM0c4OWs
Basically what I did was I turned on developer mode for Gear VR Service, ran adb logcat -c, then adb logcat -s UE4 OVR VrApi VrLib VRSVC HmdInfo >logoutput.txt, then I opened my app, put phone into GVR, looked around once, short-pressed back button on GVR, got Exit to Oculus Home prompt, said Yes, waited until Oculus Store/Home is loaded, took off GVR and removed phone from it.
Oh, and VR Service Version is now 2.4.29 / 242900000 MAIN / 6/22/11 10:25 PM
Logcat file: https://drive.google.com/open?id=0BwE6dxM0O2PseEhCN2ZTM0c4OWs
Basically what I did was I turned on developer mode for Gear VR Service, ran adb logcat -c, then adb logcat -s UE4 OVR VrApi VrLib VRSVC HmdInfo >logoutput.txt, then I opened my app, put phone into GVR, looked around once, short-pressed back button on GVR, got Exit to Oculus Home prompt, said Yes, waited until Oculus Store/Home is loaded, took off GVR and removed phone from it.
Oh, and VR Service Version is now 2.4.29 / 242900000 MAIN / 6/22/11 10:25 PM
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 month ago