Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonty-dawson committed Mar 31, 2017
0 parents commit 088f63c
Show file tree
Hide file tree
Showing 90 changed files with 3,367 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
@@ -0,0 +1,10 @@
*.iml
.gradle
.idea
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
10 changes: 10 additions & 0 deletions LICENSE.md
@@ -0,0 +1,10 @@
Copyright (c) 2017, eeGeo
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 changes: 47 additions & 0 deletions README.md
@@ -0,0 +1,47 @@
# android-sdk-example
Welcome to the eeGeo Android SDK! This repository contains source code for Android apps which demonstrate the capabilities of our SDK.

Prerequisites
-------------

To use these apps, you'll need:
* [Android Studio](https://developer.android.com/studio/index.html), together with the Android SDK and supporting libraries appropriate for your target platform.
* An [eeGeo API key](https://www.eegeo.com/developers/apikeys/). Sign up [here](https://www.eegeo.com/register/) for a free account and create an API key for your example apps. The API key is a string consisting of 32 alphanumeric characters.
* A clone or downloaded snapshot of this repo.

Getting started
---------------

In Android Studio, select "Open..." and then select the top level android-sdk-example folder. If Android Studio is missing supporting libraries or components, you may be prompted to install these. Otherwise, Android Studio will download prerequisites automatically from JCenter.

You should see two modules in the project: [helloworld](https://github.com/eegeo/android-sdk-example/tree/master/helloworld) and [sdkexamples](https://github.com/eegeo/android-sdk-example/tree/master/sdkexamples).

Hello world
-----------

The [helloworld](https://github.com/eegeo/android-sdk-example/tree/master/helloworld) example is a very basic application which displays a map.

All you need to do is open the ```res/values/strings.xml``` file in the helloworld module and paste in your 32 character API key as the value for the ```eegeo_api_key``` resource.

To build it, select "helloworld" in the "Run/Debug configuration" toolbar and click "Make Project". If you have a debuggable Android device attached, or if you are running an emulator, you can debug or run the app with the standard Android Studio tools.

For a step-by-step instructions which show how to create a basic app from scratch, see [our walkthrough documentation](https://docs.eegeo.com/android/latest/docs/api/Walkthrough/).

SDK Examples
------------
The [sdkexamples](https://github.com/eegeo/android-sdk-example/tree/master/sdkexamples) app shows a selection of SDK features in individual Android Activities.

Again, you will need to open the ```res/values/strings.xml``` file in this sdkexamples and paste in your 32 character API key as the value for the ```eegeo_api_key``` resource.

To build the examples, ensure "sdkexamples" is selected in the "Run/Debug configuration" toolbar and build as usual.

Further information
-------------------
See our [API docs](https://docs.eegeo.com/android/latest/docs/api/) for detailed class documentation and other information.

Questions, comments, or problems? All feedback is welcome -- just [create an issue](https://github.com/eegeo/android-sdk-example/issues).

License
-------

The Android SDK examples are released under the Simplified BSD License. See the [LICENSE.md](https://github.com/eegeo/android-sdk-example/blob/master/LICENSE.md) file for details.
1 change: 1 addition & 0 deletions apisamples/.gitignore
@@ -0,0 +1 @@
/build
63 changes: 63 additions & 0 deletions apisamples/build.gradle
@@ -0,0 +1,63 @@
apply plugin: 'com.android.application'

def keystoreProperties = new Properties()
if (project.hasProperty('keyStorePropertiesFile')) {
def keystorePropertiesFile = project.getProperty('keyStorePropertiesFile')
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
keystoreProperties['storeFile'] = project.getProperty('keyStoreFile')
}

def buildNumber = project.hasProperty('buildNumber') ? project.getProperty('buildNumber') : 'dev'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"

defaultConfig {
applicationId "com.eegeo.sdkexamples"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "0.0." + buildNumber

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
if (project.hasProperty('keyStorePropertiesFile')) {
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty('keyStorePropertiesFile')) {
signingConfig signingConfigs.release
}
}
}

}

// latest release is https://bintray.com/eegeo/maven/android-sdk/_latestVersion
def sdkVersion = project.hasProperty('sdkVersion') ? project.getProperty('sdkVersion') : '+'
def sdkArtifactName = 'com.wrld:android-sdk:0.0.' + sdkVersion + '@aar'

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
if (rootProject.getProperty('useLocalSdkBuild').toBoolean()) {
debugCompile project(path: ':sdk', configuration: 'debug')
releaseCompile project(path: ':sdk', configuration: 'release')
} else {
compile(sdkArtifactName) {
transitive = true
}
}
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0'
}
17 changes: 17 additions & 0 deletions apisamples/proguard-rules.pro
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\judith.underwood\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
198 changes: 198 additions & 0 deletions apisamples/src/main/AndroidManifest.xml
@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.eegeo.apisamples">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

<application
tools:ignore="GoogleAppIndexingWarning"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="com.eegeo.apisamples.MainActivity"
android:label="@string/app_short_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name="com.eegeo.apisamples.BasicMapActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/basic_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MoveCameraActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/move_camera_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.AnimateCameraActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/animate_camera_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.FrameCameraActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/framing_camera_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.QueryCameraActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/query_camera_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.PickingCameraActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/picking_camera_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.ExitIndoorExampleActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/exit_indoor_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.NameIndoorExampleActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/name_indoor_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MoveIndoorExampleActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/move_floor_indoor_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.UXIndoorExampleActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/ux_floor_indoor_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.AddMarkerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/add_marker_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MarkerCustomIconActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/marker_custom_icon_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MarkerWithElevationActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/marker_with_elevation_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MarkerWithAbsoluteAltitudeActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/marker_with_absolute_altitude_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.AddIndoorMarkerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/add_indoor_marker_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MarkerChangeTextActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/marker_change_text_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MarkerChangeLocationActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/marker_change_location_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MarkerTappedNotificationActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/marker_tapped_notification_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.MarkerChangeDrawOrderActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/marker_change_draw_order_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.StreamingCompleteNotificationActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/streaming_complete_notification_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>
<activity
android:name="com.eegeo.apisamples.EegeoMapOptionsActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/map_options_example_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.eegeo.apisamples.MainActivity"/>
</activity>

</application>

</manifest>

0 comments on commit 088f63c

Please sign in to comment.