Skip to content

Commit

Permalink
Merge pull request #75 from heremaps/here-positioning-sample
Browse files Browse the repository at this point in the history
Add a HERE positioning sample application
  • Loading branch information
sschuberth authored Oct 31, 2017
2 parents 14bc371 + 9ddaf54 commit f0e572b
Show file tree
Hide file tree
Showing 21 changed files with 899 additions and 0 deletions.
7 changes: 7 additions & 0 deletions here-positioning-android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.gradle/
build/
app/libs/
!app/libs/README.md
.idea/
*.iml
local.properties
33 changes: 33 additions & 0 deletions here-positioning-android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "25.0.2"

defaultConfig {
// Developers must replace this with their own application's package name, which matches
// their HERE application ID.
applicationId "com.here.android.example.basicpositioningsolution"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
compile(name: 'HERE-sdk', ext: 'aar')
compile 'com.android.support:appcompat-v7:23.4.0'
}
1 change: 1 addition & 0 deletions here-positioning-android/app/libs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
After having [signed-up](https://developer.here.com/?create=Evaluation&keepState=true&step=terms) for a Premium SDK evaluation, please download and extract the SDK for Android and copy the contained `HERE-sdk.aar` file to this directory.
51 changes: 51 additions & 0 deletions here-positioning-android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.here.android.example.basicpositioningsolution">

<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_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:maxSdkVersion="22" android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<application android:allowBackup="true" android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name">
<activity android:label="@string/app_name" android:name=".BasicPositioningActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<!-- Developers should put application credentials here. To obtain them, please register the application at developer.here.com -->
<meta-data android:name="com.here.android.maps.appid" android:value="{YOUR_APP_ID}"/>
<meta-data android:name="com.here.android.maps.apptoken" android:value="{YOUR_APP_TOKEN}"/>
<meta-data android:name="com.here.android.maps.license.key" android:value="{YOUR_LICENSE_KEY}"/>

<!--
Embed the HERE Map Service.
For more information, see the HERE SDK Developer's Guide
-->
<service android:exported="true" android:label="HereMapService" android:name="com.here.android.mpa.service.MapService" android:process="global.Here.Map.Service.v2">
<intent-filter>
<action android:name="com.here.android.mpa.service.MapService">
</action>
</intent-filter>
</service>

<!--
Embed the HERE Positioning Service.
For more information, see the HERE SDK Developer's Guide
-->
<service android:enabled="true" android:exported="false" android:name="com.here.services.internal.LocationService" android:process=":remote">
</service>

</application>

</manifest>
Loading

0 comments on commit f0e572b

Please sign in to comment.