Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ build

# gradle
.gradle
sample/gradlew
sample/gradlew.bat
sample/gradle/wrapper/gradle-wrapper.jar
sample/gradle/wrapper/gradle-wrapper.properties
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.2'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
8 changes: 4 additions & 4 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ apply plugin: "com.jfrog.bintray"

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-maps:9.6.1'
}
// This is the library version used when deploying the artifact
version = "1.0.9"

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion 24
buildToolsVersion "24.0.3"

defaultConfig {
minSdkVersion 10
targetSdkVersion 22
targetSdkVersion 24
}
}

Expand Down
20 changes: 20 additions & 0 deletions library/src/main/java/com/directions/route/Route.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,25 @@ public void setLatLgnBounds(LatLng northeast, LatLng southwest) {
this.latLgnBounds = builder.build();
}

@Override
public String toString() {
return "Route{" +
"name='" + name + '\'' +
", points=" + points +
", segments=" + segments +
", copyright='" + copyright + '\'' +
", warning='" + warning + '\'' +
", country='" + country + '\'' +
", latLgnBounds=" + latLgnBounds +
", length=" + length +
", polyline='" + polyline + '\'' +
", durationText='" + durationText + '\'' +
", durationValue=" + durationValue +
", distanceText='" + distanceText + '\'' +
", distanceValue=" + distanceValue +
", endAddressText='" + endAddressText + '\'' +
", polyOptions=" + polyOptions +
'}';
}
}

12 changes: 7 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
compileSdkVersion 24
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.directions.sample"
minSdkVersion 15
targetSdkVersion 22
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
Expand All @@ -21,9 +21,11 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:appcompat-v7:24.2.1'
compile project(':library')
compile "com.google.android.gms:play-services-location:7.5.0"
compile 'com.android.support:cardview-v7:21.0.2'
compile "com.google.android.gms:play-services-location:9.6.1"
compile "com.google.android.gms:play-services-places:9.6.1"
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.jakewharton:butterknife:6.1.0'
}
15 changes: 11 additions & 4 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,27 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/AppTheme"
android:name=".SampleApp"
>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="API_KEY_HERE"/>
android:value="AIzaSyDv8K5B4U6M78r8JFufD0fTFpyycW7cmMk"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct? It should not be like before?


<activity
android:name=".MainActivity"
android:label="Google Directions Sample" >
android:label="@string/app_name"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

<activity
android:name=".TurnByTurnInstructionsActivity"
android:label="@string/app_name" >
</activity>
</application>

</manifest>
69 changes: 69 additions & 0 deletions sample/src/main/java/com/directions/sample/Logger.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.directions.sample;

import android.util.Log;

/** 27 Sep 2013
* Radu Savutiu,,
* @author Radu Savutiu
*/
public class Logger {
private static Logger _singleton;

public static Logger getLogger() {
if (_singleton==null) {
_singleton = new Logger();
}
return _singleton;
}

public void i(String TAG, String msg) {
if (BuildConfig.DEBUG) {
Log.i(TAG, "^" + msg);
}
}
public void i(String TAG, String msg, Throwable thr) {
if (BuildConfig.DEBUG) {
Log.i(TAG, "^" + msg, thr);
}
}
public void d(String TAG, String msg) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "^" + msg);
}
}
public static void d(String TAG, String msg, Throwable thr) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "^" + msg, thr);
}
}
public void e(String TAG, String msg) {
if (BuildConfig.DEBUG) {
Log.e(TAG, "^" + msg);
}
}
public void e(String TAG, String msg, Throwable thr) {
if (BuildConfig.DEBUG) {
Log.e(TAG, "^" + msg, thr);
}
}
public void v(String TAG, String msg) {
if (BuildConfig.DEBUG) {
Log.v(TAG, "^" + msg);
}
}
public void v(String TAG, String msg, Throwable thr) {
if (BuildConfig.DEBUG) {
Log.v(TAG, "^" + msg, thr);
}
}
public void w(String TAG, String msg) {
if (BuildConfig.DEBUG) {
Log.v(TAG, "^" + msg);
}
}
public void w(String TAG, String msg, Throwable thr) {
if (BuildConfig.DEBUG) {
Log.v(TAG, "^" + msg, thr);
}
}
}
Loading