Skip to content

Instantly share code, notes, and snippets.

@sfmc-mobilepushsdk
Created August 23, 2018 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sfmc-mobilepushsdk/7786aad4c87c177913209e2103f29ae7 to your computer and use it in GitHub Desktop.
Save sfmc-mobilepushsdk/7786aad4c87c177913209e2103f29ae7 to your computer and use it in GitHub Desktop.
MarketingCloudSdk.init((Context) this, MarketingCloudConfig.builder()
// Other configuration values
.setUrlHandler(new UrlHandler() {
@Nullable @Override public PendingIntent handleUrl(@NonNull Context context, @NonNull String url,
@NonNull String urlSource) {
return PendingIntent.getActivity(context, 0, new Intent(Intent.ACTION_VIEW, Uri.parse(url)), PendingIntent.FLAG_UPDATE_CURRENT);
}
})
.build((Context) this), (MarketingCloudSdk.InitializationListener) this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment