-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Android App Freeze At Second Launch #12932
Comments
Hi @ffreality My research of the RealSense Android wrapper's Java source code indicates that when a Close void is used, the instruction
Here is an example of using this mechanism in the Android wrapper's source code. |
Line 51 in ff8a9fb
But shouldn't this close |
If an app is closed down then RsContext should be able to be initialized again on the next launch with |
Yes but it somehow affect whole engine's activity. I can't even start my app for second time after I use RealSense |
Okay something weird happened. Samsung Galaxy S23 Android 14 has this problem but on Oculus/Meta Quest Pro (Android 12) I can start app as much as I want. There is no freeze after first usages. I think there is problem with Android 14. What do you think ? |
There is precedent from 2021 for incompatibility between the RealSense Android wrapper and the chipset in some Samsung models, as described at #8442 (comment) In the current latest 2.55.1 SDK, support for Android 12 was added. Official Android 13 and 14 support has not yet been implemented in the SDK. Please see #10965 for notes about the Android 12 support addition. There have been a couple of past reports of unofficial Android 13 use. For one user it worked on their Android 13 device and for the other it did not work. |
I packaged for SDK API Level 30 and tried to run on Samsung Android 14. Btw. if I package project with API level 32, I got crash at when I try to run Rs_Context init function. But it can be related with Samsung, too. When Meta release 5.4.1 version of their specialized branch, I will try to package a mixed reality project with API level 32 and look logs. |
Thanks very much for the information! |
Okay, problem was about Samsung. |
It's great to hear that you were successful. Thanks so much for your ongoing work on the UE5 plugin! |
Issue Description
Hi, I built librealsense2.so for Android, integrated to UE5, packaged app as APK and installed to my Android device (Samsung Galaxy S23). I can open app for the first time and use it without problem. But after closing it, I can't open it again without restarting my Android device.
Unreal Engine just stuck at splash screen.
In order to test it, I set some delay before running actual C/C++ codes to get device list, device and stream.
I found out that RsContext initialization has problem. I am not Java programmer.
So, I could did some mistakes. I think I need somehow close or destruct RsContext at app close.
I call
RealSense_Destruct
with JNI at Event Destruct but it doesn't help at all.This is my plugin and it's Java side.
https://github.com/FF-Plugins-Active/FF_RealSense/blob/main/Source/FF_RealSense/Private/Java/FF_RealSense.java
Do you have any suggestion ?
The text was updated successfully, but these errors were encountered: