- Cardboard VR Projects for Android
- Jonathan Linowes Matt Schoen
- 303字
- 2021-07-16 10:54:09
Adding the Cardboard Java SDK
Now's a good time to add the Cardboard SDK library .aar
files to your project. For the basic projects in this book the libraries you need (at the time of writing v0.7) are:
common.aar
core.aar
Note
Note the SDK includes additional libraries that we do not use in the projects in this book but could be useful for your projects. The audio.aar
file is for spatialized audio support. The panowidget
and videowidget
libraries are meant for 2D apps that want to drop-into VR for things such as viewing a 360-degree image or video.
At the time of writing, to obtain the Cardboard Android SDK client libraries, you can clone the cardboard-java
GitHub repository, as explained on the Google Developers Cardboard Getting Started page, Start your own project topic at https://developers.google.com/cardboard/android/get-started#start_your_own_project. Clone the cardboard-java
GitHub repository by running the following command:
git clone https://github.com/googlesamples/cardboard-java.git
To use the exact commit with the same SDK version 0.7 we're using here, checkout
the commit:
git checkout 67051a25dcabbd7661422a59224ce6c414affdbc -b sdk07
Alternatively, the SDK 0.7 library files are included with each of the download projects .zip
files from Packt Publishing, and on this book's GitHub projects at https://github.com/cardbookvr.
Once you have local copies of the libraries, be sure to locate them on your filesystem. To add the libraries to our project, take the following steps:
- For each of the required libraries, create new modules. In Android Studio, select File | New | New Module…. Select Import .JAR/.AAR Package:
- Locate one of the AARs and import it.
- Add the new modules as dependencies to your main app by navigating to File | Project Structure | Modules (on the left hand side) | app (your app name) | Dependencies | + | Module Dependency:
Now we can use the Cardboard SDK in our app.
- ATmega16單片機項目驅動教程
- 基于Proteus和Keil的C51程序設計項目教程(第2版):理論、仿真、實踐相融合
- 施耐德SoMachine控制器應用及編程指南
- 硬件產品經理成長手記(全彩)
- 計算機應用與維護基礎教程
- Camtasia Studio 8:Advanced Editing and Publishing Techniques
- 電腦軟硬件維修從入門到精通
- 分布式微服務架構:原理與實戰
- 單片機系統設計與開發教程
- Python Machine Learning Blueprints
- Intel FPGA權威設計指南:基于Quartus Prime Pro 19集成開發環境
- Spring Security 3.x Cookbook
- FPGA實驗實訓教程
- 單片機原理及應用
- 筆記本電腦現場維修實錄