From 402fa484ae303d119d2b2b363a0d519c627fdcab Mon Sep 17 00:00:00 2001 From: Julian Richard Contreras Date: Wed, 26 Apr 2023 14:19:13 -0400 Subject: [PATCH] WIP --- .../locations_and_geofences.md | 10 +- .../customization/custom_listeners.md | 8 +- .../integration/standard_integration.md | 2 +- .../android/sample_apps.md | 2 +- .../android/storage.md | 3 +- .../android/universal_deep_link_delegate.md | 98 ------------------- 6 files changed, 9 insertions(+), 114 deletions(-) delete mode 100644 _includes/archive/android/universal_deep_link_delegate.md diff --git a/_docs/_developer_guide/platform_integration_guides/android/advanced_use_cases/locations_and_geofences.md b/_docs/_developer_guide/platform_integration_guides/android/advanced_use_cases/locations_and_geofences.md index c63efa12b77..60385a6d62f 100644 --- a/_docs/_developer_guide/platform_integration_guides/android/advanced_use_cases/locations_and_geofences.md +++ b/_docs/_developer_guide/platform_integration_guides/android/advanced_use_cases/locations_and_geofences.md @@ -55,14 +55,6 @@ Add the Braze boot receiver to the `application` element of your `AndroidManifes ``` -{% alert note %} -If you are using a version of the Android SDK less than `2.3.0`, the following manifest declaration is also required: - -``` - -``` -{% endalert %} - ## Step 3: Enable Braze location collection If you have not yet enabled Braze location collection, update your `braze.xml` file to include `com_braze_enable_location_collection` and ensure its value is set to `true`: @@ -318,7 +310,7 @@ Note that Braze syncs geofences to devices using background push. In most cases, However, note that if your application is stopped, receiving a background push will launch it in the background and its `Application.onCreate()` method will be called. If you have a custom `Application.onCreate()` implementation, you should defer automatic server calls and any other actions you would not want to be triggered by background push. [3]: https://developers.google.com/android/reference/com/google/android/gms/location/package-summary -[4]: https://github.com/braze-inc/braze-android-sdk/blob/91622eb6cd4bba2e625cc22f00ca38e6136a0596/droidboy/src/main/java/com/appboy/sample/util/RuntimePermissionUtils.java +[4]: https://github.com/braze-inc/braze-android-sdk/blob/master/droidboy/src/main/java/com/appboy/sample/util/RuntimePermissionUtils.kt [10]: https://developers.google.com/android/guides/setup [11]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze/-i-braze/request-geofences.html [support]: {{site.baseurl}}/braze_support/ diff --git a/_docs/_developer_guide/platform_integration_guides/android/in-app_messaging/customization/custom_listeners.md b/_docs/_developer_guide/platform_integration_guides/android/in-app_messaging/customization/custom_listeners.md index 195011c11ce..583a80e3d22 100644 --- a/_docs/_developer_guide/platform_integration_guides/android/in-app_messaging/customization/custom_listeners.md +++ b/_docs/_developer_guide/platform_integration_guides/android/in-app_messaging/customization/custom_listeners.md @@ -467,16 +467,16 @@ BrazeInAppMessageManager.getInstance().setCustomInAppMessageViewWrapperFactory(C [20]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-i-in-app-message-animation-factory/index.html [21]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage.listeners/-i-in-app-message-manager-listener/index.html [24]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage.views/-i-in-app-message-immersive-view/index.html -[25]: https://github.com/braze-inc/braze-android-sdk/blob/master/android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/IInAppMessageView.java +[25]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage.views/-i-in-app-message-view/index.html?query=interface%20IInAppMessageView [34]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-braze-in-app-message-manager/index.html [42]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-i-in-app-message-view-factory/index.html [45]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-in-app-message-operation/index.html [82]: https://developer.android.com/reference/android/app/Application.html#onCreate() [83]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-in-app-message-operation/index.html#27659854%2FClasslikes%2F-1725759721 [86]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage.listeners/-i-html-in-app-message-action-listener/index.html -[87]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.appboy.ui.inappmessage/-i-in-app-message-view-factory/index.html -[88]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.appboy.ui.inappmessage/-i-in-app-message-view-wrapper-factory/index.html -[90]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.appboy.ui.inappmessage/-i-in-app-message-view-wrapper/index.html +[87]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-i-in-app-message-view-factory/index.html +[88]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-i-in-app-message-view-wrapper-factory/index.html?query=interface%20IInAppMessageViewWrapperFactory +[90]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-i-in-app-message-view-wrapper/index.html [91]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage/-in-app-message-manager-base/set-custom-in-app-message-view-factory.html [92]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage.listeners/-i-in-app-message-manager-listener/before-in-app-message-view-opened.html [93]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.ui.inappmessage.listeners/-i-in-app-message-manager-listener/after-in-app-message-view-opened.html diff --git a/_docs/_developer_guide/platform_integration_guides/android/push_notifications/android/integration/standard_integration.md b/_docs/_developer_guide/platform_integration_guides/android/push_notifications/android/integration/standard_integration.md index 2e3fbdaae2f..0e1d7a1fb05 100644 --- a/_docs/_developer_guide/platform_integration_guides/android/push_notifications/android/integration/standard_integration.md +++ b/_docs/_developer_guide/platform_integration_guides/android/push_notifications/android/integration/standard_integration.md @@ -570,7 +570,7 @@ setCustomBrazeNotificationFactory(null) [70]: https://github.com/braze-inc/braze-android-sdk/blob/master/samples/firebase-push/src/main/AndroidManifest.xml "AndroidManifest.xml" [72]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.configuration/-braze-config/-builder/set-default-notification-channel-name.html [73]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.configuration/-braze-config/-builder/set-default-notification-channel-description.html -[74]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.push/-braze-firebase-messaging-service/handle-braze-remote-message.html +[74]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.push/-braze-firebase-messaging-service/-companion/handle-braze-remote-message.html [75]: https://firebase.google.com/docs/reference/android/com/google/firebase/messaging/RemoteMessage [76]: https://developer.android.com/reference/android/app/Application [77]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.models.push/-braze-notification-payload/index.html diff --git a/_docs/_developer_guide/platform_integration_guides/android/sample_apps.md b/_docs/_developer_guide/platform_integration_guides/android/sample_apps.md index 7bf9c4349ed..4e3cd72341b 100644 --- a/_docs/_developer_guide/platform_integration_guides/android/sample_apps.md +++ b/_docs/_developer_guide/platform_integration_guides/android/sample_apps.md @@ -40,5 +40,5 @@ For more information on the Android SDK build system, see the [Github Repository [25]: {{site.baseurl}}/developer_guide/platform_wide/app_group_configuration/#app-group-configuration [26]: https://github.com/braze-inc/braze-android-sdk/blob/master/README.md [27]: https://github.com/JakeWharton/sdk-manager-plugin -[3]: https://github.com/braze-inc/braze-android-sdk "Appboy Android GitHub Repository" +[3]: https://github.com/braze-inc/braze-android-sdk "Braze Android GitHub Repository" [34]: {% image_buster /assets/img_archive/hello_appboy.png %} diff --git a/_docs/_developer_guide/platform_integration_guides/android/storage.md b/_docs/_developer_guide/platform_integration_guides/android/storage.md index e9ddb174b23..4d85d5b7fa6 100644 --- a/_docs/_developer_guide/platform_integration_guides/android/storage.md +++ b/_docs/_developer_guide/platform_integration_guides/android/storage.md @@ -29,7 +29,7 @@ By default, Braze will collect the following [device-level properties][1] to all * `TIMEZONE` {% alert note %} -`AD_TRACKING_ENABLED` and `TIMEZONE` aren't collected if they are `null` or blank. `GOOGLE_ADVERTISING_ID` is not collected automatically by the SDK and must be passed in via `com.appboy.IAppboy.setGoogleAdvertisingId`. +`AD_TRACKING_ENABLED` and `TIMEZONE` aren't collected if they are `null` or blank. `GOOGLE_ADVERTISING_ID` is not collected automatically by the SDK and must be passed in via [`setGoogleAdvertisingId`][4]. {% endalert %} You can disable or specify the properties you wish to collect by setting them using [`BrazeConfig.Builder.setDeviceObjectAllowlistEnabled()`][2] and [`BrazeConfig.Builder.setDeviceObjectAllowlist()`][3]. @@ -47,3 +47,4 @@ Visit our [SDK Data Collection]({{site.baseurl}}/user_guide/data_and_analytics/u [1]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.enums/-device-key/index.html [2]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.configuration/-braze-config/-builder/set-device-object-allowlist-enabled.html [3]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.configuration/-braze-config/-builder/set-device-object-allowlist.html +[4]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze/-i-braze/set-google-advertising-id.html diff --git a/_includes/archive/android/universal_deep_link_delegate.md b/_includes/archive/android/universal_deep_link_delegate.md deleted file mode 100644 index 8376657ea92..00000000000 --- a/_includes/archive/android/universal_deep_link_delegate.md +++ /dev/null @@ -1,98 +0,0 @@ -## Universal deep link delegate - -The Android SDK provides the ability to set a single delegate object to custom handle all deep links opened by Braze across Content Cards, in-app messages, and push notifications. - -Your delegate object should implement the [`IAppboyNavigator`][udl-3] interface and be set using [`AppboyNavigator.setAppboyNavigator()`][udl-2]. In most cases, the delegate should be set in your app's `Application.onCreate()`. - -The following is an example of overriding the default [`UriAction`][udl-1] behavior with custom intent flags and custom behavior for YouTube URLs. - -{% tabs %} -{% tab JAVA %} - -```java -public class CustomNavigator implements IAppboyNavigator { - private static final String TAG = AppboyLogger.getAppboyLogTag(CustomAppboyNavigator.class); - - @Override - public void gotoNewsFeed(Context context, NewsfeedAction newsfeedAction) { - newsfeedAction.execute(context); - } - - @Override - public void gotoUri(Context context, UriAction uriAction) { - String uri = uriAction.getUri().toString(); - // Open YouTube URLs in the YouTube app and not our app - if (!StringUtils.isNullOrBlank(uri) && uri.contains("youtube.com")) { - uriAction.setUseWebView(false); - } - - CustomUriAction customUriAction = new CustomUriAction(uriAction); - customUriAction.execute(context); - } - - public static class CustomUriAction extends UriAction { - - public CustomUriAction(@NonNull UriAction uriAction) { - super(uriAction); - } - - @Override - protected void openUriWithActionView(Context context, Uri uri, Bundle extras) { - Intent intent = getActionViewIntent(context, uri, extras); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); - if (intent.resolveActivity(context.getPackageManager()) != null) { - context.startActivity(intent); - } else { - AppboyLogger.w(TAG, "Could not find appropriate activity to open for deep link " + uri + "."); - } - } - } -} -``` - -{% endtab %} -{% tab KOTLIN %} - -```kotlin -class CustomNavigator : IAppboyNavigator { - - override fun gotoNewsFeed(context: Context, newsfeedAction: NewsfeedAction) { - newsfeedAction.execute(context) - } - - override fun gotoUri(context: Context, uriAction: UriAction) { - val uri = uriAction.uri.toString() - // Open YouTube URLs in the YouTube app and not our app - if (!StringUtils.isNullOrBlank(uri) && uri.contains("youtube.com")) { - uriAction.useWebView = false - } - - val customUriAction = CustomUriAction(uriAction) - customUriAction.execute(context) - } - - class CustomUriAction(uriAction: UriAction) : UriAction(uriAction) { - - override fun openUriWithActionView(context: Context, uri: Uri, extras: Bundle) { - val intent = getActionViewIntent(context, uri, extras) - intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP - if (intent.resolveActivity(context.packageManager) != null) { - context.startActivity(intent) - } else { - AppboyLogger.w(TAG, "Could not find appropriate activity to open for deep link $uri.") - } - } - } - - companion object { - private val TAG = AppboyLogger.getAppboyLogTag(CustomAppboyNavigator::class.java) - } -} -``` - -{% endtab %} -{% endtabs %} - -[udl-1]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.appboy.ui.actions/-uri-action/index.html -[udl-2]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.appboy.ui/-appboy-navigator/set-appboy-navigator.html -[udl-3]: https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.appboy/-i-appboy-navigator/index.html