Closed Lijo0989 closed 3 years ago
@Lijo0989 it's Android crash, right?
Could you display list of files at /storage/emulated/10/Movies/session/
?
Yes, Its android crash.
Following files are used as session data gps.bin frames.bin device.bin camera.bin heading.bin road_description.bin detections.bin signs.bin config.bin fps_snapshots.bin mappings.bin ml_errors.bin motion.bin platform_performance.bin position.bin vcore_statistics.bin video.mp4 vm_statistics.bin world_transform.bin
Adding one more information,The android version which i used is Android 11. Please let me know if any dependency for vision SDK for Android11
You should had faced an issue with updates in Storage APIs, described at https://developer.android.com/about/versions/11/privacy/storage.
Adding
android:requestLegacyExternalStorage="true"
to the AndroidManifest.xml is the easiest workaround
It is already there in the manifest file. Is visionSDK (0.13.0 )will work in android 11 SDK ?
Following to above error, crashes app with log 09-22 12:55:27.709 4652 4652 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8 in tid 4652 (package), pid 4652 (package) 09-22 12:55:27.854 4796 4796 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone 09-22 12:55:27.854 485 485 I tombstoned: received crash request for pid 4652
It is already there in the manifest file. Is visionSDK (0.13.0 )will work in android 11 SDK ?
Yes, Vision should work on Android 11, at least works for me. Internally it works with files via File Java apis, so it should be accessible. Weird that android:requestLegacyExternalStorage="true"
doesnt help.
Where did the session come from? Could you also check size of the .bin files as well as .mp4 from the session?
Session data is stored in /data/media/10/Movies Same session data is works on Android 10 Application.
gps.bin 33KB frames.bin 149.5K device.bin 107B camera.bin 44B heading.bin 747KB road_description.bin 2.1MB detections.bin 17.4K signs.bin 745B config.bin 50B fps_snapshots.bin 3.5K mappings.bin 328B ml_errors.bin 20B motion.bin 1.1MB platform_performance.bin 85B position.bin 14.1KB vcore_statistics.bin 1K video.mp4 456MB vm_statistics.bin 2K world_transform.bin 1.3K
Same session data is works on Android 10 Application.
Also iam using SDK loaded as .aar files(custom 0.13.0) and will it also works for Android 11 right?
Also iam using SDK loaded as .aar files(custom 0.13.0) and will it also works for Android 11 right?
You've downloaded them from https://vision.mapbox.com/install/, right? There should be no problem with .aars. Also, if the app works on Android 10 then it's definitely nothing wrong with integration code of Vision itself, it's file APIs. Could you please show the full AndroidManifest of the app?
Please find the manifest content
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="XXX">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application
android:name=".BaseApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:requestLegacyExternalStorage="true"
android:largeHeap="true"
android:usesCleartextTraffic="true">
<activity
android:name=".ExternalVideoSourceActivity"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SafetyActivity"
android:screenOrientation="landscape" />
<activity
android:name=".ArActivity"
android:screenOrientation="landscape" />
<activity
android:name=".CustomDetectionActivity"
android:screenOrientation="landscape" />
<activity
android:name=".POIActivity"
android:label="@string/poi_example"
android:screenOrientation="landscape" />
<activity
android:name=".UsbVideoSourceActivity"
android:screenOrientation="landscape" >
</activity>
<activity
android:name=".ArCustomizationActivity"
android:screenOrientation="landscape">
</activity>
</application>
@Lijo0989 well, I've looked once again to the Storage API update doc, and it seems that android:requestLegacyExternalStorage worked only on Android 10, and on Android 11 you are limited to :
i also reached the same conclusion that session data should store in Path : /data/user/10/package/files/session
Were you able to fix the issue on the device?
Yes, i can able to run VisionReplayManager on Android11
Okay, closing then
When i try to create VisionReplayManager using existing session data, it always shows error as below
09-22 12:55:27.604 855 855 D MediaBufferGroup: creating MemoryDealer 09-22 12:55:27.623 3784 3852 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/gps.bin 09-22 12:55:27.634 3784 3932 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/motion.bin 09-22 12:55:27.639 3784 3851 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/frames.bin 09-22 12:55:27.643 3784 3852 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/device.bin 09-22 12:55:27.648 3784 3932 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/camera.bin 09-22 12:55:27.653 3784 3851 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/heading.bin 09-22 12:55:27.659 3784 3852 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/road_description.bin 09-22 12:55:27.665 3784 3932 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/detections.bin 09-22 12:55:27.670 3784 3851 E MediaProvider: Couldn't find file: /storage/emulated/10/Movies/session/signs.bin
Expected behavior
it should start replaying based on the recorded session.
Actual behavior
app crashes
Screenshots
If applicable, add screenshots to help explain your problem.