Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Access com.google.vr.sdk.base


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 4 - Last Post: May 9, 2017 2:11 PM Last Post By: Marc Bonnaud
Marc Bonnaud

Posts: 14
Registered: 7/1/16
Access com.google.vr.sdk.base  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 1:13 PM
I was wondering how I should do to access com.google.vr.sdk.base
( https://developers.google.com/vr/android/reference/com/google/vr/sdk/base/package-summary )
in Firemonkey.

I have not seen anything related to it in source\rtl\android.

I would moslty like to retrieve the Google cardboard calibration, with the distortion coefficients k1 and k2, which Paul Toth's example does not use in his cardboard example, using a general formula instead, plus the inter-lens distance.

Those coefficients which are accessed by, e.g., this app :
https://play.google.com/store/apps/details?id=com.anrael.vrcc&hl=fr

Thanks for any insight and explanations, I'm not fluent in Java.

(Of course, I'm using Delphi Berlin, given the problems of Tokyo with Android at the moment.)
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Access com.google.vr.sdk.base
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 1:28 PM   in response to: Marc Bonnaud in response to: Marc Bonnaud
Marc Bonnaud wrote:

I was wondering how I should do to access com.google.vr.sdk.base
( https://developers.google.com/vr/android/reference/com/google/vr/sdk/base/package-summary )
in Firemonkey.

I have not seen anything related to it in source\rtl\android.

Probably because it's an SDK over and above the Android SDK. You can download the VR SDK here:

https://github.com/googlevr/gvr-android-sdk/

The files you'll need are in the libraries folder. The .aar files are in .zip format, and each contains a classes.jar
file that you can extract, rename to something appropriate (eg vr-sdk-audio.jar for the one in sdk-audio-1.40.0.aar),
then use the Java2OP tool:

http://docwiki.embarcadero.com/RADStudio/XE7/en/Java2OP.exe,_the_Native_Bridge_File_Generator_for_Android

To create JNI wrappers for them. No guarantee of success, since not all APIs can be imported properly. Probably a good
idea to start with sdk-base.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Marc Bonnaud

Posts: 14
Registered: 7/1/16
Re: Access com.google.vr.sdk.base  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 1:32 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
Marc Bonnaud wrote:

I was wondering how I should do to access com.google.vr.sdk.base
( https://developers.google.com/vr/android/reference/com/google/vr/sdk/base/package-summary )
in Firemonkey.

I have not seen anything related to it in source\rtl\android.

Probably because it's an SDK over and above the Android SDK. You can download the VR SDK here:

https://github.com/googlevr/gvr-android-sdk/

The files you'll need are in the libraries folder. The .aar files are in .zip format, and each contains a classes.jar
file that you can extract, rename to something appropriate (eg vr-sdk-audio.jar for the one in sdk-audio-1.40.0.aar),
then use the Java2OP tool:

http://docwiki.embarcadero.com/RADStudio/XE7/en/Java2OP.exe,_the_Native_Bridge_File_Generator_for_Android

To create JNI wrappers for them. No guarantee of success, since not all APIs can be imported properly. Probably a good
idea to start with sdk-base.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Thanks, I'll try this.
Marc Bonnaud

Posts: 14
Registered: 7/1/16
Re: Access com.google.vr.sdk.base  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 1:57 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
then use the Java2OP tool:

http://docwiki.embarcadero.com/RADStudio/XE7/en/Java2OP.exe,_the_Native_Bridge_File_Generator_for_Android

To create JNI wrappers for them. No guarantee of success, since not all APIs can be imported properly. Probably a good
idea to start with sdk-base.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

From this page, I'm sent to https://cc.embarcadero.com/myreg
"My Registered User Downloads"
where Java2OP.exe is not listed, although many downloads for Berlin and Tokyo are, plus updates for products starting XE8.

With a Google search, I find this page https://cc.embarcadero.com/item/30007
Where it says I must be registered for anything XE7
But when clicking "download" I get "Sorry, you don't have access to this submission"
Well, true, I am registered only since last May ("Maintenance is from 26/05/2016 to 25/05/2017" says the email from June 2 2016), so not for XE7, but Berlin and Tokyo, but I thought it was backwards-compatible ...

So ?
Marc Bonnaud

Posts: 14
Registered: 7/1/16
Re: Access com.google.vr.sdk.base  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 2:11 PM   in response to: Marc Bonnaud in response to: Marc Bonnaud
Marc Bonnaud wrote:
Dave Nottage wrote:
then use the Java2OP tool:

http://docwiki.embarcadero.com/RADStudio/XE7/en/Java2OP.exe,_the_Native_Bridge_File_Generator_for_Android

To create JNI wrappers for them. No guarantee of success, since not all APIs can be imported properly. Probably a good
idea to start with sdk-base.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

From this page, I'm sent to https://cc.embarcadero.com/myreg
"My Registered User Downloads"
where Java2OP.exe is not listed, although many downloads for Berlin and Tokyo are, plus updates for products starting XE8.

With a Google search, I find this page https://cc.embarcadero.com/item/30007
Where it says I must be registered for anything XE7
But when clicking "download" I get "Sorry, you don't have access to this submission"
Well, true, I am registered only since last May ("Maintenance is from 26/05/2016 to 25/05/2017" says the email from June 2 2016), so not for XE7, but Berlin and Tokyo, but I thought it was backwards-compatible ...

So ?

Ok, another Google search taught me it's in the bin/converters folder, something not mentioned in docwiki...
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02