[android] #4078 - improved instructions of exception message

This commit is contained in:
Tobrun
2016-03-07 17:56:01 -05:00
parent 6a31aa2910
commit 0306a94e53
2 changed files with 9 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
package com.mapbox.mapboxsdk.exceptions;
import android.os.Bundle;
import com.mapbox.mapboxsdk.maps.MapView;
/**
@@ -13,7 +14,9 @@ import com.mapbox.mapboxsdk.maps.MapView;
public class InvalidAccessTokenException extends RuntimeException {
public InvalidAccessTokenException() {
super("\nUsing MapView requires setting a valid access token. Please see https://www.mapbox.com/help/create-api-access-token/ to learn how to create one.\n Lastly, follow the steps in this guide https://www.mapbox.com/help/first-steps-android-sdk/#access-tokens in order to include the access token in your app.");
super("\nUsing MapView requires setting a valid access token. Use setAccessToken on Mapview to provide one. " +
"\nPlease see https://www.mapbox.com/help/create-api-access-token/ to learn how to create one." +
"\nMore information in this guide https://www.mapbox.com/help/first-steps-android-sdk/#access-tokens.");
}
}

View File

@@ -1,6 +1,7 @@
package com.mapbox.mapboxsdk.exceptions;
import android.os.Bundle;
import com.mapbox.mapboxsdk.maps.MapView;
/**
@@ -12,7 +13,9 @@ import com.mapbox.mapboxsdk.maps.MapView;
public class TelemetryServiceNotConfiguredException extends RuntimeException {
public TelemetryServiceNotConfiguredException() {
super("\nUsing Mapbox Android SDK requires configuring TelemetryService. This only requires two steps:\n 1. Include the WAKE_LOCK permission within your applications AndroidManifest.xml\n 2. Add the \"com.mapbox.mapboxsdk.telemetry.TelemetryService\" service in your applications AndroidManifest.xml\n For more help, visit https://www.mapbox.com/android-sdk/");
super("\nTelemetryService is not configured in your applications AndroidManifest.xml. " +
"\nPlease add \"com.mapbox.mapboxsdk.telemetry.TelemetryService\" service in your applications AndroidManifest.xml" +
"\nFor an example visit http://goo.gl/cET0Jn. For more information visit https://www.mapbox.com/android-sdk/.");
}
}
}