Forum Discussion
Ezhbasheil
2 years agoExplorer
Can't make SQLite work in the headset
Hello everyone, I'm making a small VR game in Unity for the Quest 2 and I'm facing some problems to manage the data saved. I decided to use SQLite because this game is to try to take an exam in my c...
Anton111111
2 years agoExpert Protege
I think you need read logcat to check Exception. With Exception you will be able to find solution.
- Ezhbasheil2 years agoExplorer
That's what I tried to do (https://drive.google.com/file/d/1JTPtdkT1oxqSKiBFRqgu8r3eGgmjisTX/view?usp=sharing).
I was wondering if it was due to OVRLibrary null cursor received for query content://com.oculus.ocms.library/apps/com.Ezhbasheil.Sports
or
UnityMain type=1400 audit(0.0:3582): avc: denied { read } for name="u:object_r:vendor_board_init_prop:s0" dev="tmpfs" ino=11434 scontext=u:r:untrusted_app:s0:c108,c256,c512,c768 tcontext=u:object_r:vendor_board_init_prop:s0 tclass=file permissive=0
or
ClientMgrClientMgr::GetClientPermissionFlagsById: Client missing proper permissions: com.Ezhbasheil.Sports, 4ClientMgrClientMgr::GetClientPermissionFlagsById: Client missing proper permissions: com.Ezhbasheil.Sports, 64
ClientMgr::GetClientPermissionFlagsById: Client missing proper permissions: com.Ezhbasheil.Sports, 2
But I can't find anything about that online except some threads without any answers...
The first red line is:
runtime.cc:669] native: #10 pc 000000000001ffd0 /data/app/~~3Wp36mnmxoaOZUmG-hIrWw==/com.Ezhbasheil.Sports-jQ4rhKAO3V7jcXO8Gp2GdA==/lib/arm64/libsqlite3.so (android::register_android_database_SQLiteConnection(_JNIEnv*)+100) (BuildId: 0f10
And I can't make any sense of it...
Here's my manifest:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:installLocation="auto"> <application android:label="@string/app_name" android:icon="@mipmap/app_icon" android:allowBackup="false"> <activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:launchMode="singleTask" android:name="com.unity3d.player.UnityPlayerActivity" android:excludeFromRecents="true" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.INFO" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="com.oculus.intent.category.VR" /> </intent-filter> <meta-data android:name="com.oculus.vr.focusaware" android:value="true" /> </activity> <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" /> <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only" /> <meta-data android:name="com.oculus.ossplash.background" android:value="black" /> <meta-data android:name="com.oculus.supportedDevices" android:value="quest2|questpro" /> </application> <uses-permission android:name="com.oculus.permission.READ_VR_DEVICE_PARAMS" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" /> </manifest>And my method that is supposed to load the database:
private void Awake() { #if UNITY_ANDROID if (!Permission.HasUserAuthorizedPermission(Permission.ExternalStorageWrite)) Permission.RequestUserPermission(Permission.ExternalStorageWrite); if (!Permission.HasUserAuthorizedPermission(Permission.ExternalStorageRead)) Permission.RequestUserPermission(Permission.ExternalStorageRead); #endif _connectionString = $"URI=file:{Path.Combine(Application.persistentDataPath, "data.db")}"; _dbConnection = new SqliteConnection(_connectionString); _dbConnection.Open(); InitializeDatabase(); if (IsUsersTableEmpty()) { CurrentUser = new(); InsertUser(CurrentUser); } else RetrieveUser(); }I went to see the permissions for the app in the settings on my Quest 2 and saw that the perm for storage was granted. I'm honestly getting really desperate, so if anyone has any idea I would love to know
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
- 4 years ago