B4A Library Google VR

Johan Schoeman

Expert
Licensed User
Longtime User
Also using V6.5 and Android 23
 

MarcoRome

Expert
Licensed User
Longtime User

This has been fixed. The most "serious" problem and #5
Thank you for your effort and have nice day
 

Johan Schoeman

Expert
Licensed User
Longtime User
I have tried to "short cut" wrap the panorama view and it comes up with the same error when the B4A project starts i.e java.lang.NoClassDefFoundError: com.google.vrtoolkit.cardboard.proto.nano.CardboardDevice$DeviceParams:
B4X:
LogCat connected to: EA95NNLFUOBE7TJF
--------- beginning of system
--------- beginning of main
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
java.lang.NoClassDefFoundError: com.google.vrtoolkit.cardboard.proto.nano.CardboardDevice$DeviceParams
    at com.google.vr.cardboard.ConfigUtils.readDeviceParamsFromExternalStorage(SourceFile:73)
    at com.google.vr.cardboard.LegacyVrParamsProvider.readDeviceParams(SourceFile:20)
    at com.google.vr.sdk.widgets.common.VrWidgetView.updateViewerName(VrWidgetView.java:741)
    at com.google.vr.sdk.widgets.common.VrWidgetView.updateStereoMode(VrWidgetView.java:497)
    at com.google.vr.sdk.widgets.common.VrWidgetView.resumeRendering(VrWidgetView.java:600)
    at com.google.vr.sdk.samples.simplepanowidget.SimpleVrPanoramaActivity.onResume(SimpleVrPanoramaActivity.java:143)
    at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1267)
    at android.app.Activity.performResume(Activity.java:6186)
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3230)
    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3276)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2619)
    at android.app.ActivityThread.access$800(ActivityThread.java:178)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
    at android.os.Handler.dispatchMessage(Handler.java:111)
    at android.os.Looper.loop(Looper.java:194)
    at android.app.ActivityThread.main(ActivityThread.java:5643)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
 
Last edited:

susu

Well-Known Member
Licensed User
Longtime User
Hope @warwound give me a hint how to compile example.
 

warwound

Expert
Licensed User
Longtime User
Well this is odd...
I installed latest versions of b4a, java 8 and android sdk on a new Win 10 VM.
Then downloaded the Google VR libs from my link in the first post and then the example project.
I copied the 4 .aar library files from my Win 10 desktop to the VM.

Compiled and installed the apk on an API 19 (KitKat) tablet and it works fine.
I compiled twice, once with android API 21 and again with API 25.

The compilation error previously posted starts here:

at imagineear.api.googlevr.widgets.VrWidgetViewWrapper.ResumeRendering(VrWidgetViewWrapper.java:76)

But as i don't get a compilation error where do i start to debug?

All i have in my b4a additional libraries folder (on the VM) are the GoogleVr .jar and .xml files and the 4 .aar files.
I have had a working version of these 4 .aar files on my desktop for a month or two.
Then, just before i decided to upload the GoogleVr library to the forum, i noticed the android GoogleVr library had been updated.
I updated my desktop version using git on the command line (and updated the wrapper to work with the new version).
Is it possible i have the latest versions of these .aars but the older versions have been downloaded from guthub using the link in post #1?

I've zipped and uploaded my 4 .aar files to HERE.
Can one of you try these .aar files?
 

MarcoRome

Expert
Licensed User
Longtime User
Hi @warwound.
With your aar WORK. Also if i have this message when i compile:



Anyway if i comment i have this FANTASTIC result:


Very very good JOB
 

Johan Schoeman

Expert
Licensed User
Longtime User
Your VrPanoramaView1 has been obfuscated into a new name by b4a.

Now your inline java is not referencing the obfuscated name.
OK - got it going on KitKat and Lollipop with the inline Java code being in place! Wow...this is great stuff!







 
Last edited:

warwound

Expert
Licensed User
Longtime User
So what have we established?
That the link in post #1 links to a previous version of the android library.

The android library changelog can be found here:
GVR SDK and NDK for Android v1.10.0

I cloned the repo using github and got a different version from everyone else?
 

MarcoRome

Expert
Licensed User
Longtime User
I don't know what might have happened. But in fact and that the aar libraries 1.10 are fine another no.
Anyway ius important the result and this library is fantastic .
Thank you again
 

hanyelmehy

Active Member
Licensed User
Longtime User
Thank you ,its work now ,can i make view in cardboard mode (also i cant find cardboard icon on image)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…