-
- All Implemented Interfaces:
public final class PilgrimSdk.Builder
Builder for supplying your notification handler and other configuration options on the Pilgrim SDK
Example:
new PilgrimSdk.Builder(context).exceptionHandler(...).notificationHandler(...)
-
-
Constructor Summary
Constructors Constructor Description PilgrimSdk.Builder(Context context)
-
Method Summary
Modifier and Type Method Description final PilgrimSdk.Builder
consumer(String key, String secret)
The Foursquare API consumer key and secret. final PilgrimSdk.Builder
oauthToken(String token)
If you have an application that links with Foursquare, you can pass the user's oauth token here and their visits may be more tailored to their history. final PilgrimSdk.Builder
notificationHandler(PilgrimNotificationHandler handler)
An implementation of the notification handler that will be invoked when the SDK has information for your app. final PilgrimSdk.Builder
exceptionHandler(PilgrimExceptionHandler handler)
An implementation of the exception handler called when there is an exception caused by invoking the PilgrimNotificationHandler from Pilgrim. final PilgrimSdk.Builder
logLevel(LogLevel logLevel)
Sets the LogLevel that you want to print out to logcat. final PilgrimSdk.Builder
enableDebugLogs()
Persist the logs that end up in logcat for debugging. final PilgrimSdk.Builder
enableLiveConsoleEvents()
This enables events to show up on your developer console in debuggable builds final PilgrimSdk.Builder
userInfo(PilgrimUserInfo userInfo)
For applications utilizing the server-to-server method for visit notifications, you can use this to pass through your own identifier to the notification endpoint call. final PilgrimSdk.Builder
disableAdIdentitySharing()
Disables sending the AdID to Foursquare servers, the option is enabled by default. -
-
Constructor Detail
-
PilgrimSdk.Builder
PilgrimSdk.Builder(Context context)
-
-
Method Detail
-
consumer
final PilgrimSdk.Builder consumer(String key, String secret)
The Foursquare API consumer key and secret.
-
oauthToken
final PilgrimSdk.Builder oauthToken(String token)
If you have an application that links with Foursquare, you can pass the user's oauth token here and their visits may be more tailored to their history.
- Parameters:
token
- The oauth token for the Foursquare user
-
notificationHandler
final PilgrimSdk.Builder notificationHandler(PilgrimNotificationHandler handler)
An implementation of the notification handler that will be invoked when the SDK has information for your app.
-
exceptionHandler
final PilgrimSdk.Builder exceptionHandler(PilgrimExceptionHandler handler)
An implementation of the exception handler called when there is an exception caused by invoking the PilgrimNotificationHandler from Pilgrim.
-
logLevel
final PilgrimSdk.Builder logLevel(LogLevel logLevel)
Sets the LogLevel that you want to print out to logcat.
-
enableDebugLogs
final PilgrimSdk.Builder enableDebugLogs()
Persist the logs that end up in logcat for debugging. A max of 2 days of logs are stored, and you should turn this off for release builds.
-
enableLiveConsoleEvents
final PilgrimSdk.Builder enableLiveConsoleEvents()
This enables events to show up on your developer console in debuggable builds
-
userInfo
@Deprecated(message = "Use {@link #setUserInfo(PilgrimUserInfo, boolean)} instead") final PilgrimSdk.Builder userInfo(PilgrimUserInfo userInfo)
For applications utilizing the server-to-server method for visit notifications, you can use this to pass through your own identifier to the notification endpoint call. This allows you to track your visits directly instead of having to store a relationship between our .getInstallId and your user.
- Parameters:
userInfo
-The user info will be passed through to your servers when a visit happens
-
disableAdIdentitySharing
final PilgrimSdk.Builder disableAdIdentitySharing()
Disables sending the AdID to Foursquare servers, the option is enabled by default.
-
-
-
-