cariuslars / ar_flutter_plugin Goto Github PK
View Code? Open in Web Editor NEWFlutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
License: MIT License
Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
License: MIT License
Hello! Please tell me how to load the model saved to the device? ArNode.uri
supports only assets and links.
How I can apply a basic animation to a 3d model?.
I try to add the animation directly in the 3d file, but this doesn´t work, and then I tried to applied in code, but I don´t know how to achieve this effect using Tweens animations...
Any one can help me?
I would like to achieve the effect of al 3d model rotating around it own Z axi.
Thanks
It is a bug that I have known before, but it only raises issues now.
An error is occurring in a specific glb file.
I tried to solve this problem for months, but I couldn't.
Do you think we can solve it?
I upload glb file. please check this.
dur val: 4.9083333
dur val: 4.9166665
dur val: 4.9416666
dur val: 4.9583335
dur val: 5.0
iterateBufferView: byteStride: 12
iterateBufferView: byteStride: 64
boneIndices dataStride: 8
Swift/ContiguousArrayBuffer.swift:580: Fatal error: Index out of range
Swift/ContiguousArrayBuffer.swift:580: Fatal error: Index out of range
_swift_runtime_on_report libswiftCore.dylib
_swift_runtime_on_report:_swift_reportToDebugger: 0x185a86d80 <+0>: b 0x185a86d7c ; _swift_runtime_on_report libswiftCore.dylib
_swift_shouldReportFatalErrorsToDebugger:for inspiration see https://github.com/olexale/arkit_flutter_plugin (iOS) and https://github.com/giandifra/arcore_flutter_plugin (Android) --> the platform-specific implementations can be used as a base to work from and should be wrapped with a common Flutter API
I was able to delete the last insert object with the code below, but i wanted to delect the current selected object, it would be appreciated if you can provide me a sample code of delete current selected object, thanks.
Future onRemoveSingle() async {
this.arAnchorManager.removeAnchor(this.anchors.last);
}
While trying to load my own gtlf
model, an "Unable to load renderable [assetLocation]" snackbar pops up, and an exception is printed into the console. I thought maybe it was the model itself, so I substituted it for the Chicken
model in one of the example projects only to get the same exception. I double checked pubspec.yaml
for correct asset path declaration.
It is working swimmingly when using web models.
Code is identical to the one in LocalAndWebObjectsWidget
in the example project (after fixing null safety issues).
No issues with flutter doctor.
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.19043.1320], locale en-AE)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Community Edition (version 2021.2)
[√] VS Code (version 1.63.2)
[√] Connected device (3 available)
Exception
I/BufferQueueProducer(21345): [ImageReader-640x480f23u3m16-21345-5](this:0x77bafb9000,id:8,api:4,p:614,c:21345) queueBuffer: fps=29.68 dur=1010.75 max=39.46 min=27.91
D/BufferQueueProducer(21345): [SurfaceTexture-0-21345-2](this:0x77bc8db800,id:7,api:1,p:540,c:21345) cancelBuffer: slot 1
D/BufferQueueProducer(21345): [SurfaceTexture-0-21345-2](this:0x77bc8db800,id:7,api:1,p:540,c:21345) cancelBuffer: slot 0
D/io.carius.lars.ar_flutter_plugin.AndroidARView(21345): AndroidARView onobjectmethodcall reveived a call!
E/ModelRenderable(21345): Unable to load Renderable registryId='flutter_assets/Models/Chicken_01/Chicken_01.gltf'
E/ModelRenderable(21345): java.util.concurrent.CompletionException: java.util.concurrent.CompletionException: java.io.FileNotFoundException: flutter_assets/Models/Chicken_01/Chicken_01.gltf (No such file or directory)
E/ModelRenderable(21345): at com.google.ar.sceneform.utilities.SceneformBufferUtils.inputStreamToByteBuffer(SourceFile:48)
E/ModelRenderable(21345): at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.lambda$downloadAndProcessRenderable$0$LoadRenderableFromSfbTask(LoadRenderableFromSfbTask.java:118)
E/ModelRenderable(21345): at com.google.ar.sceneform.rendering.-$$Lambda$LoadRenderableFromSfbTask$A8YYsoT3V_A--F80fBJ_ZLNSnhc.get(Unknown Source:4)
E/ModelRenderable(21345): at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1625)
E/ModelRenderable(21345): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/ModelRenderable(21345): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/ModelRenderable(21345): at java.lang.Thread.run(Thread.java:764)
E/ModelRenderable(21345): Caused by: java.util.concurrent.CompletionException: java.io.FileNotFoundException: flutter_assets/Models/Chicken_01/Chicken_01.gltf (No such file or directory)
E/ModelRenderable(21345): at com.google.ar.sceneform.assets.RenderableSource.downloadUri(Unknown Source:26)
E/ModelRenderable(21345): at com.google.ar.sceneform.assets.RenderableSource.call(Unknown Source:53)
E/ModelRenderable(21345): at com.google.ar.sceneform.assets.RenderableSource.call(Unknown Source:0)
E/ModelRenderable(21345): at com.google.ar.sceneform.utilities.SceneformBufferUtils.inputStreamToByteBuffer(SourceFile:42)
E/ModelRenderable(21345): ... 6 more
E/ModelRenderable(21345): Caused by: java.io.FileNotFoundException: flutter_assets/Models/Chicken_01/Chicken_01.gltf (No such file or directory)
E/ModelRenderable(21345): at java.io.FileInputStream.open0(Native Method)
E/ModelRenderable(21345): at java.io.FileInputStream.open(FileInputStream.java:231)
E/ModelRenderable(21345): at java.io.FileInputStream.<init>(FileInputStream.java:165)
E/ModelRenderable(21345): at com.google.ar.sceneform.utilities.LoadHelper.lambda$fileUriToInputStreamCreator$1$LoadHelper(SourceFile:128)
E/ModelRenderable(21345): at com.google.ar.sceneform.utilities.a.call(Unknown Source:6)
E/ModelRenderable(21345): at com.google.ar.sceneform.assets.RenderableSource.downloadUri(Unknown Source:13)
E/ModelRenderable(21345): ... 9 more
I/BufferQueueProducer(21345): [SurfaceTexture-0-21345-2](this:0x77bc8db800,id:7,api:1,p:540,c:21345) queueBuffer: slot 2 is dropped, handle=0x781874f400
I/flutter (21345): [Unable to load renderableModels/Chicken_01/Chicken_01.gltf]
D/BufferQueueProducer(21345): [SurfaceTexture-0-21345-2](this:0x77bc8db800,id:7,api:1,p:540,c:21345) cancelBuffer: slot 2
I/BufferQueueProducer(21345): [SurfaceTexture-0-21345-2](this:0x77bc8db800,id:7,api:1,p:540,c:21345) queueBuffer: fps=29.59 dur=1047.61 max=67.62 min=16.23
pubspec.yaml
....
assets:
- images/triangle.png
- Models/Chicken_01/
....
Project file structure, just to make sure.
EDIT:
Code
// Called on button press.
Future<void> onLocalObjectAtOriginButtonPressed() async {
clearAllObjects(); // Clears all objects in arObjectManager
var newNode = ARNode(
type: NodeType.localGLTF2, // also tried NodeType.fileSystemAppFolderGLTF2,
uri: "Chicken_01.gltf", // also tried "Models/Chicken_01/Chicken_01.gltf"
scale: vector.Vector3(0.2, 0.2, 0.2),
rotation: vector.Vector4(1.0, 0.0, 0.0, 0.0),
transformation: myTransformation,
);
bool didAddLocalNode = await arObjectManager.addNode(newNode) ?? false;
testNodes.local = (didAddLocalNode) ? newNode : null;
}
The doc isn't clear enough and the example app does not work, idk how to use the package in a flutter app
Hi,
I want to convert screen pixel position to Vector3 like this stackoverflow: https://stackoverflow.com/questions/68062935/sceneform-getting-vector3-position-from-screen-pixel-position
Please let me know if it's possible or not.
Thanks!
I'm using ar_flutter_plugin: ^0.6.0
In the app I make, I turn off and turn on AR several times.
However, even if I pop after using AR, the camera connection will not be disconnected.
In fact, the green dot does not disappear in the upper right corner.
If you do this action about 12 times on my iPhone 12 pro max, the app will be shut down with this error
at the same, my Galaxy s21 do this action about 25~30 times.
___lldb_unnamed_symbol5156$$AppleCV3D + 1848 AppleCV3D
___lldb_unnamed_symbol5156$$AppleCV3D:I have confirmed that the camera is disposed through the internal library, but it is estimated that the mobile phone's resources are used continuously without actually disconnecting.
Perhaps the same phenomenon is expected in the sample app. Is there anything I'm missing?
Errors are occurring in the same way as Android and iOS.
my flutter doctor -v
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.5.2 20G95 darwin-x64, locale
ko-KR)
• Flutter version 2.5.3 at /Users/dev_koo/Downloads/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (6 weeks ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/dev_koo/Library/Android/sdk
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for
more details.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.0, Build version 13A233
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio1.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.62.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
Hi,
Our model file is over 50MB and in GLD format that it always throw out of mem exception when loading the model.
Do you have any idea to help us fix it? (setting android:largeHeap="true" is the same).
We have tried by converting that GLD file to GLTF format, and it works fine. But it seems it only work when we put the GLTF file to asset folder. If we change to use custom file location, it throws File not found exception. Do you have any idea to fix it?
Really appreciate for your help!
Hello, I would like to know how to have a 3D model with his animation. Currently if I use an animated glb model, it will appear but will not be animated. Do you know what solution I could use ?
Hello! Can you answer me please, how to add the widget on ARView, pls:)
I just didn't find some functions...
I know this crash has been fixed from #59 ,748691c92. Closing and opening the ar screen second time app gets crash .
Logs :
D/io.carius.lars.ar_flutter_plugin.AndroidARView(27771): onActivityStopped
I/FilePickerUtils(27771): Caching from URI: content://com.android.providers.downloads.documents/document/msf%3A29
2
D/io.carius.lars.ar_flutter_plugin.AndroidARView(27771): onActivityStarted
D/io.carius.lars.ar_flutter_plugin.AndroidARView(27771): onActivityResumed
I/native (27771): I1222 15:52:04.847192 27771 camera_config_manager.cc:719] UpdateBugFixes on CameraConfigManager is unimplemented!
I/native (27771): I1222 15:52:04.847241 27771 session.cc:1202] Entering Session::Resume.
I/native (27771): I1222 15:52:04.852603 27771 estimator_impl.cc:721] Resetting motion tracking from user request.
I/native (27771): I1222 15:52:04.858020 27771 session.cc:3330] Update Frame Delay to 0 frames.
I/native (27771): I1222 15:52:04.858123 27771 android_sensors.cc:212] Starting thread.
I/native (27771): I1222 15:52:04.862913 27771 logger.h:28] DataSourceMetrics: kStartImageSubSystem: 2.452828ms
I/native (27771): I1222 15:52:04.862952 27771 session.cc:1390] Session::ResumeWithAnalytics returning OK.
D/io.carius.lars.ar_flutter_plugin.AndroidARView(27771): onActivityResumed
I/native (27771): I1222 15:52:04.863401 27771 camera_config_manager.cc:719] UpdateBugFixes on CameraConfigManager is unimplemented!
I/native (27771): I1222 15:52:04.863468 27771 session.cc:1202] Entering Session::Resume.
I/native (27771): I1222 15:52:04.865397 27771 estimator_impl.cc:721] Resetting motion tracking from user request.
I/native (27771): I1222 15:52:04.390889 28425 android_sensors.cc:51] Gyro min delay 10ms requesting 10ms
I/native (27771): I1222 15:52:04.874503 27771 session.cc:3330] Update Frame Delay to 0 frames.
I/native (27771): I1222 15:52:04.874590 27771 android_sensors.cc:212] Starting thread.
I/native (27771): I1222 15:52:04.393453 28425 android_sensors.cc:51] Accel min delay 10ms requesting 10ms
I/native (27771): I1222 15:52:04.879467 27771 logger.h:28] DataSourceMetrics: kStartImageSubSystem: 4.731486ms
I/native (27771): I1222 15:52:04.879560 27771 session.cc:1390] Session::ResumeWithAnalytics returning OK.
D/FilePickerUtils(27771): File loaded and cached at:/data/user/0/com.cart.app/cache/file_picker/Duck.glb
I/native (27771): I1222 15:52:04.881649 27771 session.cc:3330] Update Frame Delay to 0 frames.
D/eglCodecCommon(27771): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(27771): eglCreateContext: 0xec07ec20: maj 3 min 0 rcv 3
D/FilePickerDelegate(27771): File path:[com.mr.flutter.plugin.filepicker.FileInfo@1207d4e]
I/native (27771): I1222 15:52:04.669596 28427 android_sensors.cc:51] Gyro min delay 10ms requesting 10ms
I/native (27771): I1222 15:52:04.671104 28427 android_sensors.cc:51] Accel min delay 10ms requesting 10ms
D/EGL_emulation(27771): eglMakeCurrent: 0xec07ec20: ver 3 0 (tinfo 0xd5bca860)
D/EGL_emulation(27771): eglMakeCurrent: 0xc1c6a340: ver 3 0 (tinfo 0xd5bca860)
D/AndroidRuntime(27771): Shutting down VM
E/AndroidRuntime(27771): FATAL EXCEPTION: main
E/AndroidRuntime(27771): Process: com.cart.app, PID: 27771
E/AndroidRuntime(27771): java.lang.NullPointerException
E/AndroidRuntime(27771): at com.google.ar.sceneform.utilities.Preconditions.checkNotNull(SourceFile:3)
E/AndroidRuntime(27771): at com.google.ar.sceneform.Scene.setUseHdrLightEstimate(SourceFile:101)
E/AndroidRuntime(27771): at com.google.ar.sceneform.ArSceneView.updateNormalLightEstimate(SourceFile:204)
E/AndroidRuntime(27771): at com.google.ar.sceneform.ArSceneView.updateLightEstimate(SourceFile:136)
E/AndroidRuntime(27771): at com.google.ar.sceneform.ArSceneView.onBeginFrame(SourceFile:124)
E/AndroidRuntime(27771): at com.google.ar.sceneform.SceneView.doFrameNoRepost(SourceFile:90)
E/AndroidRuntime(27771): at com.google.ar.sceneform.SceneView.doFrame(SourceFile:86)
E/AndroidRuntime(27771): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:964)
E/AndroidRuntime(27771): at android.view.Choreographer.doCallbacks(Choreographer.java:790)
E/AndroidRuntime(27771): at android.view.Choreographer.doFrame(Choreographer.java:721)
E/AndroidRuntime(27771): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:951)
E/AndroidRuntime(27771): at android.os.Handler.handleCallback(Handler.java:883)
E/AndroidRuntime(27771): at android.os.Handler.dispatchMessage(Handler.java:100)
E/AndroidRuntime(27771): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(27771): at android.app.ActivityThread.main(ActivityThread.java:7356)
E/AndroidRuntime(27771): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(27771): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/AndroidRuntime(27771): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
E/CameraCaptureSession(27771): Session 0: Failed to create capture session; configuration failed
E/CameraCaptureSession(0)(27771): Failed to configure session.
E/ConfiguringCameraController(0)(27771): Capture session encountered error: CaptureSessionErrorEvent(type=DEVICE_ERROR)
W/CameraDevice(0)(27771): Device disconnected.
W/ClosingCameraController(0)(27771): Saw device error, nothing to be done since already closing: DeviceErrorEvent(errorType=ERROR_CAMERA_DISCONNECTED)
I/native (27771): I1222 15:52:05.152975 28393 logger.h:28] DataSourceMetrics: kFirstGlCallback: 278.239156ms
I/native (27771): I1222 15:52:04.928262 28126 timebase_helpers.cc:169] Timebase offset intialized to 0
I/native (27771): I1222 15:52:04.928324 28126 logger.h:28] DataSourceMetrics: kFirstImageCallback: 53.578094ms
W/native (27771): W1222 15:52:04.949572 28382 vio_initializer.cc:492] Dropped initialization window due to skip in data.
E/native (27771): E1222 15:52:04.949599 28380 epipolar_self_consistency_metrics.cc:164] Failed to create pose node for current timestamp 16951286704780
I/native (27771): I1222 15:52:04.950293 28384 data_manager.cc:157] Mapping backend detected fault.
I/native (27771): I1222 15:52:04.950435 28384 data_manager.cc:159] Saving current map to map buffer.
I/native (27771): I1222 15:52:04.950591 28384 data_manager.cc:165] Generated map # 0, ID d3bab492-0f27-2c7b-9a96-e0f4a219d1e8, non-marginalized keyframes 17, landmarks 0
W/native (27771): W1222 15:52:05.251869 28386 motion_tracking_context.cc:1524] Unable to find measurements corresponding to VIO status at timestamp 16951604053780.
I/native (27771): I1222 15:52:05.939667 28126 camera_timestamp_corrector.cc:251] IMU-camera rough initial offset for camera 0 initialized to -3307106649420
D/TransportRuntime.SQLiteEventStore(27771): Storing event with priority=HIGHEST, name=FIREBASE_CRASHLYTICS_REPORT for destination cct
I/native (27771): I1222 15:52:05.561000 28428 performance_monitor.cc:115] Event: FeatureExtraction is taking too long, it took 291.518ms
D/TransportRuntime.JobInfoScheduler(27771): Scheduling upload for context TransportContext(cct, HIGHEST, MSRodHRwczovL2NyYXNobHl0aWNzcmVwb3J0cy1wYS5nb29nbGVhcGlzLmNvbS92MS9maXJlbG9nL2xlZ2FjeS9iYXRjaGxvZ1xBSXphU3lCcnBTWVQ0RkZMMDlyZUhKaTZIOUZZZGVpU25VVE92Mk0=) with jobId=638594704 in 1000ms(Backend next call timestamp 1640167576087). Attempt 1
I/Process (27771): Sending signal. PID: 27771 SIG: 9
Lost connection to device.
Note : Tested from example
Tested Android
✅ emulator
✅ physical
Hello.
I have this issue when i want to run the exemple available in this git directory. But i have this issue when i want to test in IOS 15.2 on iphone 13 :
2021-12-30 13:35:16.420 xcodebuild[53516:26525348] [MT] PluginLoading: Required plug-in compatibility UUID 7A3A18B7-4C08-46F0-A96A-AB686D315DF0 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
I tried to update the packages in this package's directory pubspec.yaml file and also in the exemple's directory pubspec.yaml file but the issue steel.
Do you have some solution to solve this issue ? Alcatraz is an unavailable and obsolete/deprecated plugin .
Thank you very much in advance.
Regards.
This is affecting many packages and I have been battling it with other things like location
but in this case it seems to be related to play-services-auth
. You may not notice this until you clear the gradle cache in Android Studio and it attempts to download files from the specified repository. It wants to use https://google.bintray.com but for some reason this server is now dead. Here's the compilation error:
[ +192 ms] FAILURE: Build failed with an exception.
[ +2 ms] * What went wrong:
[ ] Execution failed for task ':app:checkDebugAarMetadata'.
[ ] > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
[ ] > Could not resolve com.google.android.gms:play-services-auth:16+.
[ ] Required by:
[ ] project :app > project :ar_flutter_plugin
[ ] > Failed to list versions for com.google.android.gms:play-services-auth.
[ +1 ms] > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-auth/maven-metadata.xml.
[ ] > Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-auth/maven-metadata.xml'.
[ ] > Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-auth/maven-metadata.xml'. Received status code 502 from server: Bad
Gateway
[ +6 ms] * Try:
[ ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[ ] * Get more help at https://help.gradle.org
[ ] BUILD FAILED in 30s
You can see the error is related to its inability to pull the code from the server:
Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-auth/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
The example class LocalAndWebObjectsWidget() does not cater for null safety.
this.localObjectNode = null; // error 'Null' can't be assigned to a variable of type 'ARNode'
bool didAddFileSystemNode = await this.arObjectManager.addNode(newNode); // error bool not bool?
Above are some examples.
My pubspec.yaml environment is:
environment:
sdk: ">=2.12.0 <3.0.0"
How do I fix this? Thank you.
Reality composer
Hi @rubenteste,
thanks for your PR. A quick note before I comment on Reality Composer: Your PR does not add any code, so I'd suggest moving this conversation to an Issue.
Reality Composer is great app for creating scenes and models, but it's not a feature of an iOS AR app, rather a means to create and export the models then used by the app. I agree that importing a .rcproject
file is very convenient, however, it is highly specific to iOS. The Flutter AR Plugin aims to provide cross-platform functionality, so adding a feature that works under iOS only makes no sense. For this reason, I decided to go with .GLTF and .GLB models first to offer a common format. The plugin currently uses Sceneform to handle 3D models for ARCore, which can deal with model formats like .obj
, .glTF
, and .fbx
. If you find a way to appropriately convert scenes and models from Reality Composer to be used with Sceneform and ARCore as well, feel free to implement it and create a PR, that would be a great feature! Exporting to USDZ
format first could be a starting point worth looking into.
Best regards,
Lars
Originally posted by @CariusLars in #3 (comment)
Ok, it makes sense, I thought that reality composer could be implemented for android and not just iOS.
Are you thinking of implementing some anchor functionality in an image to place an object? as well as after that to be able to rotate the object and zoom in on the object?
Thanks.
Most of my 3D models does not appear in the view widget
For unknown reasons, only 1 of 10 models appears in the ARView(gltf)
I use type: NodeType.webGLB and type: NodeType.localGLTF2 models (*.glb , *.gltf appropriately)
No errors no warnings
For gltf
[ +142 ms] flutter: iOS platform view created!
[ +174 ms] flutter: [ObjectTEST from iOS]
For glb
[ +153 ms] flutter: iOS platform view created!
[ +49 ms] flutter: [ObjectTEST from iOS]
[ +131 ms] Async Model Downloading Task completed: finished
client:
IOS 14.7.1 IPHONE SE(old model)
environment:
ar_flutter_plugin: ^0.6.1
Flutter (Channel master, 2.6.0-12.0.pre.675, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-UA)
Xcode - develop for iOS and macOS (Xcode 12.4)
VS Code (version 1.48.2)
Please help to solve the issue, my project strongly relies on the AR objects displayed
Animated 3D models appears with animation only if type: NodeType.webGLB used for ARNode object. In other cases models are not animated or not displayed at all
In case I use type: NodeType.localGLTF2, type:NodeType.fileSystemAppFolderGLB, NodeType.fileSystemAppFolderGLTF2 some models are displayed without animation(static) and some models are not displayed at all.
No errors, no warnings displayed
The model below IS displayed without animation with
type:NodeType.localGLTF2,
type:NodeType.fileSystemAppFolderGLB,
type:NodeType.fileSystemAppFolderGLTF2
And is displayed animated in case we use type: NodeType.webGLB
https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2FAlien.glb?alt=media&token=fffd9db1-dcc5-4dae-bb1f-95d7ea867817
The model below is NOT displayed at all in case we use
type:NodeType.localGLTF2,
type:NodeType.fileSystemAppFolderGLB,
type:NodeType.fileSystemAppFolderGLTF2
And is displayed animated in case we use type: NodeType.webGLB
https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fvelociraptor.glb?alt=media&token=565d3c81-b0b8-4c77-812a-469d706ca242
So the point is to make models to be displayed animated from the local storage not only from the web
client:
IOS 14.7.1 IPHONE SE(old model)
environment:
ar_flutter_plugin: ^0.6.1
Flutter (Channel master, 2.6.0-12.0.pre.675, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-UA)
Xcode - develop for iOS and macOS (Xcode 12.4)
VS Code (version 1.48.2)
Please help to solve the issue, the download of large 3d models each time we access the AR page is inappropriate for our project
Google 3A PIXEL XL EMULATOR,
RUNNIG ANY OF THE EXAMPLE CODES PRODUCE THIS ERROR
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionManager.java:58: error: cannot find symbol
status = Environment.isExternalStorageManager()
^
symbol: method isExternalStorageManager()
location: class Environment
....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionManager.java:144: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
^
symbol: variable Q
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionManager.java:250: error: cannot find symbol
if (permission == PermissionConstants.PERMISSION_GROUP_MANAGE_EXTERNAL_STORAGE && Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
^
symbol: variable R
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionManager.java:264: error: cannot find symbol
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && permission == PermissionConstants.PERMISSION_GROUP_MANAGE_EXTERNAL_STORAGE) {
^
symbol: variable R
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionManager.java:266: error: cannot find symbol
Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION,
^
symbol: variable ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION
location: class Settings
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionManager.java:336: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
^
symbol: variable R
location: class VERSION_CODES
C:\Users\Comma\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionManager.java:367: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
^
symbol: variable R
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionManager.java:371: error: cannot find symbol
return Environment.isExternalStorageManager()
^
symbol: method isExternalStorageManager()
location: class Environment
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:33: error: cannot find symbol
case Manifest.permission.ACCESS_BACKGROUND_LOCATION:
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:47: error: cannot find symbol
case Manifest.permission.BIND_CALL_REDIRECTION_SERVICE:
^
symbol: variable BIND_CALL_REDIRECTION_SERVICE
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:60: error: cannot find symbol
case Manifest.permission.ACCESS_MEDIA_LOCATION:
^
symbol: variable ACCESS_MEDIA_LOCATION
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:62: error: cannot find symbol
case Manifest.permission.ACTIVITY_RECOGNITION:
^
symbol: variable ACTIVITY_RECOGNITION
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:64: error: cannot find symbol
case Manifest.permission.MANAGE_EXTERNAL_STORAGE:
^
symbol: variable MANAGE_EXTERNAL_STORAGE
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:72: error: cannot find symbol
case Manifest.permission.BLUETOOTH_SCAN:
^
symbol: variable BLUETOOTH_SCAN
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:74: error: cannot find symbol
case Manifest.permission.BLUETOOTH_ADVERTISE:
^
symbol: variable BLUETOOTH_ADVERTISE
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:76: error: cannot find symbol
case Manifest.permission.BLUETOOTH_CONNECT:
^
symbol: variable BLUETOOTH_CONNECT
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:115: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
^
symbol: variable Q
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:116: error: cannot find symbol
if (hasPermissionInManifest(context, permissionNames, Manifest.permission.ACCESS_BACKGROUND_LOCATION))
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:117: error: cannot find symbol
permissionNames.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
C:\Users\Comma\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:139: error: cannot find symbol
if (android.os.Build.VERSION.SDK_INT > Build.VERSION_CODES.Q && hasPermissionInManifest(context, permissionNames, Manifest.permission.READ_PHONE_NUMBERS)) {
^
symbol: variable Q
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:158: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && hasPermissionInManifest(context, permissionNames, Manifest.permission.BIND_CALL_REDIRECTION_SERVICE))
^
symbol: variable Q
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:158: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && hasPermissionInManifest(context, permissionNames, Manifest.permission.BIND_CALL_REDIRECTION_SERVICE))
^
symbol: variable BIND_CALL_REDIRECTION_SERVICE
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:159: error: cannot find symbol
permissionNames.add(Manifest.permission.BIND_CALL_REDIRECTION_SERVICE);
^
symbol: variable BIND_CALL_REDIRECTION_SERVICE
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:195: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q || (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q && Environment.isExternalStorageLegacy())) {
^
symbol: variable Q
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:195: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q || (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q && Environment.isExternalStorageLegacy())) {
^
symbol: variable Q
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:195: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q || (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q && Environment.isExternalStorageLegacy())) {
^
symbol: method isExternalStorageLegacy()
location: class Environment
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:210: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
^
symbol: variable Q
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:213: error: cannot find symbol
if(hasPermissionInManifest(context, permissionNames, Manifest.permission.ACCESS_MEDIA_LOCATION))
^
symbol: variable ACCESS_MEDIA_LOCATION
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:214: error: cannot find symbol
permissionNames.add(Manifest.permission.ACCESS_MEDIA_LOCATION);
^
symbol: variable ACCESS_MEDIA_LOCATION
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:220: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
^
symbol: variable Q
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:223: error: cannot find symbol
if (hasPermissionInManifest(context, permissionNames, Manifest.permission.ACTIVITY_RECOGNITION))
^
symbol: variable ACTIVITY_RECOGNITION
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:224: error: cannot find symbol
permissionNames.add(Manifest.permission.ACTIVITY_RECOGNITION);
^
symbol: variable ACTIVITY_RECOGNITION
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:235: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && hasPermissionInManifest(context, permissionNames, Manifest.permission.MANAGE_EXTERNAL_STORAGE ))
^
symbol: variable R
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:235: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && hasPermissionInManifest(context, permissionNames, Manifest.permission.MANAGE_EXTERNAL_STORAGE ))
^
symbol: variable MANAGE_EXTERNAL_STORAGE
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:236: error: cannot find symbol
permissionNames.add(Manifest.permission.MANAGE_EXTERNAL_STORAGE);
^
symbol: variable MANAGE_EXTERNAL_STORAGE
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:259: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_SCAN ))
^
symbol: variable S
location: class VERSION_CODES
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:259: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_SCAN ))
^
symbol: variable BLUETOOTH_SCAN
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:260: error: cannot find symbol
permissionNames.add(Manifest.permission.BLUETOOTH_SCAN);
^
symbol: variable BLUETOOTH_SCAN
location: class permission
.....\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:265: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_ADVERTISE ))
^
symbol: variable S
location: class VERSION_CODES
...\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:265: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_ADVERTISE ))
^
symbol: variable BLUETOOTH_ADVERTISE
location: class permission
...\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:266: error: cannot find symbol
permissionNames.add(Manifest.permission.BLUETOOTH_ADVERTISE);
^
symbol: variable BLUETOOTH_ADVERTISE
location: class permission
...\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:271: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_CONNECT ))
^
symbol: variable S
location: class VERSION_CODES
...\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:271: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_CONNECT ))
^
symbol: variable BLUETOOTH_CONNECT
location: class permission
...\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\permission_handler-8.2.2\android\src\main\java\com\baseflow\permissionhandler\PermissionUtils.java:272: error: cannot find symbol
permissionNames.add(Manifest.permission.BLUETOOTH_CONNECT);
^
symbol: variable BLUETOOTH_CONNECT
location: class permission
44 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':permission_handler:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 25s
Exception: Gradle task assembleDebug failed with exit code 1
Flutter Version is 2.5.1
I followed the setting up following this article https://medium.com/flutterdevs/augmented-reality-in-flutter-1153b0ef2758
Nothing seems to help
Launching the plugin on the Android emulator(Android 12) leads to a "failed to create ar session" error
environment:
ar_flutter_plugin: ^0.6.1
Flutter (Channel master, 2.6.0-12.0.pre.675, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-UA)
Xcode - develop for iOS and macOS (Xcode 12.4)
VS Code (version 1.48.2)
Failed to load native library [packageName=com.google.ar.core,libraryName=arcore_c] from remote package:
D/io.carius.lars.ar_flutter_plugin.AndroidARView( 5000): Initializing AndroidARView
I/SceneView( 5000): Optional library com.google.ar.sceneform.animation not present. Sceneform animation disabled
D/io.carius.lars.ar_flutter_plugin.AndroidARView( 5000): ARSceneView session is null. Trying to initialize
I/third_party/arcore/ar/core/android/sdk/session_create.cc( 5000): Entering ArSession_createWithFeatures
I/third_party/arcore/ar/core/android/sdk/session_create.cc( 5000): ARCore Version: SDK build name: 1.22
I/third_party/arcore/ar/core/android/sdk/session_create.cc( 5000): ARCore Version: APK version code: 213210293
I/third_party/arcore/ar/core/android/sdk/session_create.cc( 5000): Dynamite load ok.
I/third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc( 5000): Attempting to load native library arcore_c from package com.google.ar.core
E/DynamiteClient( 5000): Failed to load native library [packageName=com.google.ar.core,libraryName=arcore_c] from remote package:
E/DynamiteClient( 5000):
E/DynamiteClient( 5000): java.lang.IllegalStateException: Library arcore_c loaded in the same classloader context as library null
E/DynamiteClient( 5000): at com.google.vr.dynamite.NativeLibraryLoader.initializeAndLoadNativeLibrary(PG:1)
E/DynamiteClient( 5000): at faa.A(PG:6)
E/DynamiteClient( 5000): at abm.onTransact(PG:3)
E/DynamiteClient( 5000): at android.os.Binder.transact(Binder.java:1064)
E/DynamiteClient( 5000): at com.google.a.a.a.b(BaseProxy.java:2)
E/DynamiteClient( 5000): at com.google.vr.dynamite.client.b.initializeAndLoadNativeLibrary(INativeLibraryLoader.java:3)
E/DynamiteClient( 5000): at com.google.vr.dynamite.client.DynamiteClient.loadNativeRemoteLibrary(DynamiteClient.java:8)
E/DynamiteClient( 5000): at com.google.ar.core.Session.nativeCreateSessionAndWrapperWithFeatures(Native Method)
E/DynamiteClient( 5000): at com.google.ar.core.Session.(Session.java:11)
E/DynamiteClient( 5000): at com.google.ar.core.Session.(Session.java:4)
E/DynamiteClient( 5000): at io.carius.lars.ar_flutter_plugin.AndroidARView.onResume(AndroidARView.kt:395)
E/DynamiteClient( 5000): at io.carius.lars.ar_flutter_plugin.AndroidARView.(AndroidARView.kt:337)
E/DynamiteClient( 5000): at io.carius.lars.ar_flutter_plugin.AndroidARViewFactory.create(AndroidARViewFactory.kt:14)
E/DynamiteClient( 5000): at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:186)
E/DynamiteClient( 5000): at android.app.Dialog.dispatchOnCreate(Dialog.java:424)
E/DynamiteClient( 5000): at android.app.Dialog.show(Dialog.java:318)
E/DynamiteClient( 5000): at android.app.Presentation.show(Presentation.java:279)
E/DynamiteClient( 5000): at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:95)
E/DynamiteClient( 5000): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:48)
E/DynamiteClient( 5000): at io.flutter.plugin.platform.PlatformViewsController$1.createVirtualDisplayForPlatformView(PlatformViewsController.java:212)
E/DynamiteClient( 5000): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:107)
E/DynamiteClient( 5000): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
E/DynamiteClient( 5000): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/DynamiteClient( 5000): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
E/DynamiteClient( 5000): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
E/DynamiteClient( 5000): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/DynamiteClient( 5000): at android.os.Handler.handleCallback(Handler.java:938)
E/DynamiteClient( 5000): at android.os.Handler.dispatchMessage(Handler.java:99)
E/DynamiteClient( 5000): at android.os.Looper.loopOnce(Looper.java:201)
E/DynamiteClient( 5000): at android.os.Looper.loop(Looper.java:288)
E/DynamiteClient( 5000): at android.app.ActivityThread.main(ActivityThread.java:7839)
E/DynamiteClient( 5000): at java.lang.reflect.Method.invoke(Native Method)
E/DynamiteClient( 5000): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/DynamiteClient( 5000): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
I/third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc( 5000): Dynamite::LoadNativeRemoteLibrary handle=0
E/third_party/arcore/ar/core/android/sdk/session_create.cc( 5000): Dynamite failed to load remote library
E/third_party/arcore/ar/core/android/sdk/session_create.cc( 5000): LoadSymbolsDynamite returning AR_ERROR_FATAL.
E/third_party/arcore/ar/core/android/sdk/session_create.cc( 5000): LoadSymbols returning status.
$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "ar_flutter_plugin"
In Podfile:
ar_flutter_plugin (from .symlinks/plugins/ar_flutter_plugin/ios
)
Specs satisfying the ar_flutter_plugin (from
.symlinks/plugins/ar_flutter_plugin/ios)
depency were found, but they required a higher minimum deployment target.
Already set deployment target from 9 to 14
Still error persists
Hello sir, please update ar_flutter_plugin to flutter sdk : 2.10 because im develop app in website flutlab.io.
Thank You.
Is there a better way to debug touch on the view issues.
I am touching but the arhittestresult list gives an empty list for some reason and I am not able to debug it. Here are the logs though
package:ar_flutter_plugin/managers/ar_session_manager.dart:58
E/flutter ( 6512): #3 MethodChannel._handleAsMethodCall
package:flutter/…/services/platform_channel.dart:386
E/flutter ( 6512): #4 MethodChannel.setMethodCallHandler.<anonymous closure>
package:flutter/…/services/platform_channel.dart:379
E/flutter ( 6512): #5 _DefaultBinaryMessenger.setMessageHandler.<anonymous closure>
package:flutter/…/services/binding.dart:379
E/flutter ( 6512): #6 _DefaultBinaryMessenger.setMessageHandler.<anonymous closure>
package:flutter/…/services/binding.dart:376
E/flutter ( 6512): #7 _invoke2.<anonymous closure> (dart:ui/hooks.dart:205:15)
E/flutter ( 6512): #8 _rootRun (dart:async/zone.dart:1428:13)
E/flutter ( 6512): #9 _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter ( 6512): #10 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/flutter ( 6512): #11 _invoke2 (dart:ui/hooks.dart:204:10)
E/flutter ( 6512): #12 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42:5)
E/flutter ( 6512): #13 _Channel.push (dart:ui/channel_buffers.dart:132:31)
E/flutter ( 6512): #14 ChannelBuffers.push (dart:ui/channel_buffers.dart:329:17)
E/flutter ( 6512): #15 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:544:22)
E/flutter ( 6512): #16 _dispatchPlatformMessage (dart:ui/hooks.dart:92:31)
E/flutter ( 6512):
```
Hi @CariusLars
Amazing plugin you're creating, congrats.
I'm new to AR. I was just wondering how can I use your work to add this kind of feature(https://www.youtube.com/watch?v=-wgf6Zvn6rg) to an App. Will it be possible?
Thanks.
Alessandro
Hi Lars, guten tag! Thank you for making this package happen! I have a question: Is it possible to use the argumented face with this package at this stage?
$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "ar_flutter_plugin"
In Podfile:
ar_flutter_plugin (from `.symlinks/plugins/ar_flutter_plugin/ios`)
Specs satisfying the `ar_flutter_plugin (from `.symlinks/plugins/ar_flutter_plugin/ios`)` depency were found, but they required a higher minimum deployment target.
Is it possible to enable ARCore Depth API in this plugin? I have enable the ARCore Cloud Anchor API for my app and it work fine. but it would be fantastic if we can use the ARCore Depth API feature. by the way , i hope you can add the delete selected node function in your example just like the onRemoveEverything function.
Hello! Under Android everything works, but under iOS only the gray rectangle of the platform in the camera is displayed, but the model is not visible. Maybe there should be some additional specific settings for the iOS platform? Similar to AndroidManifest. I tested this example: https://github.com/CariusLars/ar_flutter_plugin/blob/main/example/lib/examples/localandwebobjectsexample.dart.
Hi there,
Perhaps it is happened to me only, I'm facing the following error while running the example with flutter run
on an Android 7 mobile phone:
permission_handler-8.2.5/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java:321: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
^
symbol: variable S
location: class VERSION_CODES
My environment:
[✓] Flutter (Channel stable, 2.5.3, on Ubuntu 20.04.3 LTS 5.4.0-89-generic,
locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version
31.0.0-rc2)
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] VS Code (version 1.61.2)
[✓] Connected device (2 available)
Please advise. Thank you.
thanks for this starting this package, this was quite needed as I recently struggled with implementing AR in my android app.
and that's a very ambitious goal and architecture which I hope to help and see soon come alive.
In the current ar_core_flutter_plugin, it uses scenform, which was the major bottleneck.
I also saw sceneform as a part of this, but also google-ar-core, I wanted to confirm and understand how this is better than the previous implementation and will it truly give flutter the power to utilize all AR features?
P.S, I'd like to get involved more and contribute, it'd be great if you can create discord, gitter, or just open the discussions tab.
How can I edit the scale and rotation of the object after placing it?
Hello, will there be a change in the texture of the model in the future (or has it already been implemented at the moment)
Plane is not detecting in emulator but working in physical device
flutter doctor -v :
[√] Flutter (Channel stable, 2.5.0, on Microsoft Windows [Version 10.0.19043.1288], locale en-IN)
• Flutter version 2.5.0 at D:\OTHER FILES D\CS ALL FOLD\Flutter main sdk\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cc385b4b8 (7 weeks ago), 2021-09-07 23:01:49 -0700
• Engine revision f0826da7ef
• Dart version 2.14.0
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at D:\Android_SDK
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = D:\Android_SDK
• Java binary at: D:\Android studio main\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 2020.3)
• Android Studio at D:\Android studio main
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] VS Code (version 1.53.2)
• VS Code at C:\Users\bhara\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.20.0
[√] Connected device (1 available)
• sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• No issues found!
any help
kotlin plugin error
ar_flutter_plugin-0.6.3\android\src\main\kotlin\io\carius\lars\ar_flutter_plugin\AndroidARViewFactory.kt: (10, 2): Class 'AndroidARViewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory
The community-maintained version of sceneform (https://github.com/ThomasGorisse/sceneform-android-sdk/tree/v1.19.1) seems to be well-maintained with new features like Depth API having been added recently, so it probably makes sense to move from the archived Sceneform to the community-maintained one and include the Depth API in the process
Hi @CariusLars ,
We're facing the crash issue on Android 7.1 (Note 8). App is always crash when it run at background and bring back to foreground (onPause -> onResume) and throw this exception:
E/AndroidRuntime(18270): java.lang.NullPointerException: throw with null exception
E/AndroidRuntime(18270): at com.google.ar.sceneform.utilities.Preconditions.checkNotNull(SourceFile:3)
E/AndroidRuntime(18270): at com.google.ar.sceneform.Scene.setUseHdrLightEstimate(SourceFile:101)
E/AndroidRuntime(18270): at com.google.ar.sceneform.ArSceneView.updateNormalLightEstimate(SourceFile:204)
E/AndroidRuntime(18270): at com.google.ar.sceneform.ArSceneView.updateLightEstimate(SourceFile:136)
E/AndroidRuntime(18270): at com.google.ar.sceneform.ArSceneView.onBeginFrame(SourceFile:124)
E/AndroidRuntime(18270): at com.google.ar.sceneform.SceneView.doFrameNoRepost(SourceFile:90)
E/AndroidRuntime(18270): at com.google.ar.sceneform.SceneView.doFrame(SourceFile:86)
E/AndroidRuntime(18270): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:928)
E/AndroidRuntime(18270): at android.view.Choreographer.doCallbacks(Choreographer.java:705)
E/AndroidRuntime(18270): at android.view.Choreographer.doFrame(Choreographer.java:637)
E/AndroidRuntime(18270): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:916)
E/AndroidRuntime(18270): at android.os.Handler.handleCallback(Handler.java:751)
E/AndroidRuntime(18270): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(18270): at android.os.Looper.loop(Looper.java:154)
E/AndroidRuntime(18270): at android.app.ActivityThread.main(ActivityThread.java:6823)
E/AndroidRuntime(18270): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18270): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
E/AndroidRuntime(18270): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451)
I have tried by adding:
@OverRide
void dispose() {
try {
print("Removeing node");
if (this.localObjectNode != null) {
this.arObjectManager?.removeNode(this.localObjectNode!);
this.localObjectNode = null;
}
} catch(err, stackstrace) {
print(stackstrace);
}
super.dispose();
}
when close the AR popup dialog, but when I leave the app running at background and bring it back to foreground, the above exception is still happening and app crash.
Could you please give us some advice to fix it?
Thanks,
This package helped me a lot, so first, thanks for that!
The problem? I cannot load any model except for the ones from example. Chicken from local and a duck from web. I have 0 knowledge of 3d models and how they work, but I tried to load:
after adding, nodes are registered as added but nothing shows in space, nor are there any error messages.
Using the code from example and only using my models. Also, created a folder and put the .gltf in there while adding the folder path to assets, just as it is with Chicken model.
hi,
when i used localandwebobjectsexample only from your examples and delete all other files for different examples then build apk
size of app be more than 60 mp
why is that and how to reduce it ?
is there any file or things that can i delete to reduce the app size
Hi Everybody. I struggle to find a good replacement for https://github.com/kitcarson88/ionic-augmented-reality so that we could migrate our app from ionic to flutter. Do you have maybe an example of how to detect if in front of you is a GEO POI and show a pin properly on screen?
Couldn't find the Images/triangle.png
asset.
Dear @CariusLars,
Thank you for creating a very useful package.
Are you planning to support geo anchor type?
That would be great for tracking specific geographic areas and displaying them in an AR experience.
I have a few apps for our reference:
Is Augmented Faces - ARCore - IOS functionality supported by this plugin?
https://developers.google.com/ar/develop/ios/augmented-faces/developer-guide
If not then please add Augmented Faces functionality to the plugin
I added a snapshot
method to the ARKit
package for iOS and noticed the ARCore
package also has a snapshot
method that was implemented via a pull request. Would be great to have this functionality included here too. Ideally, it should return a Future<ImageProvider>
so the user can deal with the image themselves once it has been created.
I've seen there is ArCoreImage class in ArCore, I believe same feature is also in ArKit... I didn't find it in this package... Is it possible with some different approach?
hello everyone
so i have some 3d objects that im spawning on a plane on android they have a normal scale but on ios their scale is not the same eventho i set the starting scale to (1,1,1) like so
object = ARNode( type: NodeType.fileSystemAppFolderGLB, uri: 'model.glb', scale: Vector3(prevScale, prevScale, prevScale));
prevScale = 1
here's the model on android
and here's the model on ios from about the same distance
is there wat to use the camera while using this plugin I need it to use my object recognition model
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.