Copyright (c) 2017 Google Inc. All rights reserved.
This is a sample project showing how to invoke the Poly API from an Android app.
Note about rendering: The focus of this sample is showing how to call the Poly API, not showing how to render models. The renderers included in the samples are very basic and only meant as a proof of concept, so they won't work with all assets. See the notes under each sample below for information about what kinds of assets each sample can render.
Before proceeding, you must obtain your API Key from Google Cloud Console as decribed in the documentation. This API Key will allow you to make calls to the Poly API.
PolySampleAndroid
directory.PolyApi.java
file.API_KEY
variable.Depending on which Android SDK modules you have installed, you may need to download additional build tool versions and/or platforms. Android Studio will prompt you as needed during the import process.
Note: The basic renderer included in this sample only supports Blocks objects. It uses the diffuse material color encoded in the MTL file as the color of the material. It does not support lighting or textures.
The ARCore sample in this package is based on the sample for the Google AR SDK for Android. The modification to that sample is that instead of loading an OBJ file from disk, this sample loads the OBJ file using the Poly API.
To run the sample:
PolySampleARCore
directory.PolyApi.java
file.API_KEY
variable.Note: The renderer included in this sample only supports objects with exactly one texture.
For license information, refer to the LICENSE
file.