The ScandyCoreAndroidExample
shows how you can use the magic that is Scandy Core in an Android Studio Project.
This sample uses ScandyCore to download a mesh and present it the viewer.
- Install Android Studio
-
if you're on Mac and have
brew
:```bash brew cask install android-studio ```
-
- Open Android Studio
Make sure your Android Studio has all the necesary Android SDK dependencies installed.
* = Optional dependency
In Android Studio go to Tools -> Android -> SDK Manager
From SDK Platforms
tab
- Android 5.0*
- Android 5.1*
- Android 6.0*
- Android 7.0
- Android 7.1.1
From SDK Tools
tab
- Android SDK Build-Tools
- CMake*
- LLDB
- Android SDK Platform-Tools #.#.# (versions change)
- Android SDK Tools #.#.# (versions change)
- Android Support Library, rev #.#.# (versions change)
- NDK*
- Support Repository
- ConstraintLayout for Android
- Solver for ConstraintLayout
- Android Support Repository
- Google Repository
Largely pulled this how from Android Studio docs
-
Open AndroidFragmentDemo
-
Go to:
File -> New -> New Module
-
Select Import .JAR/.AAR Package, then click Next
-
Set:
File name:
Use the...
and navigate to where you downloadedScandyCoreAndroid.aar
and select it.Subproject name:
scandycoreandroid
-
Open
settings.gradle
and make sure it looks like this:include ':app', ':scandycoreandroid'
-
Open
app/build.gradle
-
Make sure it has this in it towards the bottom:
```gradle dependencies { // All your other dependencies up here... compile project(":scandycoreandroid") } ```
-
ScandyCoreAndroid
currently only supportsarmeabi-v7a
achitecture. So make suredefaultConfig
has this in it too:```gradle defaultConfig { // All the other defaultConfig stuff... ndk { abiFilters "armeabi-v7a" } } ```
-
-
Sync Project with Gradle Files
Update the contents of app/src/main/assets/scandycore_license.json
with your license JSON.
- Click the big green arrow!
Or from the command line (from this dir
):
./gradlew assembleDebug
# assuming the above command was successful
adb install -r ./app/build/outputs/apk/app-debug.apk