-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Fixed crash 'java.lang.IllegalArgumentException: Parameter specified …' #63
Conversation
…as non-null is null' E.g. when using Admob (reward ad) after ArCoreView() widget has been initialized. That caused the app to crash due to this bug.
…hod (new) to resume after a pause.
|
||
if (localObject != null) { | ||
Log.e(TAG, "Modified by BrutalCoding - 1"); | ||
if (false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
The LOG should definitly be removed and the false statement was there on purpose I believe, because localObject (fbx, GLTF, obj) were not working for me. In my personal use case, in order to use local objects, I pass an "file://path/to/something.glb" url which works. The example app you've provided with local objects also don't seem to work hence why I've set false in that condition.
Correct me if I'm wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you do want to merge this PR, I would actually remove localObject from Flutter's side too so people can't try it out and see nothing happening.
If localObject does work, I would be curious how. I've used Android Studio and SceneForm plugin to convert my .gltf to .sfa/.sfb but that plugin is completely broken starting from Android Studio 3.6+. I believe that plugin works with 3.5.x but never got the local object working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LOG should definitly be removed and the false statement was there on purpose I believe, because localObject (fbx, GLTF, obj) were not working for me. In my personal use case, in order to use local objects, I pass an "file://path/to/something.glb" url which works. The example app you've provided with local objects also don't seem to work hence why I've set false in that condition.
Correct me if I'm wrong
I use sfb file in my example, The sfb files are generated from build.gradle
If localObject does work, I would be curious how. I've used Android Studio and SceneForm plugin to convert my .gltf to .sfa/.sfb but that plugin is completely broken starting from Android Studio 3.6+. I believe that plugin works with 3.5.x but never got the local object working.
Yes, the sceneform plugin doesn't work good. I'm using 1.15.0 with Android Studio 4.0.1 while Android side i'm using 1.13.0 how you can see here.
I will try different local object format inserted inside src/main/assets directly.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this change and resolve conflicts? So I will accept this PR.
We can discuss about local and asset object in another PR. I would like to edit the properties to use sfb file from assets and local object (GLTF) from path like yo do ("file://path/to/something.glb")
Hi, is this PR alive? The last commit fixes error I suffer in my application. I wonder if I should make my own PR to fix it or if this will be eventually merged. |
@BrutalCoding Can you resolve this? |
Alright I'll fix it this Saturday @giandifra |
🎉🎉🎉 |
Thanks for fixing my leftover mistakes & merging it 👍 |
The onActivityCreated works fine if only ARCore is being used without other plugins that are creating native Activity screen(s), but in my case I was using Admob reward ads and that caused to call this plugin its 'onActivityCreated' too, but with null values. That caused to kill the flutter app instantly.
This commit probably fixes issues with other plugins that are using native Android Activity screen(s), e.g. QR scanners, Admob or Camera. Only tested with Admob reward ads though.