From 443b232c545d5127bca0cd36001b5b421385a119 Mon Sep 17 00:00:00 2001 From: Julian Richard Contreras Date: Wed, 4 Jan 2023 14:48:19 -0500 Subject: [PATCH] Updating Android SDK to version 24.0.0 --- CHANGELOG.md | 34 +++ LICENSE | 2 +- README.md | 6 +- android-sdk-location/build.gradle | 31 +++ .../src/main/AndroidManifest.xml | 10 + .../com/braze/location/BrazeActionReceiver.kt | 155 +++++++++++ .../location/BrazeInternalGeofenceApi.kt | 56 ++++ .../location/BrazeInternalLocationApi.kt | 200 ++++++++++++++ .../braze/location/GooglePlayLocationUtils.kt | 256 ++++++++++++++++++ .../braze-consumer-proguard-rules.pro | 6 +- android-sdk-ui/src/main/AndroidManifest.xml | 10 +- .../push/AppboyNotificationFactory.java | 9 - .../push/AppboyNotificationStyleFactory.java | 9 - .../appboy/ui/AppboyContentCardsFragment.java | 9 - .../com/appboy/ui/AppboyWebViewActivity.java | 12 - .../ui/activities/AppboyBaseActivity.java | 47 ---- .../AppboyContentCardsActivity.java | 9 - .../ui/activities/AppboyFeedActivity.java | 21 -- .../appboy/ui/feed/AppboyImageSwitcher.java | 68 ----- ...pboyInAppMessageWebViewClientListener.java | 9 - .../views/AppboyInAppMessageBaseView.java | 16 -- .../AppboyInAppMessageBoundedLayout.java | 20 -- .../views/AppboyInAppMessageFullView.java | 16 -- .../views/AppboyInAppMessageHtmlBaseView.java | 17 -- .../views/AppboyInAppMessageHtmlFullView.java | 16 -- .../views/AppboyInAppMessageHtmlView.java | 16 -- .../AppboyInAppMessageImmersiveBaseView.java | 16 -- .../views/AppboyInAppMessageModalView.java | 16 -- .../views/AppboyInAppMessageSlideupView.java | 16 -- .../views/AppboyInAppMessageWebView.java | 16 -- .../views/InAppMessageButton.java | 22 -- .../java/com/braze/IBrazeDeeplinkHandler.kt | 2 +- .../push/BrazeNotificationActionUtils.kt | 4 +- .../braze/push/BrazeNotificationFactory.kt | 5 +- .../push/BrazeNotificationStyleFactory.kt | 6 +- .../com/braze/push/BrazeNotificationUtils.kt | 46 +--- .../java/com/braze/push/BrazePushReceiver.kt | 4 +- .../java/com/braze/ui/BrazeDeeplinkHandler.kt | 2 +- .../ui/BrazeFeedFragment.java} | 50 ++-- .../java/com/braze/ui/BrazeWebViewActivity.kt | 4 +- .../ui/BrazeXamarinFormsFeedFragment.java} | 50 ++-- .../main/java/com/braze/ui/actions/IAction.kt | 2 +- .../com/braze/ui/actions/NewsfeedAction.kt | 8 +- .../java/com/braze/ui/actions/UriAction.kt | 2 +- .../actions/brazeactions/BrazeActionParser.kt | 2 +- .../actions/brazeactions/BrazeActionUtils.kt | 2 +- .../steps/SetEmailSubscriptionStep.kt | 2 +- .../SetPushNotificationSubscriptionStep.kt | 2 +- .../ui/actions/brazeactions/steps/StepData.kt | 2 +- .../ui/activities/BrazeFeedActivity.java | 20 ++ .../ui/activities/ContentCardsActivity.kt | 2 +- .../ui/adapters/BrazeListAdapter.java} | 36 +-- .../ui/contentcards/ContentCardsFragment.kt | 6 +- .../adapters/ContentCardAdapter.kt | 2 +- .../adapters/EmptyContentCardsAdapter.kt | 2 +- .../DefaultContentCardsUpdateHandler.kt | 7 +- .../DefaultContentCardsViewBindingHandler.kt | 6 +- .../handlers/IContentCardsUpdateHandler.kt | 2 +- .../IContentCardsViewBindingHandler.kt | 2 +- .../listeners/IContentCardsActionListener.kt | 2 +- .../ContentCardsDividerItemDecoration.kt | 2 +- .../view/BannerImageContentCardView.kt | 6 +- .../contentcards/view/BaseContentCardView.kt | 6 +- .../view/CaptionedImageContentCardView.kt | 6 +- .../view/ContentCardViewHolder.kt | 2 +- .../view/DefaultContentCardView.kt | 4 +- .../view/ShortNewsContentCardView.kt | 6 +- .../view/TextAnnouncementContentCardView.kt | 6 +- .../ui/feed/BrazeFeedManager.java} | 18 +- .../com/braze/ui/feed/BrazeImageSwitcher.kt | 49 ++++ .../BrazeDefaultFeedClickActionListener.java} | 6 +- .../listeners/IFeedClickActionListener.java | 6 +- .../ui/feed/view/BaseFeedCardView.java | 16 +- .../DefaultInAppMessageFullViewFactory.kt | 2 +- .../DefaultInAppMessageHtmlFullViewFactory.kt | 2 +- .../DefaultInAppMessageHtmlViewFactory.kt | 2 +- .../DefaultInAppMessageModalViewFactory.kt | 2 +- .../DefaultInAppMessageSlideupViewFactory.kt | 2 +- .../InAppMessageUserJavascriptInterface.kt | 10 +- ...efaultInAppMessageViewLifecycleListener.kt | 2 +- ...efaultInAppMessageWebViewClientListener.kt | 2 +- .../listeners/IInAppMessageManagerListener.kt | 2 +- .../utils/InAppMessageButtonViewUtils.kt | 2 +- .../utils/InAppMessageWebViewClient.kt | 4 +- .../views/InAppMessageBoundedLayout.kt | 2 +- .../views/InAppMessageFullView.kt | 2 +- .../views/InAppMessageHtmlFullView.kt | 2 +- .../views/InAppMessageHtmlView.kt | 2 +- .../views/InAppMessageImmersiveBaseView.kt | 2 +- .../views/InAppMessageModalView.kt | 2 +- .../views/InAppMessageSlideupView.kt | 2 +- .../ui/widget/BannerImageCardView.java | 14 +- .../ui/widget/BaseCardView.kt | 14 +- .../ui/widget/CaptionedImageCardView.java | 20 +- .../ui/widget/DefaultCardView.java | 10 +- .../ui/widget/ShortNewsCardView.java | 20 +- .../ui/widget/TextAnnouncementCardView.java | 18 +- .../com_appboy_card_background.xml | 30 -- .../com_braze_card_background.xml | 30 ++ ...ze_content_cards_unread_bar_background.xml | 4 +- ...rd.xml => com_braze_banner_image_card.xml} | 4 +- ...xml => com_braze_captioned_image_card.xml} | 22 +- .../res/layout/com_braze_content_cards.xml | 2 +- ...lt_card.xml => com_braze_default_card.xml} | 4 +- ...com_appboy_feed.xml => com_braze_feed.xml} | 14 +- ...tivity.xml => com_braze_feed_activity.xml} | 4 +- ...d_footer.xml => com_braze_feed_footer.xml} | 0 ...d_header.xml => com_braze_feed_header.xml} | 0 ... com_braze_feed_read_indicator_holder.xml} | 4 +- ...card.xml => com_braze_short_news_card.xml} | 26 +- ... => com_braze_stubbed_feed_image_view.xml} | 6 +- ...l => com_braze_text_announcement_card.xml} | 12 +- .../src/main/res/values-ar/strings.xml | 6 +- .../src/main/res/values-cs/strings.xml | 6 +- .../src/main/res/values-da/strings.xml | 6 +- .../src/main/res/values-de/strings.xml | 6 +- .../src/main/res/values-es-rES/strings.xml | 6 +- .../src/main/res/values-es/strings.xml | 6 +- .../src/main/res/values-et/strings.xml | 6 +- .../src/main/res/values-fi/strings.xml | 6 +- .../src/main/res/values-fr/strings.xml | 6 +- .../src/main/res/values-hdpi/dimens.xml | 10 +- .../src/main/res/values-hi/strings.xml | 6 +- .../src/main/res/values-in/strings.xml | 6 +- .../src/main/res/values-it/strings.xml | 6 +- .../src/main/res/values-iw/strings.xml | 6 +- .../src/main/res/values-ja/strings.xml | 6 +- .../src/main/res/values-km/strings.xml | 6 +- .../src/main/res/values-ko/strings.xml | 6 +- .../src/main/res/values-lo/strings.xml | 6 +- .../src/main/res/values-mdpi/dimens.xml | 10 +- .../src/main/res/values-ms/strings.xml | 6 +- .../src/main/res/values-my/strings.xml | 6 +- .../src/main/res/values-nb/strings.xml | 6 +- .../src/main/res/values-nl/strings.xml | 6 +- .../src/main/res/values-pl/strings.xml | 6 +- .../src/main/res/values-pt-rPT/strings.xml | 6 +- .../src/main/res/values-pt/strings.xml | 6 +- .../src/main/res/values-ru/strings.xml | 6 +- .../src/main/res/values-sv/strings.xml | 6 +- .../src/main/res/values-sw600dp/dimens.xml | 2 +- .../src/main/res/values-th/strings.xml | 6 +- .../src/main/res/values-tl/strings.xml | 6 +- .../src/main/res/values-uk/strings.xml | 6 +- .../src/main/res/values-vi/strings.xml | 6 +- .../src/main/res/values-xhdpi/dimens.xml | 10 +- .../src/main/res/values-zh-rCN/strings.xml | 6 +- .../src/main/res/values-zh-rHK/strings.xml | 6 +- .../src/main/res/values-zh-rSG/strings.xml | 6 +- .../src/main/res/values-zh-rTW/strings.xml | 6 +- android-sdk-ui/src/main/res/values/attrs.xml | 6 +- android-sdk-ui/src/main/res/values/colors.xml | 22 +- android-sdk-ui/src/main/res/values/dimens.xml | 16 +- .../src/main/res/values/strings.xml | 6 +- android-sdk-ui/src/main/res/values/styles.xml | 34 +-- .../appboy/unity/BrazeUnityActivityWrapper.kt | 2 + .../appboy/unity/EventSubscriberFactory.kt | 2 +- .../UnityConfigurationProvider.java | 164 ----------- .../UnityConfigurationProvider.kt | 170 ++++++++++++ .../enums/UnityInAppMessageManagerAction.java | 58 ---- .../enums/UnityInAppMessageManagerAction.kt | 30 ++ .../appboy/unity/enums/UnityMessageType.java | 41 --- .../appboy/unity/enums/UnityMessageType.kt | 22 ++ .../AppboyUnityPlayerActivity.java | 69 ----- .../AppboyUnityPlayerActivity.kt | 62 +++++ .../appboy/unity/utils/InAppMessageUtils.java | 55 ---- .../appboy/unity/utils/InAppMessageUtils.kt | 56 ++++ .../com/appboy/unity/utils/MessagingUtils.kt | 10 +- build.gradle | 4 +- droidboy/src/main/AndroidManifest.xml | 2 +- .../sample/CustomBrazeDeeplinkHandler.java | 5 +- .../sample/CustomFeedClickActionListener.java | 4 +- .../com/appboy/sample/DroidboyApplication.kt | 2 +- .../sample/DroidboyNotificationFactory.java | 2 +- .../appboy/sample/FeedCategoriesFragment.java | 2 +- .../sample/FullyCustomNotificationFactory.kt | 2 +- .../java/com/appboy/sample/MainFragment.kt | 8 +- .../com/appboy/sample/PushTesterFragment.java | 16 +- .../com/appboy/sample/UserProfileDialog.java | 4 +- .../sample/activity/DroidBoyActivity.kt | 14 +- .../sample/activity/FeedFragmentActivity.java | 2 +- .../activity/settings/SettingsFragment.kt | 10 +- .../sample/imageloading/GlideImageLoader.kt | 2 +- .../EmailSubscriptionStateDialog.java | 2 +- .../PushSubscriptionStateDialog.java | 2 +- .../sample/util/ContentCardsTestingUtil.kt | 6 +- droidboy/src/main/res/layout/push_tester.xml | 5 + .../src/main/res/values-sw600dp/styles.xml | 4 +- .../src/main/res/values-xlarge/styles.xml | 4 +- .../main/res/values/inapp_image_options.xml | 8 +- droidboy/src/main/res/values/strings.xml | 7 +- gradle.properties | 4 +- .../GlideBrazeImageLoader.java | 2 +- .../src/main/res/layout/main_activity.xml | 2 +- settings.gradle | 1 + 195 files changed, 1711 insertions(+), 1341 deletions(-) create mode 100644 android-sdk-location/build.gradle create mode 100644 android-sdk-location/src/main/AndroidManifest.xml create mode 100644 android-sdk-location/src/main/java/com/braze/location/BrazeActionReceiver.kt create mode 100644 android-sdk-location/src/main/java/com/braze/location/BrazeInternalGeofenceApi.kt create mode 100644 android-sdk-location/src/main/java/com/braze/location/BrazeInternalLocationApi.kt create mode 100644 android-sdk-location/src/main/java/com/braze/location/GooglePlayLocationUtils.kt delete mode 100644 android-sdk-ui/src/main/java/com/appboy/push/AppboyNotificationFactory.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/push/AppboyNotificationStyleFactory.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/AppboyContentCardsFragment.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/AppboyWebViewActivity.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/activities/AppboyBaseActivity.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/activities/AppboyContentCardsActivity.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/activities/AppboyFeedActivity.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/feed/AppboyImageSwitcher.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/listeners/AppboyInAppMessageWebViewClientListener.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageBaseView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageBoundedLayout.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageFullView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageHtmlBaseView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageHtmlFullView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageHtmlView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageImmersiveBaseView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageModalView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageSlideupView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/AppboyInAppMessageWebView.java delete mode 100644 android-sdk-ui/src/main/java/com/appboy/ui/inappmessage/views/InAppMessageButton.java rename android-sdk-ui/src/main/java/com/{appboy/ui/AppboyFeedFragment.java => braze/ui/BrazeFeedFragment.java} (91%) rename android-sdk-ui/src/main/java/com/{appboy/ui/AppboyXamarinFormsFeedFragment.java => braze/ui/BrazeXamarinFormsFeedFragment.java} (89%) create mode 100644 android-sdk-ui/src/main/java/com/braze/ui/activities/BrazeFeedActivity.java rename android-sdk-ui/src/main/java/com/{appboy/ui/adapters/AppboyListAdapter.java => braze/ui/adapters/BrazeListAdapter.java} (86%) rename android-sdk-ui/src/main/java/com/{appboy/ui/feed/AppboyFeedManager.java => braze/ui/feed/BrazeFeedManager.java} (68%) create mode 100644 android-sdk-ui/src/main/java/com/braze/ui/feed/BrazeImageSwitcher.kt rename android-sdk-ui/src/main/java/com/{appboy/ui/feed/listeners/AppboyDefaultFeedClickActionListener.java => braze/ui/feed/listeners/BrazeDefaultFeedClickActionListener.java} (54%) rename android-sdk-ui/src/main/java/com/{appboy => braze}/ui/feed/listeners/IFeedClickActionListener.java (83%) rename android-sdk-ui/src/main/java/com/{appboy => braze}/ui/feed/view/BaseFeedCardView.java (84%) rename android-sdk-ui/src/main/java/com/{appboy => braze}/ui/widget/BannerImageCardView.java (81%) rename android-sdk-ui/src/main/java/com/{appboy => braze}/ui/widget/BaseCardView.kt (95%) rename android-sdk-ui/src/main/java/com/{appboy => braze}/ui/widget/CaptionedImageCardView.java (75%) rename android-sdk-ui/src/main/java/com/{appboy => braze}/ui/widget/DefaultCardView.java (77%) rename android-sdk-ui/src/main/java/com/{appboy => braze}/ui/widget/ShortNewsCardView.java (73%) rename android-sdk-ui/src/main/java/com/{appboy => braze}/ui/widget/TextAnnouncementCardView.java (69%) delete mode 100644 android-sdk-ui/src/main/res/drawable-nodpi/com_appboy_card_background.xml create mode 100644 android-sdk-ui/src/main/res/drawable-nodpi/com_braze_card_background.xml rename android-sdk-ui/src/main/res/layout/{com_appboy_banner_image_card.xml => com_braze_banner_image_card.xml} (66%) rename android-sdk-ui/src/main/res/layout/{com_appboy_captioned_image_card.xml => com_braze_captioned_image_card.xml} (62%) rename android-sdk-ui/src/main/res/layout/{com_appboy_default_card.xml => com_braze_default_card.xml} (77%) rename android-sdk-ui/src/main/res/layout/{com_appboy_feed.xml => com_braze_feed.xml} (84%) rename android-sdk-ui/src/main/res/layout/{com_appboy_feed_activity.xml => com_braze_feed_activity.xml} (74%) rename android-sdk-ui/src/main/res/layout/{com_appboy_feed_footer.xml => com_braze_feed_footer.xml} (100%) rename android-sdk-ui/src/main/res/layout/{com_appboy_feed_header.xml => com_braze_feed_header.xml} (100%) rename android-sdk-ui/src/main/res/layout/{com_appboy_feed_read_indicator_holder.xml => com_braze_feed_read_indicator_holder.xml} (67%) rename android-sdk-ui/src/main/res/layout/{com_appboy_short_news_card.xml => com_braze_short_news_card.xml} (58%) rename android-sdk-ui/src/main/res/layout/{com_appboy_stubbed_feed_image_view.xml => com_braze_stubbed_feed_image_view.xml} (85%) rename android-sdk-ui/src/main/res/layout/{com_appboy_text_announcement_card.xml => com_braze_text_announcement_card.xml} (74%) delete mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/configuration/UnityConfigurationProvider.java create mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/configuration/UnityConfigurationProvider.kt delete mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/enums/UnityInAppMessageManagerAction.java create mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/enums/UnityInAppMessageManagerAction.kt delete mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/enums/UnityMessageType.java create mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/enums/UnityMessageType.kt delete mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/prime31compatible/AppboyUnityPlayerActivity.java create mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/prime31compatible/AppboyUnityPlayerActivity.kt delete mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/utils/InAppMessageUtils.java create mode 100644 android-sdk-unity/src/main/java/com/appboy/unity/utils/InAppMessageUtils.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e940f7d3..5c15da4fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,37 @@ +## 24.0.0 + +[Release Date](https://github.com/Appboy/appboy-android-sdk/releases/tag/v24.0.0) + +#### Breaking +- Location and geofence functionality has moved to a new module called `com.braze:android-sdk-location`. Add this module to your `build.gradle` if you are using Braze location functionality. +- Deprecated classes starting with `Appboy` have now been removed. +- Moved `com.appboy` packages to `com.braze`. +- All xml classes and values in them have been changed from `appboy` to `braze`. All custom code should be updated accordingly. +- `BrazeNotificationUtils.isAppboyPushMessage()` removed. Please use instead: + - Java: `BrazeNotificationUtils.isBrazePushMessage(Intent)` + - Kotlin: `Intent.isBrazePushMessage()` +- `APPBOY_NOTIFICATION_OPENED_SUFFIX`, `APPBOY_NOTIFICATION_RECEIVED_SUFFIX`, and `APPBOY_NOTIFICATION_DELETED_SUFFIX` are removed. + - Instead, please use `Braze.getInstance(context).subscribeToPushNotificationEvents()` +- Updated the minimum version of `com.google.android.gms:play-services-location` required for Braze Geofences to `20.0.0`. + +##### Added +- Added the ability to optionally pipe Braze logcat from `BrazeLogger` to a custom callback via `BrazeLogger.onLoggedCallback`. + ```kotlin + BrazeLogger.onLoggedCallback = fun(priority: BrazeLogger.Priority, message: String, throwable: Throwable?) { + // Custom callback logic here + } + ``` + ```java + BrazeLogger.setOnLoggedCallback((priority, s, throwable) -> { + // Custom logic here + return null; + }); + ``` + +##### Changed +- Removed `BrazeUser.setFacebookData()` and `BrazeUser.setTwitterData()`. +- Changed the default behavior of `DefaultContentCardsUpdateHandler` to use the creation time vs last update time when sorting Content Cards. + ## 23.3.0 [Release Date](https://github.com/Appboy/appboy-android-sdk/releases/tag/v23.3.0) diff --git a/LICENSE b/LICENSE index 466b967fc..78ec48b51 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2022 Braze, Inc. +Copyright (c) 2023 Braze, Inc. All rights reserved. * Use of source code or binaries contained within Braze’s SDKs is permitted only to enable use of the Braze platform by customers of Braze. diff --git a/README.md b/README.md index 310833901..8a0882740 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Successful marketing automation is essential to the future of your mobile app. B - `android-sdk-base` - the Braze SDK base analytics library. - `android-sdk-ui` - the Braze SDK user interface library for in-app messages, push, and the news feed. +- `android-sdk-location` - the Braze SDK location library for location and geofences. - `droidboy` - a sample app demonstrating how to use Braze in-depth. - `android-sdk-unity` - a library that enables Braze SDK integrations on Unity. - `samples` - a folder containing several sample apps for various integration options. @@ -39,7 +40,8 @@ allprojects { ``` dependencies { - implementation 'com.appboy:android-sdk-ui:23.3.+' + implementation 'com.appboy:android-sdk-ui:24.0.+' + implementation 'com.appboy:android-sdk-location:24.0.+' ... } ``` @@ -58,7 +60,7 @@ repositories { ``` dependencies { - implementation 'com.appboy:android-sdk-ui:23.3.+' + implementation 'com.appboy:android-sdk-ui:24.0.+' } ``` diff --git a/android-sdk-location/build.gradle b/android-sdk-location/build.gradle new file mode 100644 index 000000000..eaa679e49 --- /dev/null +++ b/android-sdk-location/build.gradle @@ -0,0 +1,31 @@ +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +dependencies { + api "com.appboy:android-sdk-base:${BRAZE_SDK_VERSION}" + compileOnly "androidx.annotation:annotation:${ANDROIDX_ANNOTATIONS_VERSION}" + implementation "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN_VERSION}" + implementation "com.google.android.gms:play-services-location:${PLAY_SERVICES_LOCATION_VERSION}" + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:${KOTLIN_COROUTINES_VERSION}") + implementation "androidx.core:core:${ANDROIDX_CORE_VERSION}" +} + +android { + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + + defaultConfig { + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + } + + kotlinOptions { + freeCompilerArgs = ['-Xjvm-default=all', '-Xopt-in=kotlin.RequiresOptIn'] + jvmTarget = "1.8" + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} diff --git a/android-sdk-location/src/main/AndroidManifest.xml b/android-sdk-location/src/main/AndroidManifest.xml new file mode 100644 index 000000000..2ac4ce419 --- /dev/null +++ b/android-sdk-location/src/main/AndroidManifest.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/android-sdk-location/src/main/java/com/braze/location/BrazeActionReceiver.kt b/android-sdk-location/src/main/java/com/braze/location/BrazeActionReceiver.kt new file mode 100644 index 000000000..43165bd47 --- /dev/null +++ b/android-sdk-location/src/main/java/com/braze/location/BrazeActionReceiver.kt @@ -0,0 +1,155 @@ +package com.braze.location + +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.location.Location +import android.location.LocationManager +import android.os.Build +import androidx.annotation.Keep +import androidx.annotation.VisibleForTesting +import com.braze.BrazeInternal +import com.braze.Constants +import com.braze.enums.GeofenceTransitionType +import com.braze.models.outgoing.BrazeLocation +import com.braze.support.BrazeLogger.Priority.E +import com.braze.support.BrazeLogger.Priority.W +import com.braze.support.BrazeLogger.brazelog +import com.google.android.gms.location.Geofence +import com.google.android.gms.location.GeofencingEvent +import kotlinx.coroutines.DelicateCoroutinesApi +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch + +@Keep +class BrazeActionReceiver : BroadcastReceiver() { + @OptIn(DelicateCoroutinesApi::class) + override fun onReceive(context: Context?, intent: Intent?) { + if (intent == null) { + brazelog(W) { "BrazeActionReceiver received null intent. Doing nothing." } + return + } else if (context == null) { + brazelog(W) { "BrazeActionReceiver received null context. Doing nothing." } + return + } + val applicationContext = context.applicationContext + // This pending result allows us to perform work off the main thread and receive 10 seconds from the system + // to finish processing. By default, a BroadcastReceiver is allowed 5 seconds (due to the ANR limit) + // for processing. + val pendingResult = goAsync() + val actionReceiver = ActionReceiver(applicationContext, intent) + + GlobalScope.launch(Dispatchers.IO) { + actionReceiver.run() + pendingResult.finish() + } + } + + @VisibleForTesting + internal class ActionReceiver( + private val applicationContext: Context, + private val intent: Intent + ) { + private val action: String? = intent.action + fun run() { + try { + performWork() + } catch (e: Exception) { + // If the action receiver encounters an error, we still have to mark the broadcast receiver's work as finished. + brazelog(E, e) { + "Caught exception while performing the BrazeActionReceiver work. Action: $action Intent: $intent" + } + } + } + + /** + * Performs the work as specified by the intent action. + * + * @return True iff the work was perform successfully. + */ + @VisibleForTesting + fun performWork() { + brazelog { "Received intent with action $action" } + when (action) { + null -> { + brazelog { "Received intent with null action. Doing nothing." } + } + Constants.BRAZE_ACTION_RECEIVER_GEOFENCE_UPDATE_INTENT_ACTION -> { + brazelog { "BrazeActionReceiver received intent with geofence transition: $action" } + GeofencingEvent.fromIntent(intent)?.let { handleGeofenceEvent(applicationContext, it) } + } + Constants.BRAZE_ACTION_RECEIVER_SINGLE_LOCATION_UPDATE_INTENT_ACTION -> { + brazelog { "BrazeActionReceiver received intent with single location update: $action" } + val location = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + intent.extras?.getParcelable(LocationManager.KEY_LOCATION_CHANGED, Location::class.java) + } else { + @Suppress("DEPRECATION") + intent.extras?.get(LocationManager.KEY_LOCATION_CHANGED) as Location? + } + location?.let { handleSingleLocationUpdate(applicationContext, it) } + } + else -> { + brazelog(W) { "Unknown intent received in BrazeActionReceiver with action: $action" } + } + } + } + + companion object { + private fun handleSingleLocationUpdate(applicationContext: Context, location: Location): Boolean { + try { + BrazeInternal.logLocationRecordedEvent(applicationContext, BrazeLocation(location)) + } catch (e: Exception) { + brazelog(E, e) { "Exception while processing single location update" } + return false + } + return true + } + + /** + * Records all geofence transitions in the given geofence event. + * + * @param applicationContext The application context + * @param geofenceEvent Google Play Services geofencing event + * @return true if a geofence transition was recorded + */ + @VisibleForTesting + fun handleGeofenceEvent(applicationContext: Context, geofenceEvent: GeofencingEvent): Boolean { + if (geofenceEvent.hasError()) { + val errorCode = geofenceEvent.errorCode + brazelog(W) { "Location Services error: $errorCode" } + return false + } + + val transitionType = geofenceEvent.geofenceTransition + val triggeringGeofences = geofenceEvent.triggeringGeofences + return when { + Geofence.GEOFENCE_TRANSITION_ENTER == transitionType -> { + triggeringGeofences?.forEach { geofence -> + BrazeInternal.recordGeofenceTransition( + applicationContext, + geofence.requestId, + GeofenceTransitionType.ENTER + ) + } + true + } + Geofence.GEOFENCE_TRANSITION_EXIT == transitionType -> { + triggeringGeofences?.forEach { geofence -> + BrazeInternal.recordGeofenceTransition( + applicationContext, + geofence.requestId, + GeofenceTransitionType.EXIT + ) + } + true + } + else -> { + brazelog(W) { "Unsupported transition type received: $transitionType" } + false + } + } + } + } + } +} diff --git a/android-sdk-location/src/main/java/com/braze/location/BrazeInternalGeofenceApi.kt b/android-sdk-location/src/main/java/com/braze/location/BrazeInternalGeofenceApi.kt new file mode 100644 index 000000000..bbdf6152e --- /dev/null +++ b/android-sdk-location/src/main/java/com/braze/location/BrazeInternalGeofenceApi.kt @@ -0,0 +1,56 @@ +package com.braze.location + +import android.app.PendingIntent +import android.content.Context +import android.content.Intent +import com.braze.Constants +import com.braze.models.BrazeGeofence +import com.braze.support.IntentUtils +import com.google.android.gms.location.LocationServices + +/** + * An implementation of the geofence calls so that they are contained in a single, external + * module that clients don't need to include if they don't want location services. + */ +class BrazeInternalGeofenceApi : IBrazeGeofenceApi { + + /** + * @return the PendingIntent that should be fired when a geofence is triggered. + */ + override fun getGeofenceTransitionPendingIntent(context: Context): PendingIntent { + val geofenceIntent = Intent(Constants.BRAZE_ACTION_RECEIVER_GEOFENCE_UPDATE_INTENT_ACTION) + .setClass(context, BrazeActionReceiver::class.java) + val flags = PendingIntent.FLAG_UPDATE_CURRENT or IntentUtils.getMutablePendingIntentFlags() + return PendingIntent.getBroadcast(context, 0, geofenceIntent, flags) + } + + /** + * Teardown all geofences associated with the given intent. + */ + override fun teardownGeofences(applicationContext: Context, intent: PendingIntent) { + LocationServices.getGeofencingClient(applicationContext) + .removeGeofences(intent) + } + + /** + * Register a list of geofences. + * + * @param context Application context. + * @param geofenceList List of [BrazeGeofence] to be registered. + * @param geofenceRequestIntent The intent to fire when geofence is triggered. + */ + override fun registerGeofences( + context: Context, + geofenceList: List, + geofenceRequestIntent: PendingIntent + ) { + GooglePlayLocationUtils.registerGeofencesWithGooglePlayIfNecessary(context, geofenceList, geofenceRequestIntent) + } + + /** + * Deletes the geofence cache. + */ + override fun deleteRegisteredGeofenceCache(context: Context) { + GooglePlayLocationUtils.deleteRegisteredGeofenceCache(context) + } +} diff --git a/android-sdk-location/src/main/java/com/braze/location/BrazeInternalLocationApi.kt b/android-sdk-location/src/main/java/com/braze/location/BrazeInternalLocationApi.kt new file mode 100644 index 000000000..a0be20ab9 --- /dev/null +++ b/android-sdk-location/src/main/java/com/braze/location/BrazeInternalLocationApi.kt @@ -0,0 +1,200 @@ +package com.braze.location + +import android.Manifest +import android.app.PendingIntent +import android.content.Context +import android.content.Intent +import android.location.Location +import android.location.LocationManager +import android.os.Build +import androidx.annotation.VisibleForTesting +import com.braze.Constants +import com.braze.configuration.BrazeConfigurationProvider +import com.braze.enums.LocationProviderName +import com.braze.models.IBrazeLocation +import com.braze.models.outgoing.BrazeLocation +import com.braze.support.BrazeLogger.Priority.E +import com.braze.support.BrazeLogger.Priority.I +import com.braze.support.BrazeLogger.Priority.V +import com.braze.support.BrazeLogger.brazelog +import com.braze.support.IntentUtils +import com.braze.support.hasPermission +import com.braze.support.nowInMilliseconds +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.asExecutor +import java.util.* + +/** + * An implementation of the location calls so that they are contained in a single, external + * module that clients don't need to include if they don't want location services. + */ +class BrazeInternalLocationApi : IBrazeLocationApi { + private lateinit var context: Context + private lateinit var locationManager: LocationManager + private lateinit var appConfigurationProvider: BrazeConfigurationProvider + private lateinit var allowedLocationProviders: EnumSet + + private val isLocationCollectionEnabled + get() = if (appConfigurationProvider.isLocationCollectionEnabled) { + brazelog(I) { "Location collection enabled via sdk configuration." } + true + } else { + brazelog(I) { "Location collection disabled via sdk configuration." } + false + } + + /** + * Initialize the object with some external variables. This function should be called immediately + * after the object is created and should be called only once. + */ + override fun initWithContext( + context: Context, + allowedProviders: EnumSet, + appConfigurationProvider: BrazeConfigurationProvider + ) { + this.context = context + this.appConfigurationProvider = appConfigurationProvider + this.allowedLocationProviders = allowedProviders + locationManager = context.getSystemService(Context.LOCATION_SERVICE) as LocationManager + } + + /** + * Requests a location fix for the session on the device. + */ + @Suppress("MissingPermission", "ReturnCount") + override fun requestSingleLocationUpdate(manualLocationUpdateCallback: (location: IBrazeLocation) -> Unit): Boolean { + if (!isLocationCollectionEnabled) { + brazelog(I) { "Did not request single location update. Location collection is disabled." } + return false + } + val hasFinePermission = context.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) + val hasCoarsePermission = context.hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION) + if (!(hasCoarsePermission || hasFinePermission)) { + // Nothing we can do here without any permissions + brazelog(I) { "Did not request single location update. Neither fine nor coarse location permissions found." } + return false + } + + // Check for a GPS location + if (hasFinePermission) { + val lastKnownGpsLocationIfValid = + getLastKnownGpsLocationIfValid(locationManager) + if (lastKnownGpsLocationIfValid != null) { + brazelog { "Setting user location to last known GPS location: $lastKnownGpsLocationIfValid" } + manualLocationUpdateCallback.invoke(BrazeLocation(lastKnownGpsLocationIfValid)) + return true + } + } + val provider = getSuitableLocationProvider( + locationManager, + allowedLocationProviders, + hasFinePermission, + hasCoarsePermission + ) + if (provider == null) { + brazelog { "Could not request single location update. Could not find suitable location provider." } + return false + } + brazelog { "Requesting single location update with provider: $provider" } + return try { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + locationManager.getCurrentLocation( + provider, + null, + Dispatchers.IO.asExecutor() + ) { location: Location? -> + brazelog { "Location manager getCurrentLocation got location: $location" } + if (location != null) { + manualLocationUpdateCallback.invoke(BrazeLocation(location)) + } + } + } else { + requestSingleUpdateFromLocationManager(provider) + } + true + } catch (se: SecurityException) { + brazelog(E, se) { + "Failed to request single location update due to security exception from insufficient permissions." + } + false + } catch (e: Exception) { + brazelog(E, e) { "Failed to request single location update due to exception." } + false + } + } + + /** + * Determines the best location provider based on the permissions and list of providers allowed. + */ + @Suppress("ComplexCondition") + fun getSuitableLocationProvider( + locationManager: LocationManager, + allowedProviders: EnumSet, + hasFinePermission: Boolean, + hasCoarsePermission: Boolean + ): String? { + var provider: String? = null + // Check for our preferred providers in order. + // Order set in accordance with https://stackoverflow.com/a/6775456/3745724 + if (hasFinePermission + && allowedProviders.contains(LocationProviderName.GPS) + && locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) + ) { + provider = LocationManager.GPS_PROVIDER + } else if ((hasCoarsePermission || hasFinePermission) + && allowedProviders.contains(LocationProviderName.NETWORK) + && locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER) + ) { + provider = LocationManager.NETWORK_PROVIDER + } else if (hasFinePermission + && allowedProviders.contains(LocationProviderName.PASSIVE) + && locationManager.isProviderEnabled(LocationManager.PASSIVE_PROVIDER) + ) { + provider = LocationManager.PASSIVE_PROVIDER + } + return provider + } + + /** + * Returns the last known location from the [LocationManager.GPS_PROVIDER], if + * not older than [LAST_KNOWN_GPS_LOCATION_MAX_AGE_MS]. + * Assumes that the [Manifest.permission.ACCESS_FINE_LOCATION] permission is present. + */ + @Suppress("MissingPermission") + @VisibleForTesting + fun getLastKnownGpsLocationIfValid(locationManager: LocationManager): Location? { + if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { + return null + } + val lastKnownGpsLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) + ?: return null + + val ageMs = nowInMilliseconds() - lastKnownGpsLocation.time + if (ageMs > LAST_KNOWN_GPS_LOCATION_MAX_AGE_MS) { + brazelog(V) { "Last known GPS location is too old and will not be used. Age ms: $ageMs" } + return null + } + brazelog { "Using last known GPS location: $lastKnownGpsLocation" } + return lastKnownGpsLocation + } + + @Suppress("deprecation", "MissingPermission") + private fun requestSingleUpdateFromLocationManager(provider: String) { + val locationUpdateIntent = + Intent(Constants.BRAZE_ACTION_RECEIVER_SINGLE_LOCATION_UPDATE_INTENT_ACTION) + .setClass(context, BrazeActionReceiver::class.java) + val flags = PendingIntent.FLAG_UPDATE_CURRENT or IntentUtils.getMutablePendingIntentFlags() + val locationUpdatePendingIntent = + PendingIntent.getBroadcast(context, 0, locationUpdateIntent, flags) + // Using this deprecated method because new method only supports API 30+ + locationManager.requestSingleUpdate(provider, locationUpdatePendingIntent) + } + + companion object { + /** + * The oldest a location from [LocationManager.getLastKnownLocation] using [LocationManager.GPS_PROVIDER] + * can be used before requesting a new fix another provider. + */ + const val LAST_KNOWN_GPS_LOCATION_MAX_AGE_MS = 10 * 60 * 1000 // 10 Minutes + } +} diff --git a/android-sdk-location/src/main/java/com/braze/location/GooglePlayLocationUtils.kt b/android-sdk-location/src/main/java/com/braze/location/GooglePlayLocationUtils.kt new file mode 100644 index 000000000..a94b66ee7 --- /dev/null +++ b/android-sdk-location/src/main/java/com/braze/location/GooglePlayLocationUtils.kt @@ -0,0 +1,256 @@ +package com.braze.location + +import android.annotation.SuppressLint +import android.app.PendingIntent +import android.content.Context +import android.content.SharedPreferences +import com.braze.managers.BrazeGeofenceManager +import com.braze.managers.IBrazeGeofenceLocationUpdateListener +import com.braze.models.BrazeGeofence +import com.braze.models.outgoing.BrazeLocation +import com.braze.support.BrazeLogger.Priority.E +import com.braze.support.BrazeLogger.Priority.V +import com.braze.support.BrazeLogger.Priority.W +import com.braze.support.BrazeLogger.brazelog +import com.google.android.gms.common.api.ApiException +import com.google.android.gms.location.Geofence +import com.google.android.gms.location.GeofenceStatusCodes +import com.google.android.gms.location.GeofencingRequest +import com.google.android.gms.location.LocationServices +import com.google.android.gms.location.Priority + +@SuppressLint("MissingPermission") +object GooglePlayLocationUtils { + private const val REGISTERED_GEOFENCE_SHARED_PREFS_LOCATION = "com.appboy.support.geofences" + + /** + * Requests to register the given list of geofences with Google Play Location Services. + * + * If a given geofence is already registered with Google Play Location Services, it will not be + * needlessly re-registered. Geofences that are registered with Google Play Location Services but + * not included in the given list of geofences will be un-registered. + * + * If the given geofence list is empty, geofences will be un-registered and deleted from local + * storage. + * @param context used by shared preferences + * @param geofenceList list of [BrazeGeofence] objects + * @param geofenceRequestIntent pending intent to fire when geofences transition events occur + */ + @JvmStatic + fun registerGeofencesWithGooglePlayIfNecessary( + context: Context, + geofenceList: List, + geofenceRequestIntent: PendingIntent + ) { + try { + val prefs = getRegisteredGeofenceSharedPrefs(context) + val registeredGeofences = BrazeGeofenceManager.retrieveBrazeGeofencesFromLocalStorage(prefs) + + val newGeofencesToRegister = geofenceList.filter { newGeofence -> + registeredGeofences.none { registeredGeofence -> + registeredGeofence.id == newGeofence.id && registeredGeofence.equivalentServerData(newGeofence) + } + } + val obsoleteGeofenceIds = registeredGeofences.filter { registeredGeofence -> + newGeofencesToRegister.none { newGeofence -> + newGeofence.id == registeredGeofence.id + } + }.map { it.id } + + if (obsoleteGeofenceIds.isNotEmpty()) { + brazelog { "Un-registering ${obsoleteGeofenceIds.size} obsolete geofences from Google Play Services." } + removeGeofencesRegisteredWithGeofencingClient(context, obsoleteGeofenceIds) + } else { + brazelog { "No obsolete geofences need to be unregistered from Google Play Services." } + } + if (newGeofencesToRegister.isNotEmpty()) { + brazelog { "Registering ${newGeofencesToRegister.size} new geofences with Google Play Services." } + registerGeofencesWithGeofencingClient(context, newGeofencesToRegister, geofenceRequestIntent) + } else { + brazelog { "No new geofences need to be registered with Google Play Services." } + } + } catch (e: Exception) { + brazelog(E, e) { "Exception while adding geofences." } + } + } + + /** + * Requests a single location update from Google Play Location Services for the given pending intent. + * + * @param resultListener A callback of type [IBrazeGeofenceLocationUpdateListener] + * which will be informed of the result of location update. + */ + @JvmStatic + fun requestSingleLocationUpdateFromGooglePlay( + context: Context, + resultListener: IBrazeGeofenceLocationUpdateListener + ) { + try { + brazelog { "Requesting single location update from Google Play Services." } + LocationServices.getFusedLocationProviderClient(context) + .getCurrentLocation(Priority.PRIORITY_HIGH_ACCURACY, null) + .addOnSuccessListener { + brazelog(V) { "Single location request from Google Play services was successful." } + resultListener.onLocationRequestComplete(BrazeLocation(it)) + } + .addOnFailureListener { error: Exception? -> + brazelog(E, error) { "Failed to get single location update from Google Play services." } + resultListener.onLocationRequestComplete(null) + } + } catch (e: Exception) { + brazelog(W, e) { "Failed to request location update due to exception." } + } + } + + /** + * Delete the cache of registered geofences. This will cause any geofences passed to + * [.registerGeofencesWithGooglePlayIfNecessary] + * on the next call to that method to be registered. + */ + @JvmStatic + fun deleteRegisteredGeofenceCache(context: Context) { + brazelog { "Deleting registered geofence cache." } + getRegisteredGeofenceSharedPrefs(context).edit().clear().apply() + } + + /** + * Registers a list of [Geofence] with a [com.google.android.gms.location.GeofencingClient]. + * + * @param newGeofencesToRegister List of [BrazeGeofence]s to register + * @param geofenceRequestIntent A pending intent to fire on completion of adding the [Geofence]s with + * the [com.google.android.gms.location.GeofencingClient]. + */ + private fun registerGeofencesWithGeofencingClient( + context: Context, + newGeofencesToRegister: List, + geofenceRequestIntent: PendingIntent + ) { + val newGooglePlayGeofencesToRegister = newGeofencesToRegister.map { it.toGeofence() } + val geofencingRequest = GeofencingRequest.Builder() + .addGeofences(newGooglePlayGeofencesToRegister) // no initial trigger + .setInitialTrigger(0) + .build() + LocationServices.getGeofencingClient(context).addGeofences(geofencingRequest, geofenceRequestIntent) + .addOnSuccessListener { + brazelog { "Geofences successfully registered with Google Play Services." } + storeGeofencesToSharedPrefs(context, newGeofencesToRegister) + } + .addOnFailureListener { geofenceError: Exception? -> + if (geofenceError is ApiException) { + when (val statusCode = geofenceError.statusCode) { + GeofenceStatusCodes.GEOFENCE_TOO_MANY_GEOFENCES -> brazelog(W) { + "Geofences not registered with Google Play Services due to GEOFENCE_TOO_MANY_GEOFENCES: $statusCode" + } + GeofenceStatusCodes.GEOFENCE_TOO_MANY_PENDING_INTENTS -> brazelog(W) { + "Geofences not registered with Google Play Services due to GEOFENCE_TOO_MANY_PENDING_INTENTS: $statusCode" + } + GeofenceStatusCodes.GEOFENCE_NOT_AVAILABLE -> brazelog(W) { + "Geofences not registered with Google Play Services due to GEOFENCE_NOT_AVAILABLE: $statusCode" + } + GeofenceStatusCodes.SUCCESS -> + // Since we're in the failure listener, we don't expect this status code to appear. Nonetheless, it would + // be good to not surface this status code as unknown + brazelog { + "Received Geofence registration success code in failure block with Google Play Services." + } + else -> brazelog(W) { "Geofence pending result returned unknown status code: $statusCode" } + } + } else { + brazelog(E, geofenceError) { "Geofence exception encountered while adding geofences." } + } + } + } + + /** + * Un-registers a list of [Geofence] with a [com.google.android.gms.location.GeofencingClient]. + * + * @param obsoleteGeofenceIds List of [String]s containing Geofence IDs that needs to be un-registered + */ + private fun removeGeofencesRegisteredWithGeofencingClient(context: Context, obsoleteGeofenceIds: List) { + LocationServices.getGeofencingClient(context).removeGeofences(obsoleteGeofenceIds) + .addOnSuccessListener { + brazelog { "Geofences successfully un-registered with Google Play Services." } + removeGeofencesFromSharedPrefs(context, obsoleteGeofenceIds) + } + .addOnFailureListener { geofenceError: Exception? -> + if (geofenceError is ApiException) { + when (val statusCode = geofenceError.statusCode) { + GeofenceStatusCodes.GEOFENCE_TOO_MANY_GEOFENCES -> brazelog(W) { + "Geofences cannot be un-registered with Google Play Services due to GEOFENCE_TOO_MANY_GEOFENCES: $statusCode" + } + GeofenceStatusCodes.GEOFENCE_TOO_MANY_PENDING_INTENTS -> brazelog(W) { + "Geofences cannot be un-registered with Google Play Services due to GEOFENCE_TOO_MANY_PENDING_INTENTS: $statusCode" + } + GeofenceStatusCodes.GEOFENCE_NOT_AVAILABLE -> brazelog(W) { + "Geofences cannot be un-registered with Google Play Services due to GEOFENCE_NOT_AVAILABLE: $statusCode" + } + GeofenceStatusCodes.SUCCESS -> + // Since we're in the failure listener, we don't expect this status code to appear. Nonetheless, it would + // be good to not surface this status code as unknown + brazelog { + "Received Geofence un-registration success code in failure block with Google Play Services." + } + else -> brazelog(W) { "Geofence pending result returned unknown status code: $statusCode" } + } + } else { + brazelog(E, geofenceError) { "Geofence exception encountered while removing geofences." } + } + } + } + + /** + * Returns a [SharedPreferences] instance holding list of registered [BrazeGeofence]s. + */ + private fun getRegisteredGeofenceSharedPrefs(context: Context): SharedPreferences = + context.getSharedPreferences(REGISTERED_GEOFENCE_SHARED_PREFS_LOCATION, Context.MODE_PRIVATE) + + /** + * Stores the list of [BrazeGeofence] which are successfully registered. + * + * @param newGeofencesToRegister List of [BrazeGeofence]s to store in SharedPreferences + */ + private fun storeGeofencesToSharedPrefs(context: Context, newGeofencesToRegister: List) { + val editor = getRegisteredGeofenceSharedPrefs(context).edit() + for (brazeGeofence in newGeofencesToRegister) { + editor.putString(brazeGeofence.id, brazeGeofence.forJsonPut().toString()) + brazelog(V) { "Geofence with id: ${brazeGeofence.id} added to shared preferences." } + } + editor.apply() + } + + /** + * Removes the list of [BrazeGeofence] which are now un-registered with Google Play Services. + * + * @param obsoleteGeofenceIds List of [String]s containing Geofence IDs that are un-registered + */ + private fun removeGeofencesFromSharedPrefs(context: Context, obsoleteGeofenceIds: List) { + val editor = getRegisteredGeofenceSharedPrefs(context).edit() + for (id in obsoleteGeofenceIds) { + editor.remove(id) + brazelog(V) { "Geofence with id: $id removed from shared preferences." } + } + editor.apply() + } +} + +/** + * Creates a Google Play Location Services Geofence object from a BrazeGeofence. + * @return A Geofence object. + */ +fun BrazeGeofence.toGeofence(): Geofence { + val builder = Geofence.Builder() + builder + .setRequestId(id) + .setCircularRegion(latitude, longitude, radiusMeter.toFloat()) + .setNotificationResponsiveness(notificationResponsivenessMs) + .setExpirationDuration(Geofence.NEVER_EXPIRE) + var transitionTypes = 0 + if (enterEvents) { + transitionTypes = transitionTypes or Geofence.GEOFENCE_TRANSITION_ENTER + } + if (exitEvents) { + transitionTypes = transitionTypes or Geofence.GEOFENCE_TRANSITION_EXIT + } + builder.setTransitionTypes(transitionTypes) + return builder.build() +} diff --git a/android-sdk-ui/braze-consumer-proguard-rules.pro b/android-sdk-ui/braze-consumer-proguard-rules.pro index cba7efcd6..95c4ae3a5 100644 --- a/android-sdk-ui/braze-consumer-proguard-rules.pro +++ b/android-sdk-ui/braze-consumer-proguard-rules.pro @@ -8,11 +8,11 @@ # http://developer.android.com/guide/developing/tools/proguard.html # # See https://github.com/Appboy/appboy-android-sdk/issues/49 --keepnames class com.appboy.ui.** { *; } --keepnames class com.appboy.** { *; } +-keepnames class com.braze.ui.** { *; } +-keepnames class com.braze.** { *; } -keepnames class bo.app.** { *; } --dontwarn com.appboy.ui.** +-dontwarn com.braze.ui.** -dontwarn com.google.firebase.messaging.** -keepclassmembers class * { diff --git a/android-sdk-ui/src/main/AndroidManifest.xml b/android-sdk-ui/src/main/AndroidManifest.xml index f055f6d6f..817cdaed5 100644 --- a/android-sdk-ui/src/main/AndroidManifest.xml +++ b/android-sdk-ui/src/main/AndroidManifest.xml @@ -1,19 +1,13 @@ + package="com.braze.ui"> - - { - @Suppress("DEPRECATION") - appboySuffixedPushIntent = Intent(context.packageName + APPBOY_NOTIFICATION_OPENED_SUFFIX) - brazePushIntent = Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_OPENED).setPackage(context.packageName) + Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_OPENED).setPackage(context.packageName) } BrazeNotificationBroadcastType.RECEIVED -> { - @Suppress("DEPRECATION") - appboySuffixedPushIntent = Intent(context.packageName + APPBOY_NOTIFICATION_RECEIVED_SUFFIX) - brazePushIntent = Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_RECEIVED).setPackage(context.packageName) + Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_RECEIVED).setPackage(context.packageName) } BrazeNotificationBroadcastType.DELETED -> { - @Suppress("DEPRECATION") - appboySuffixedPushIntent = Intent(context.packageName + APPBOY_NOTIFICATION_DELETED_SUFFIX) - brazePushIntent = Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_DELETED).setPackage(context.packageName) + Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_DELETED).setPackage(context.packageName) } } - brazelog(V) { "Sending original Appboy broadcast receiver intent for $broadcastType" } - sendPushActionIntent(context, appboySuffixedPushIntent, notificationExtras) brazelog(V) { "Sending Braze broadcast receiver intent for $broadcastType" } sendPushActionIntent(context, brazePushIntent, notificationExtras) diff --git a/android-sdk-ui/src/main/java/com/braze/push/BrazePushReceiver.kt b/android-sdk-ui/src/main/java/com/braze/push/BrazePushReceiver.kt index e4d95466b..754c05109 100644 --- a/android-sdk-ui/src/main/java/com/braze/push/BrazePushReceiver.kt +++ b/android-sdk-ui/src/main/java/com/braze/push/BrazePushReceiver.kt @@ -6,8 +6,8 @@ import android.content.Intent import android.os.Bundle import androidx.annotation.VisibleForTesting import androidx.core.app.NotificationManagerCompat -import com.appboy.models.push.BrazeNotificationPayload -import com.appboy.models.push.BrazeNotificationPayload.Companion.getAttachedBrazeExtras +import com.braze.models.push.BrazeNotificationPayload +import com.braze.models.push.BrazeNotificationPayload.Companion.getAttachedBrazeExtras import com.braze.Braze import com.braze.BrazeInternal.applyPendingRuntimeConfiguration import com.braze.BrazeInternal.handleInAppMessageTestPush diff --git a/android-sdk-ui/src/main/java/com/braze/ui/BrazeDeeplinkHandler.kt b/android-sdk-ui/src/main/java/com/braze/ui/BrazeDeeplinkHandler.kt index 1e6af08b6..3d567f816 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/BrazeDeeplinkHandler.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/BrazeDeeplinkHandler.kt @@ -4,7 +4,7 @@ import android.content.Context import android.content.Intent import android.net.Uri import android.os.Bundle -import com.appboy.enums.Channel +import com.braze.enums.Channel import com.braze.IBrazeDeeplinkHandler import com.braze.IBrazeDeeplinkHandler.IntentFlagPurpose import com.braze.support.BrazeLogger.Priority.E diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/AppboyFeedFragment.java b/android-sdk-ui/src/main/java/com/braze/ui/BrazeFeedFragment.java similarity index 91% rename from android-sdk-ui/src/main/java/com/appboy/ui/AppboyFeedFragment.java rename to android-sdk-ui/src/main/java/com/braze/ui/BrazeFeedFragment.java index 44ffc432d..e88151654 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/AppboyFeedFragment.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/BrazeFeedFragment.java @@ -1,4 +1,4 @@ -package com.appboy.ui; +package com.braze.ui; import android.annotation.SuppressLint; import android.app.Activity; @@ -22,21 +22,21 @@ import androidx.fragment.app.ListFragment; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import com.appboy.enums.CardCategory; -import com.appboy.events.FeedUpdatedEvent; -import com.braze.events.IEventSubscriber; -import com.appboy.models.cards.Card; -import com.appboy.ui.adapters.AppboyListAdapter; +import com.braze.events.FeedUpdatedEvent; import com.braze.Braze; +import com.braze.enums.CardCategory; +import com.braze.events.IEventSubscriber; +import com.braze.models.cards.Card; import com.braze.support.BrazeLogger; +import com.braze.ui.adapters.BrazeListAdapter; import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; import java.util.List; -public class AppboyFeedFragment extends ListFragment implements SwipeRefreshLayout.OnRefreshListener { - private static final String TAG = BrazeLogger.getBrazeLogTag(AppboyFeedFragment.class); +public class BrazeFeedFragment extends ListFragment implements SwipeRefreshLayout.OnRefreshListener { + private static final String TAG = BrazeLogger.getBrazeLogTag(BrazeFeedFragment.class); private static final int NETWORK_PROBLEM_WARNING_MS = 5000; private static final int MAX_FEED_TTL_SECONDS = 60; private static final long AUTO_HIDE_REFRESH_INDICATOR_DELAY_MS = 2500L; @@ -65,7 +65,7 @@ public void run() { }; private IEventSubscriber mFeedUpdatedSubscriber; - private AppboyListAdapter mAdapter; + private BrazeListAdapter mAdapter; private LinearLayout mNetworkErrorLayout; private LinearLayout mEmptyFeedLayout; private ProgressBar mLoadingSpinner; @@ -91,7 +91,7 @@ public void run() { public void onAttach(final Context context) { super.onAttach(context); if (mAdapter == null) { - mAdapter = new AppboyListAdapter(context, R.id.tag, new ArrayList<>()); + mAdapter = new BrazeListAdapter(context, R.id.tag, new ArrayList<>()); mCategories = CardCategory.getAllCategories(); } mGestureDetector = new GestureDetectorCompat(context, new FeedGestureListener()); @@ -99,19 +99,19 @@ public void onAttach(final Context context) { @Override public View onCreateView(LayoutInflater layoutInflater, ViewGroup container, Bundle savedInstanceState) { - View view = layoutInflater.inflate(R.layout.com_appboy_feed, container, false); - mNetworkErrorLayout = view.findViewById(R.id.com_appboy_feed_network_error); - mLoadingSpinner = view.findViewById(R.id.com_appboy_feed_loading_spinner); - mEmptyFeedLayout = view.findViewById(R.id.com_appboy_feed_empty_feed); - mFeedRootLayout = view.findViewById(R.id.com_appboy_feed_root); - mFeedSwipeLayout = view.findViewById(R.id.appboy_feed_swipe_container); + View view = layoutInflater.inflate(R.layout.com_braze_feed, container, false); + mNetworkErrorLayout = view.findViewById(R.id.com_braze_feed_network_error); + mLoadingSpinner = view.findViewById(R.id.com_braze_feed_loading_spinner); + mEmptyFeedLayout = view.findViewById(R.id.com_braze_feed_empty_feed); + mFeedRootLayout = view.findViewById(R.id.com_braze_feed_root); + mFeedSwipeLayout = view.findViewById(R.id.braze_feed_swipe_container); mFeedSwipeLayout.setOnRefreshListener(this); mFeedSwipeLayout.setEnabled(false); - mFeedSwipeLayout.setColorSchemeResources(R.color.com_appboy_newsfeed_swipe_refresh_color_1, - R.color.com_appboy_newsfeed_swipe_refresh_color_2, - R.color.com_appboy_newsfeed_swipe_refresh_color_3, - R.color.com_appboy_newsfeed_swipe_refresh_color_4); - mTransparentFullBoundsContainerView = view.findViewById(R.id.com_appboy_feed_transparent_full_bounds_container_view); + mFeedSwipeLayout.setColorSchemeResources(R.color.com_braze_newsfeed_swipe_refresh_color_1, + R.color.com_braze_newsfeed_swipe_refresh_color_2, + R.color.com_braze_newsfeed_swipe_refresh_color_3, + R.color.com_braze_newsfeed_swipe_refresh_color_4); + mTransparentFullBoundsContainerView = view.findViewById(R.id.com_braze_feed_transparent_full_bounds_container_view); return view; } @@ -133,8 +133,8 @@ public void onViewCreated(View view, Bundle savedInstanceState) { final ListView listView = getListView(); // Inflating these views without a view root is valid since they have no parent layout information // that needs to be respected. - listView.addHeaderView(inflater.inflate(R.layout.com_appboy_feed_header, null)); - listView.addFooterView(inflater.inflate(R.layout.com_appboy_feed_footer, null)); + listView.addHeaderView(inflater.inflate(R.layout.com_braze_feed_header, null)); + listView.addFooterView(inflater.inflate(R.layout.com_braze_feed_footer, null)); mFeedRootLayout.setOnTouchListener((currentView, motionEvent) -> { // Send touch events from the background view to the gesture detector to enable margin listview scrolling @@ -375,7 +375,7 @@ public void setCategory(CardCategory category) { } /** - * Calling this method will make AppboyFeedFragment display a list of cards where each card belongs + * Calling this method will make BrazeFeedFragment display a list of cards where each card belongs * to at least one of the given categories. * When there are no cards in those categories, this method returns an empty list. * When the passed in categories are null, all cards will be returned. @@ -386,7 +386,7 @@ public void setCategory(CardCategory category) { */ public void setCategories(EnumSet categories) { if (categories == null) { - BrazeLogger.i(TAG, "The categories passed into setCategories are null, AppboyFeedFragment is going to display all the cards in cache."); + BrazeLogger.i(TAG, "The categories passed into setCategories are null, BrazeFeedFragment is going to display all the cards in cache."); mCategories = CardCategory.getAllCategories(); } else if (categories.isEmpty()) { BrazeLogger.w(TAG, "The categories set had no elements and have been ignored. Please pass a valid EnumSet of CardCategory."); diff --git a/android-sdk-ui/src/main/java/com/braze/ui/BrazeWebViewActivity.kt b/android-sdk-ui/src/main/java/com/braze/ui/BrazeWebViewActivity.kt index 9d9496045..4209ed8d5 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/BrazeWebViewActivity.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/BrazeWebViewActivity.kt @@ -18,8 +18,7 @@ import android.webkit.WebViewClient import androidx.annotation.RequiresApi import androidx.fragment.app.FragmentActivity import com.braze.Constants -import com.appboy.enums.Channel -import com.appboy.ui.R +import com.braze.enums.Channel import com.braze.support.BrazeLogger.Priority.E import com.braze.support.BrazeLogger.Priority.I import com.braze.support.BrazeLogger.brazelog @@ -103,6 +102,7 @@ open class BrazeWebViewActivity : FragmentActivity() { return didHandleUrl ?: super.shouldOverrideUrlLoading(view, request) } + @Deprecated("Deprecated in Java") @Suppress("deprecation") override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean { val didHandleUrl = handleUrlOverride(view.context, url) diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/AppboyXamarinFormsFeedFragment.java b/android-sdk-ui/src/main/java/com/braze/ui/BrazeXamarinFormsFeedFragment.java similarity index 89% rename from android-sdk-ui/src/main/java/com/appboy/ui/AppboyXamarinFormsFeedFragment.java rename to android-sdk-ui/src/main/java/com/braze/ui/BrazeXamarinFormsFeedFragment.java index 57d5075c5..fb35146f7 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/AppboyXamarinFormsFeedFragment.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/BrazeXamarinFormsFeedFragment.java @@ -1,4 +1,4 @@ -package com.appboy.ui; +package com.braze.ui; import android.annotation.SuppressLint; import android.app.Activity; @@ -20,20 +20,20 @@ import androidx.core.view.GestureDetectorCompat; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import com.appboy.enums.CardCategory; -import com.appboy.events.FeedUpdatedEvent; -import com.braze.events.IEventSubscriber; -import com.appboy.ui.adapters.AppboyListAdapter; +import com.braze.events.FeedUpdatedEvent; import com.braze.Braze; import com.braze.IBraze; +import com.braze.enums.CardCategory; +import com.braze.events.IEventSubscriber; import com.braze.support.BrazeLogger; +import com.braze.ui.adapters.BrazeListAdapter; import java.util.ArrayList; import java.util.EnumSet; @SuppressWarnings({"PMD.UnnecessaryConstructor", "deprecation"}) -public class AppboyXamarinFormsFeedFragment extends android.app.ListFragment implements SwipeRefreshLayout.OnRefreshListener { - private static final String TAG = BrazeLogger.getBrazeLogTag(AppboyXamarinFormsFeedFragment.class); +public class BrazeXamarinFormsFeedFragment extends android.app.ListFragment implements SwipeRefreshLayout.OnRefreshListener { + private static final String TAG = BrazeLogger.getBrazeLogTag(BrazeXamarinFormsFeedFragment.class); private static final int NETWORK_PROBLEM_WARNING_MS = 5000; private static final int MAX_FEED_TTL_SECONDS = 60; private static final long AUTO_HIDE_REFRESH_INDICATOR_DELAY_MS = 2500L; @@ -55,7 +55,7 @@ public void run() { private IBraze mBraze; private IEventSubscriber mFeedUpdatedSubscriber; - private AppboyListAdapter mAdapter; + private BrazeListAdapter mAdapter; private LinearLayout mNetworkErrorLayout; private LinearLayout mEmptyFeedLayout; private ProgressBar mLoadingSpinner; @@ -72,7 +72,7 @@ public void run() { // when their respective views are visible. private View mTransparentFullBoundsContainerView; - public AppboyXamarinFormsFeedFragment() { + public BrazeXamarinFormsFeedFragment() { } @Override @@ -80,7 +80,7 @@ public void onAttach(final Context context) { super.onAttach(context); mBraze = Braze.getInstance(context); if (mAdapter == null) { - mAdapter = new AppboyListAdapter(context, R.id.tag, new ArrayList<>()); + mAdapter = new BrazeListAdapter(context, R.id.tag, new ArrayList<>()); mCategories = CardCategory.getAllCategories(); } setRetainInstance(true); @@ -89,19 +89,19 @@ public void onAttach(final Context context) { @Override public View onCreateView(LayoutInflater layoutInflater, ViewGroup container, Bundle savedInstanceState) { - View view = layoutInflater.inflate(R.layout.com_appboy_feed, container, false); - mNetworkErrorLayout = view.findViewById(R.id.com_appboy_feed_network_error); - mLoadingSpinner = view.findViewById(R.id.com_appboy_feed_loading_spinner); - mEmptyFeedLayout = view.findViewById(R.id.com_appboy_feed_empty_feed); - mFeedRootLayout = view.findViewById(R.id.com_appboy_feed_root); - mFeedSwipeLayout = view.findViewById(R.id.appboy_feed_swipe_container); + View view = layoutInflater.inflate(R.layout.com_braze_feed, container, false); + mNetworkErrorLayout = view.findViewById(R.id.com_braze_feed_network_error); + mLoadingSpinner = view.findViewById(R.id.com_braze_feed_loading_spinner); + mEmptyFeedLayout = view.findViewById(R.id.com_braze_feed_empty_feed); + mFeedRootLayout = view.findViewById(R.id.com_braze_feed_root); + mFeedSwipeLayout = view.findViewById(R.id.braze_feed_swipe_container); mFeedSwipeLayout.setOnRefreshListener(this); mFeedSwipeLayout.setEnabled(false); - mFeedSwipeLayout.setColorSchemeResources(R.color.com_appboy_newsfeed_swipe_refresh_color_1, - R.color.com_appboy_newsfeed_swipe_refresh_color_2, - R.color.com_appboy_newsfeed_swipe_refresh_color_3, - R.color.com_appboy_newsfeed_swipe_refresh_color_4); - mTransparentFullBoundsContainerView = view.findViewById(R.id.com_appboy_feed_transparent_full_bounds_container_view); + mFeedSwipeLayout.setColorSchemeResources(R.color.com_braze_newsfeed_swipe_refresh_color_1, + R.color.com_braze_newsfeed_swipe_refresh_color_2, + R.color.com_braze_newsfeed_swipe_refresh_color_3, + R.color.com_braze_newsfeed_swipe_refresh_color_4); + mTransparentFullBoundsContainerView = view.findViewById(R.id.com_braze_feed_transparent_full_bounds_container_view); return view; } @@ -120,8 +120,8 @@ public void onActivityCreated(Bundle savedInstanceState) { // away, as opposed to being a permanent frame around the feed. LayoutInflater inflater = LayoutInflater.from(getActivity()); final ListView listView = getListView(); - listView.addHeaderView(inflater.inflate(R.layout.com_appboy_feed_header, null)); - listView.addFooterView(inflater.inflate(R.layout.com_appboy_feed_footer, null)); + listView.addHeaderView(inflater.inflate(R.layout.com_braze_feed_header, null)); + listView.addFooterView(inflater.inflate(R.layout.com_braze_feed_footer, null)); mFeedRootLayout.setOnTouchListener((view, motionEvent) -> { // Send touch events from the background view to the gesture detector to enable margin listview scrolling @@ -293,7 +293,7 @@ public void setCategory(CardCategory category) { } /** - * Calling this method will make AppboyFeedFragment display a list of cards where each card belongs + * Calling this method will make BrazeFeedFragment display a list of cards where each card belongs * to at least one of the given categories. * When there are no cards in those categories, this method returns an empty list. * When the passed in categories are null, all cards will be returned. @@ -304,7 +304,7 @@ public void setCategory(CardCategory category) { */ public void setCategories(EnumSet categories) { if (categories == null) { - BrazeLogger.i(TAG, "The categories passed into setCategories are null, AppboyFeedFragment is going to display all the cards in cache."); + BrazeLogger.i(TAG, "The categories passed into setCategories are null, BrazeFeedFragment is going to display all the cards in cache."); mCategories = CardCategory.getAllCategories(); } else if (categories.isEmpty()) { BrazeLogger.w(TAG, "The categories set had no elements and have been ignored. Please pass a valid EnumSet of CardCategory."); diff --git a/android-sdk-ui/src/main/java/com/braze/ui/actions/IAction.kt b/android-sdk-ui/src/main/java/com/braze/ui/actions/IAction.kt index 3eb566f6b..eb85261d5 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/actions/IAction.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/actions/IAction.kt @@ -1,7 +1,7 @@ package com.braze.ui.actions import android.content.Context -import com.appboy.enums.Channel +import com.braze.enums.Channel interface IAction { val channel: Channel diff --git a/android-sdk-ui/src/main/java/com/braze/ui/actions/NewsfeedAction.kt b/android-sdk-ui/src/main/java/com/braze/ui/actions/NewsfeedAction.kt index d3f07881a..3aa2bafe4 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/actions/NewsfeedAction.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/actions/NewsfeedAction.kt @@ -3,21 +3,21 @@ package com.braze.ui.actions import android.content.Context import android.content.Intent import android.os.Bundle -import com.appboy.enums.Channel -import com.appboy.ui.activities.AppboyFeedActivity +import com.braze.enums.Channel +import com.braze.ui.activities.BrazeFeedActivity import com.braze.support.BrazeLogger.Priority.E import com.braze.support.BrazeLogger.brazelog open class NewsfeedAction(val extras: Bundle?, override val channel: Channel) : IAction { override fun execute(context: Context) { try { - val intent = Intent(context, AppboyFeedActivity::class.java) + val intent = Intent(context, BrazeFeedActivity::class.java) if (extras != null) { intent.putExtras(extras) } context.startActivity(intent) } catch (e: Exception) { - brazelog(E, e) { "AppboyFeedActivity was not opened successfully." } + brazelog(E, e) { "BrazeFeedActivity was not opened successfully." } } } } diff --git a/android-sdk-ui/src/main/java/com/braze/ui/actions/UriAction.kt b/android-sdk-ui/src/main/java/com/braze/ui/actions/UriAction.kt index 419b836a1..3fafbd28a 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/actions/UriAction.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/actions/UriAction.kt @@ -10,7 +10,7 @@ import android.os.Build import android.os.Bundle import androidx.annotation.VisibleForTesting import com.braze.Constants -import com.appboy.enums.Channel +import com.braze.enums.Channel import com.braze.IBrazeDeeplinkHandler import com.braze.configuration.BrazeConfigurationProvider import com.braze.support.BrazeLogger.Priority.E diff --git a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/BrazeActionParser.kt b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/BrazeActionParser.kt index 2f77d2377..d5e4790cb 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/BrazeActionParser.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/BrazeActionParser.kt @@ -3,7 +3,7 @@ package com.braze.ui.actions.brazeactions import android.content.Context import android.net.Uri import android.util.Base64 -import com.appboy.enums.Channel +import com.braze.enums.Channel import com.braze.support.BrazeLogger.Priority.E import com.braze.support.BrazeLogger.Priority.I import com.braze.support.BrazeLogger.Priority.V diff --git a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/BrazeActionUtils.kt b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/BrazeActionUtils.kt index f58fa2ae4..8b2f6187e 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/BrazeActionUtils.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/BrazeActionUtils.kt @@ -3,7 +3,7 @@ package com.braze.ui.actions.brazeactions import android.net.Uri -import com.appboy.models.cards.Card +import com.braze.models.cards.Card import com.braze.models.inappmessage.IInAppMessage import com.braze.models.inappmessage.IInAppMessageImmersive import com.braze.models.inappmessage.MessageButton diff --git a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/SetEmailSubscriptionStep.kt b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/SetEmailSubscriptionStep.kt index a391abbec..8da6b08f1 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/SetEmailSubscriptionStep.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/SetEmailSubscriptionStep.kt @@ -1,7 +1,7 @@ package com.braze.ui.actions.brazeactions.steps import android.content.Context -import com.appboy.enums.NotificationSubscriptionType +import com.braze.enums.NotificationSubscriptionType import com.braze.Braze import com.braze.support.BrazeLogger.brazeLogTag import com.braze.support.BrazeLogger.brazelog diff --git a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/SetPushNotificationSubscriptionStep.kt b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/SetPushNotificationSubscriptionStep.kt index 7fd3775c0..829110f20 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/SetPushNotificationSubscriptionStep.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/SetPushNotificationSubscriptionStep.kt @@ -1,7 +1,7 @@ package com.braze.ui.actions.brazeactions.steps import android.content.Context -import com.appboy.enums.NotificationSubscriptionType +import com.braze.enums.NotificationSubscriptionType import com.braze.Braze import com.braze.support.BrazeLogger.brazeLogTag import com.braze.support.BrazeLogger.brazelog diff --git a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/StepData.kt b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/StepData.kt index 6b56f573a..820456d6a 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/StepData.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/actions/brazeactions/steps/StepData.kt @@ -1,7 +1,7 @@ package com.braze.ui.actions.brazeactions.steps import androidx.annotation.VisibleForTesting -import com.appboy.enums.Channel +import com.braze.enums.Channel import com.braze.models.outgoing.BrazeProperties import com.braze.support.BrazeLogger.brazelog import com.braze.support.getPrettyPrintedString diff --git a/android-sdk-ui/src/main/java/com/braze/ui/activities/BrazeFeedActivity.java b/android-sdk-ui/src/main/java/com/braze/ui/activities/BrazeFeedActivity.java new file mode 100644 index 000000000..39e3c0f30 --- /dev/null +++ b/android-sdk-ui/src/main/java/com/braze/ui/activities/BrazeFeedActivity.java @@ -0,0 +1,20 @@ +package com.braze.ui.activities; + +import android.os.Bundle; + +import com.braze.ui.R; + +/** + * The BrazeFeedActivity in an Activity class that displays the Braze News Feed Fragment. This + * class can be used to integrate the Braze News Feed as an Activity. + * + * Note: To integrate the Braze News Feed as a Fragment instead of an Activity, use the + * {@link BrazeFeedFragment} class. + */ +public class BrazeFeedActivity extends BrazeBaseFragmentActivity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.com_braze_feed_activity); + } +} diff --git a/android-sdk-ui/src/main/java/com/braze/ui/activities/ContentCardsActivity.kt b/android-sdk-ui/src/main/java/com/braze/ui/activities/ContentCardsActivity.kt index 8763a8bed..204f71625 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/activities/ContentCardsActivity.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/activities/ContentCardsActivity.kt @@ -1,7 +1,7 @@ package com.braze.ui.activities import android.os.Bundle -import com.appboy.ui.R +import com.braze.ui.R /** * The [ContentCardsActivity] in an Activity class that displays the Braze Content Cards diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/adapters/AppboyListAdapter.java b/android-sdk-ui/src/main/java/com/braze/ui/adapters/BrazeListAdapter.java similarity index 86% rename from android-sdk-ui/src/main/java/com/appboy/ui/adapters/AppboyListAdapter.java rename to android-sdk-ui/src/main/java/com/braze/ui/adapters/BrazeListAdapter.java index 1e81d9616..61743ed1f 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/adapters/AppboyListAdapter.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/adapters/BrazeListAdapter.java @@ -1,4 +1,4 @@ -package com.appboy.ui.adapters; +package com.braze.ui.adapters; import android.content.Context; import android.view.View; @@ -7,17 +7,17 @@ import androidx.annotation.NonNull; -import com.appboy.models.cards.BannerImageCard; -import com.appboy.models.cards.CaptionedImageCard; -import com.appboy.models.cards.Card; -import com.appboy.models.cards.ShortNewsCard; -import com.appboy.models.cards.TextAnnouncementCard; -import com.appboy.ui.feed.view.BaseFeedCardView; -import com.appboy.ui.widget.BannerImageCardView; -import com.appboy.ui.widget.CaptionedImageCardView; -import com.appboy.ui.widget.DefaultCardView; -import com.appboy.ui.widget.ShortNewsCardView; -import com.appboy.ui.widget.TextAnnouncementCardView; +import com.braze.models.cards.BannerImageCard; +import com.braze.models.cards.CaptionedImageCard; +import com.braze.models.cards.Card; +import com.braze.models.cards.ShortNewsCard; +import com.braze.models.cards.TextAnnouncementCard; +import com.braze.ui.feed.view.BaseFeedCardView; +import com.braze.ui.widget.BannerImageCardView; +import com.braze.ui.widget.CaptionedImageCardView; +import com.braze.ui.widget.DefaultCardView; +import com.braze.ui.widget.ShortNewsCardView; +import com.braze.ui.widget.TextAnnouncementCardView; import com.braze.support.BrazeLogger; import java.util.HashSet; @@ -40,17 +40,17 @@ * that cards that come into view will be tracked according to the description above. *

* Adding and removing cards to and from the adapter should be done using the following synchronized - * methods: {@link com.appboy.ui.adapters.AppboyListAdapter#add(Card)}, - * {@link com.appboy.ui.adapters.AppboyListAdapter#clear()}clear(), - * {@link com.appboy.ui.adapters.AppboyListAdapter#replaceFeed(java.util.List)} + * methods: {@link com.braze.ui.adapters.BrazeListAdapter#add(Card)}, + * {@link com.braze.ui.adapters.BrazeListAdapter#clear()}clear(), + * {@link com.braze.ui.adapters.BrazeListAdapter#replaceFeed(java.util.List)} */ -public class AppboyListAdapter extends ArrayAdapter { - private static final String TAG = BrazeLogger.getBrazeLogTag(AppboyListAdapter.class); +public class BrazeListAdapter extends ArrayAdapter { + private static final String TAG = BrazeLogger.getBrazeLogTag(BrazeListAdapter.class); private final Context mContext; private final Set mCardIdImpressions; - public AppboyListAdapter(Context context, int layoutResourceId, List cards) { + public BrazeListAdapter(Context context, int layoutResourceId, List cards) { super(context, layoutResourceId, cards); mContext = context; mCardIdImpressions = new HashSet<>(); diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/ContentCardsFragment.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/ContentCardsFragment.kt index b34c99240..0d83c74a4 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/ContentCardsFragment.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/ContentCardsFragment.kt @@ -13,7 +13,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.SimpleItemAnimator import androidx.swiperefreshlayout.widget.SwipeRefreshLayout -import com.appboy.ui.R +import com.braze.ui.R import com.braze.Braze import com.braze.coroutine.BrazeCoroutineScope import com.braze.events.ContentCardsUpdatedEvent @@ -114,7 +114,7 @@ open class ContentCardsFragment : Fragment(), SwipeRefreshLayout.OnRefreshListen ): View? { val rootView = inflater.inflate(R.layout.com_braze_content_cards, container, false) contentCardsRecyclerView = rootView.findViewById(R.id.com_braze_content_cards_recycler) - contentCardsSwipeLayout = rootView.findViewById(R.id.appboy_content_cards_swipe_container) + contentCardsSwipeLayout = rootView.findViewById(R.id.braze_content_cards_swipe_container) contentCardsSwipeLayout?.setOnRefreshListener(this) contentCardsSwipeLayout?.setColorSchemeResources( R.color.com_braze_content_cards_swipe_refresh_color_1, @@ -337,7 +337,7 @@ open class ContentCardsFragment : Fragment(), SwipeRefreshLayout.OnRefreshListen context?.applicationContext?.let { applicationContext -> Toast.makeText( applicationContext, - applicationContext.getString(R.string.com_appboy_feed_connection_error_title), + applicationContext.getString(R.string.com_braze_feed_connection_error_title), Toast.LENGTH_LONG ).show() } diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/adapters/ContentCardAdapter.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/adapters/ContentCardAdapter.kt index ecc3b87a1..305779eff 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/adapters/ContentCardAdapter.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/adapters/ContentCardAdapter.kt @@ -8,7 +8,7 @@ import androidx.annotation.VisibleForTesting import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView -import com.appboy.models.cards.Card +import com.braze.models.cards.Card import com.braze.support.BrazeLogger.Priority.V import com.braze.support.BrazeLogger.brazelog import com.braze.ui.contentcards.handlers.IContentCardsViewBindingHandler diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/adapters/EmptyContentCardsAdapter.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/adapters/EmptyContentCardsAdapter.kt index 1d7ffd32a..c0c100ed9 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/adapters/EmptyContentCardsAdapter.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/adapters/EmptyContentCardsAdapter.kt @@ -4,7 +4,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView -import com.appboy.ui.R +import com.braze.ui.R /** * This adapter displays a single, full width/height item. This item diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/DefaultContentCardsUpdateHandler.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/DefaultContentCardsUpdateHandler.kt index 34fed9fcb..37eb43ad6 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/DefaultContentCardsUpdateHandler.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/DefaultContentCardsUpdateHandler.kt @@ -2,10 +2,9 @@ package com.braze.ui.contentcards.handlers import android.os.Parcel import android.os.Parcelable -import com.appboy.models.cards.Card import com.braze.events.ContentCardsUpdatedEvent +import com.braze.models.cards.Card import com.braze.ui.actions.brazeactions.containsInvalidBrazeAction -import java.util.* class DefaultContentCardsUpdateHandler : IContentCardsUpdateHandler { override fun handleCardUpdate(event: ContentCardsUpdatedEvent): List { @@ -19,9 +18,9 @@ class DefaultContentCardsUpdateHandler : IContentCardsUpdateHandler { !cardA.isPinned && cardB.isPinned -> 1 // At this point, both A & B are pinned or both A & B are non-pinned // A displays above B if A is newer - cardA.updated > cardB.updated -> -1 + cardA.created > cardB.created -> -1 // B displays above A if B is newer - cardA.updated < cardB.updated -> 1 + cardA.created < cardB.created -> 1 // They're considered equal at this point else -> 0 } diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/DefaultContentCardsViewBindingHandler.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/DefaultContentCardsViewBindingHandler.kt index d7174d31a..c0dbf395b 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/DefaultContentCardsViewBindingHandler.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/DefaultContentCardsViewBindingHandler.kt @@ -5,9 +5,9 @@ import android.os.Parcel import android.os.Parcelable import android.view.ViewGroup import androidx.annotation.VisibleForTesting -import com.appboy.enums.CardType -import com.appboy.enums.CardType.Companion.fromValue -import com.appboy.models.cards.Card +import com.braze.enums.CardType +import com.braze.enums.CardType.Companion.fromValue +import com.braze.models.cards.Card import com.braze.ui.contentcards.view.BannerImageContentCardView import com.braze.ui.contentcards.view.BaseContentCardView import com.braze.ui.contentcards.view.CaptionedImageContentCardView diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/IContentCardsUpdateHandler.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/IContentCardsUpdateHandler.kt index a91cf619d..243330176 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/IContentCardsUpdateHandler.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/IContentCardsUpdateHandler.kt @@ -1,7 +1,7 @@ package com.braze.ui.contentcards.handlers import android.os.Parcelable -import com.appboy.models.cards.Card +import com.braze.models.cards.Card import com.braze.events.ContentCardsUpdatedEvent /** diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/IContentCardsViewBindingHandler.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/IContentCardsViewBindingHandler.kt index 5ceccec78..40afcd0e5 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/IContentCardsViewBindingHandler.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/handlers/IContentCardsViewBindingHandler.kt @@ -3,7 +3,7 @@ package com.braze.ui.contentcards.handlers import android.content.Context import android.os.Parcelable import android.view.ViewGroup -import com.appboy.models.cards.Card +import com.braze.models.cards.Card import com.braze.ui.contentcards.view.ContentCardViewHolder /** diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/listeners/IContentCardsActionListener.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/listeners/IContentCardsActionListener.kt index 4d7e69f92..5e8aadd6e 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/listeners/IContentCardsActionListener.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/listeners/IContentCardsActionListener.kt @@ -1,7 +1,7 @@ package com.braze.ui.contentcards.listeners import android.content.Context -import com.appboy.models.cards.Card +import com.braze.models.cards.Card import com.braze.ui.actions.IAction /** diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/recycler/ContentCardsDividerItemDecoration.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/recycler/ContentCardsDividerItemDecoration.kt index 2620cb456..30a4a043e 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/recycler/ContentCardsDividerItemDecoration.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/recycler/ContentCardsDividerItemDecoration.kt @@ -4,7 +4,7 @@ import android.content.Context import android.graphics.Rect import android.view.View import androidx.recyclerview.widget.RecyclerView -import com.appboy.ui.R +import com.braze.ui.R import com.braze.ui.contentcards.adapters.ContentCardAdapter /** diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/BannerImageContentCardView.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/BannerImageContentCardView.kt index 9c4422271..e2d0229e0 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/BannerImageContentCardView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/BannerImageContentCardView.kt @@ -5,9 +5,9 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView -import com.appboy.models.cards.BannerImageCard -import com.appboy.models.cards.Card -import com.appboy.ui.R +import com.braze.models.cards.BannerImageCard +import com.braze.models.cards.Card +import com.braze.ui.R open class BannerImageContentCardView(context: Context) : BaseContentCardView( context diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/BaseContentCardView.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/BaseContentCardView.kt index 6c2d7510c..44b5081f0 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/BaseContentCardView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/BaseContentCardView.kt @@ -6,9 +6,9 @@ import android.os.Build import android.view.View import android.view.ViewGroup import android.widget.ImageView -import com.appboy.models.cards.Card -import com.appboy.ui.R -import com.appboy.ui.widget.BaseCardView +import com.braze.models.cards.Card +import com.braze.ui.R +import com.braze.ui.widget.BaseCardView import com.braze.ui.actions.IAction import com.braze.ui.contentcards.managers.BrazeContentCardsManager.Companion.instance diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/CaptionedImageContentCardView.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/CaptionedImageContentCardView.kt index e6af6c374..689da23d7 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/CaptionedImageContentCardView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/CaptionedImageContentCardView.kt @@ -6,9 +6,9 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView -import com.appboy.models.cards.CaptionedImageCard -import com.appboy.models.cards.Card -import com.appboy.ui.R +import com.braze.models.cards.CaptionedImageCard +import com.braze.models.cards.Card +import com.braze.ui.R open class CaptionedImageContentCardView(context: Context) : BaseContentCardView( context diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/ContentCardViewHolder.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/ContentCardViewHolder.kt index 0a6c6d2a0..d7d768bb1 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/ContentCardViewHolder.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/ContentCardViewHolder.kt @@ -4,7 +4,7 @@ import android.view.View import android.widget.ImageView import android.widget.TextView import androidx.recyclerview.widget.RecyclerView -import com.appboy.ui.R +import com.braze.ui.R open class ContentCardViewHolder(view: View, showUnreadIndicator: Boolean) : RecyclerView.ViewHolder(view) { diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/DefaultContentCardView.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/DefaultContentCardView.kt index 129ff6bc6..0ab993167 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/DefaultContentCardView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/DefaultContentCardView.kt @@ -3,8 +3,8 @@ package com.braze.ui.contentcards.view import android.content.Context import android.view.LayoutInflater import android.view.ViewGroup -import com.appboy.models.cards.Card -import com.appboy.ui.R +import com.braze.models.cards.Card +import com.braze.ui.R /** * A view for when the card type is unknown or otherwise can't be rendered. diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/ShortNewsContentCardView.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/ShortNewsContentCardView.kt index 5feae7d33..1df8aba8f 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/ShortNewsContentCardView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/ShortNewsContentCardView.kt @@ -7,9 +7,9 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView -import com.appboy.models.cards.Card -import com.appboy.models.cards.ShortNewsCard -import com.appboy.ui.R +import com.braze.models.cards.Card +import com.braze.models.cards.ShortNewsCard +import com.braze.ui.R open class ShortNewsContentCardView(context: Context) : BaseContentCardView( context diff --git a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/TextAnnouncementContentCardView.kt b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/TextAnnouncementContentCardView.kt index f2316a5bb..e738b78d1 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/TextAnnouncementContentCardView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/contentcards/view/TextAnnouncementContentCardView.kt @@ -5,9 +5,9 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView -import com.appboy.models.cards.Card -import com.appboy.models.cards.TextAnnouncementCard -import com.appboy.ui.R +import com.braze.models.cards.Card +import com.braze.models.cards.TextAnnouncementCard +import com.braze.ui.R open class TextAnnouncementContentCardView(context: Context) : BaseContentCardView( diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/feed/AppboyFeedManager.java b/android-sdk-ui/src/main/java/com/braze/ui/feed/BrazeFeedManager.java similarity index 68% rename from android-sdk-ui/src/main/java/com/appboy/ui/feed/AppboyFeedManager.java rename to android-sdk-ui/src/main/java/com/braze/ui/feed/BrazeFeedManager.java index b8d832308..633722360 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/feed/AppboyFeedManager.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/feed/BrazeFeedManager.java @@ -1,20 +1,20 @@ -package com.appboy.ui.feed; +package com.braze.ui.feed; -import com.appboy.ui.feed.listeners.AppboyDefaultFeedClickActionListener; -import com.appboy.ui.feed.listeners.IFeedClickActionListener; +import com.braze.ui.feed.listeners.BrazeDefaultFeedClickActionListener; +import com.braze.ui.feed.listeners.IFeedClickActionListener; -public class AppboyFeedManager { - private static volatile AppboyFeedManager sInstance = null; +public class BrazeFeedManager { + private static volatile BrazeFeedManager sInstance = null; // card click listeners private IFeedClickActionListener mCustomFeedClickActionListener; - private final IFeedClickActionListener mDefaultFeedClickActionListener = new AppboyDefaultFeedClickActionListener(); + private final IFeedClickActionListener mDefaultFeedClickActionListener = new BrazeDefaultFeedClickActionListener(); - public static AppboyFeedManager getInstance() { + public static BrazeFeedManager getInstance() { if (sInstance == null) { - synchronized (AppboyFeedManager.class) { + synchronized (BrazeFeedManager.class) { if (sInstance == null) { - sInstance = new AppboyFeedManager(); + sInstance = new BrazeFeedManager(); } } } diff --git a/android-sdk-ui/src/main/java/com/braze/ui/feed/BrazeImageSwitcher.kt b/android-sdk-ui/src/main/java/com/braze/ui/feed/BrazeImageSwitcher.kt new file mode 100644 index 000000000..19040a973 --- /dev/null +++ b/android-sdk-ui/src/main/java/com/braze/ui/feed/BrazeImageSwitcher.kt @@ -0,0 +1,49 @@ +package com.braze.ui.feed + +import android.content.Context +import android.graphics.drawable.Drawable +import android.util.AttributeSet +import android.widget.ImageSwitcher +import androidx.annotation.VisibleForTesting +import com.braze.support.BrazeLogger.Priority.W +import com.braze.support.BrazeLogger.brazelog +import com.braze.ui.R + +class BrazeImageSwitcher(context: Context, attrs: AttributeSet?) : ImageSwitcher(context, attrs) { + @set:VisibleForTesting + var readIcon: Drawable? = null + + @set:VisibleForTesting + var unReadIcon: Drawable? = null + + init { + try { + // Get the array of offset indices into the R value array defined for this view. + // The R value array is at R.styleable.com_braze_ui_feed_BrazeImageSwitcher. + val typedArray = + context.obtainStyledAttributes(attrs, R.styleable.com_braze_ui_feed_BrazeImageSwitcher) + + // For all offsets defined on this view, if the offset is equal to the offset for the custom font file + // defined at R.styleable.com_braze_ui_feed_BrazeImageSwitcher_brazeFeedCustomReadIcon or + // R.styleable.com_braze_ui_feed_BrazeImageSwitcher_brazeFeedCustomUnReadIcon, + // instruct the typed array to retrieve the data at that offset. + for (i in 0 until typedArray.indexCount) { + val offset = typedArray.getIndex(i) + if (offset == R.styleable.com_braze_ui_feed_BrazeImageSwitcher_brazeFeedCustomReadIcon) { + val drawable = typedArray.getDrawable(offset) + if (drawable != null) { + readIcon = drawable + } + } else if (typedArray.getIndex(i) == R.styleable.com_braze_ui_feed_BrazeImageSwitcher_brazeFeedCustomUnReadIcon) { + val drawable = typedArray.getDrawable(offset) + if (drawable != null) { + unReadIcon = drawable + } + } + } + typedArray.recycle() + } catch (e: Exception) { + brazelog(W, e) { "Error while checking for custom drawable." } + } + } +} diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/feed/listeners/AppboyDefaultFeedClickActionListener.java b/android-sdk-ui/src/main/java/com/braze/ui/feed/listeners/BrazeDefaultFeedClickActionListener.java similarity index 54% rename from android-sdk-ui/src/main/java/com/appboy/ui/feed/listeners/AppboyDefaultFeedClickActionListener.java rename to android-sdk-ui/src/main/java/com/braze/ui/feed/listeners/BrazeDefaultFeedClickActionListener.java index c74ab7723..41d232629 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/feed/listeners/AppboyDefaultFeedClickActionListener.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/feed/listeners/BrazeDefaultFeedClickActionListener.java @@ -1,11 +1,11 @@ -package com.appboy.ui.feed.listeners; +package com.braze.ui.feed.listeners; import android.content.Context; -import com.appboy.models.cards.Card; +import com.braze.models.cards.Card; import com.braze.ui.actions.IAction; -public class AppboyDefaultFeedClickActionListener implements IFeedClickActionListener { +public class BrazeDefaultFeedClickActionListener implements IFeedClickActionListener { @Override public boolean onFeedCardClicked(Context context, Card card, IAction cardAction) { return false; diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/feed/listeners/IFeedClickActionListener.java b/android-sdk-ui/src/main/java/com/braze/ui/feed/listeners/IFeedClickActionListener.java similarity index 83% rename from android-sdk-ui/src/main/java/com/appboy/ui/feed/listeners/IFeedClickActionListener.java rename to android-sdk-ui/src/main/java/com/braze/ui/feed/listeners/IFeedClickActionListener.java index b6423b246..d5c86f8a4 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/feed/listeners/IFeedClickActionListener.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/feed/listeners/IFeedClickActionListener.java @@ -1,8 +1,8 @@ -package com.appboy.ui.feed.listeners; +package com.braze.ui.feed.listeners; import android.content.Context; -import com.appboy.models.cards.Card; +import com.braze.models.cards.Card; import com.braze.ui.actions.IAction; /** @@ -10,7 +10,7 @@ * news feed click action is performed and gives the host app the ability to * override Braze's default procedure when handling news feed card clicks. * - * See {@link com.appboy.ui.feed.AppboyFeedManager} and {@link com.appboy.ui.widget.BaseCardView} + * See {@link com.braze.ui.feed.BrazeFeedManager} and {@link com.braze.ui.widget.BaseCardView} */ public interface IFeedClickActionListener { diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/feed/view/BaseFeedCardView.java b/android-sdk-ui/src/main/java/com/braze/ui/feed/view/BaseFeedCardView.java similarity index 84% rename from android-sdk-ui/src/main/java/com/appboy/ui/feed/view/BaseFeedCardView.java rename to android-sdk-ui/src/main/java/com/braze/ui/feed/view/BaseFeedCardView.java index fc011565c..07142e93a 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/feed/view/BaseFeedCardView.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/feed/view/BaseFeedCardView.java @@ -1,4 +1,4 @@ -package com.appboy.ui.feed.view; +package com.braze.ui.feed.view; import android.content.Context; import android.view.LayoutInflater; @@ -6,10 +6,10 @@ import android.view.ViewStub; import android.widget.ImageView; -import com.appboy.models.cards.Card; -import com.appboy.ui.R; -import com.appboy.ui.feed.AppboyFeedManager; -import com.appboy.ui.widget.BaseCardView; +import com.braze.models.cards.Card; +import com.braze.ui.R; +import com.braze.ui.feed.BrazeFeedManager; +import com.braze.ui.widget.BaseCardView; import com.braze.support.BrazeLogger; import com.braze.ui.actions.IAction; @@ -27,7 +27,7 @@ public BaseFeedCardView(Context context) { // All implementing views of BaseCardView must include this switcher view in order to have the // read/unread functionality. Views that don't have the indicator (like banner views) won't have the image switcher // in them and thus we do the null-check below. - imageSwitcher = findViewById(R.id.com_appboy_newsfeed_item_read_indicator_image_switcher); + imageSwitcher = findViewById(R.id.com_braze_newsfeed_item_read_indicator_image_switcher); if (imageSwitcher != null) { imageSwitcher.setFactory(() -> new ImageView(applicationContext)); } @@ -52,7 +52,7 @@ public BaseFeedCardView(Context context) { public View getProperViewFromInflatedStub(int stubLayoutId) { ViewStub imageStub = findViewById(stubLayoutId); imageStub.inflate(); - return findViewById(R.id.com_appboy_stubbed_feed_image_view); + return findViewById(R.id.com_braze_stubbed_feed_image_view); } /** @@ -72,7 +72,7 @@ public Card getCard() { @Override protected boolean isClickHandled(Context context, Card card, IAction cardAction) { - return AppboyFeedManager.getInstance().getFeedCardClickActionListener().onFeedCardClicked(context, card, cardAction); + return BrazeFeedManager.getInstance().getFeedCardClickActionListener().onFeedCardClicked(context, card, cardAction); } protected abstract int getLayoutResource(); diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageFullViewFactory.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageFullViewFactory.kt index e439a2d23..3b5513b78 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageFullViewFactory.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageFullViewFactory.kt @@ -5,7 +5,7 @@ import android.app.Activity import android.view.View import android.view.ViewGroup.MarginLayoutParams import android.widget.RelativeLayout -import com.appboy.ui.R +import com.braze.ui.R import com.braze.Braze import com.braze.enums.BrazeViewBounds import com.braze.enums.inappmessage.ImageStyle diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageHtmlFullViewFactory.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageHtmlFullViewFactory.kt index 96e278a2f..a20466c40 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageHtmlFullViewFactory.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageHtmlFullViewFactory.kt @@ -2,7 +2,7 @@ package com.braze.ui.inappmessage.factories import android.annotation.SuppressLint import android.app.Activity -import com.appboy.ui.R +import com.braze.ui.R import com.braze.configuration.BrazeConfigurationProvider import com.braze.models.inappmessage.IInAppMessage import com.braze.models.inappmessage.InAppMessageHtmlFull diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageHtmlViewFactory.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageHtmlViewFactory.kt index 613d205f8..642dd6948 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageHtmlViewFactory.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageHtmlViewFactory.kt @@ -2,7 +2,7 @@ package com.braze.ui.inappmessage.factories import android.annotation.SuppressLint import android.app.Activity -import com.appboy.ui.R +import com.braze.ui.R import com.braze.configuration.BrazeConfigurationProvider import com.braze.models.inappmessage.IInAppMessage import com.braze.models.inappmessage.InAppMessageHtml diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageModalViewFactory.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageModalViewFactory.kt index 16eb85571..45ff9f3ea 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageModalViewFactory.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageModalViewFactory.kt @@ -2,7 +2,7 @@ package com.braze.ui.inappmessage.factories import android.annotation.SuppressLint import android.app.Activity -import com.appboy.ui.R +import com.braze.ui.R import com.braze.Braze import com.braze.enums.BrazeViewBounds import com.braze.enums.inappmessage.ImageStyle diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageSlideupViewFactory.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageSlideupViewFactory.kt index 08c9b8254..2c631901f 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageSlideupViewFactory.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/factories/DefaultInAppMessageSlideupViewFactory.kt @@ -1,7 +1,7 @@ package com.braze.ui.inappmessage.factories import android.app.Activity -import com.appboy.ui.R +import com.braze.ui.R import com.braze.Braze import com.braze.enums.BrazeViewBounds import com.braze.models.inappmessage.IInAppMessage diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/jsinterface/InAppMessageUserJavascriptInterface.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/jsinterface/InAppMessageUserJavascriptInterface.kt index c54b491b0..e77490bd1 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/jsinterface/InAppMessageUserJavascriptInterface.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/jsinterface/InAppMessageUserJavascriptInterface.kt @@ -3,11 +3,11 @@ package com.braze.ui.inappmessage.jsinterface import android.content.Context import android.webkit.JavascriptInterface import androidx.annotation.VisibleForTesting -import com.appboy.enums.Gender -import com.appboy.enums.Month -import com.appboy.enums.Month.Companion.getMonth -import com.appboy.enums.NotificationSubscriptionType -import com.appboy.enums.NotificationSubscriptionType.Companion.fromValue +import com.braze.enums.Gender +import com.braze.enums.Month +import com.braze.enums.Month.Companion.getMonth +import com.braze.enums.NotificationSubscriptionType +import com.braze.enums.NotificationSubscriptionType.Companion.fromValue import com.braze.Braze import com.braze.BrazeUser import com.braze.support.BrazeLogger.Priority.E diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/DefaultInAppMessageViewLifecycleListener.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/DefaultInAppMessageViewLifecycleListener.kt index 2f2492251..39d0b2961 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/DefaultInAppMessageViewLifecycleListener.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/DefaultInAppMessageViewLifecycleListener.kt @@ -2,7 +2,7 @@ package com.braze.ui.inappmessage.listeners import android.net.Uri import android.view.View -import com.appboy.enums.Channel +import com.braze.enums.Channel import com.braze.coroutine.BrazeCoroutineScope import com.braze.enums.inappmessage.ClickAction import com.braze.models.inappmessage.IInAppMessage diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/DefaultInAppMessageWebViewClientListener.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/DefaultInAppMessageWebViewClientListener.kt index a560c10f7..7a938dd5b 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/DefaultInAppMessageWebViewClientListener.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/DefaultInAppMessageWebViewClientListener.kt @@ -2,7 +2,7 @@ package com.braze.ui.inappmessage.listeners import android.os.Bundle import androidx.annotation.VisibleForTesting -import com.appboy.enums.Channel +import com.braze.enums.Channel import com.braze.Braze.Companion.getInstance import com.braze.enums.inappmessage.MessageType import com.braze.models.inappmessage.IInAppMessage diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/IInAppMessageManagerListener.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/IInAppMessageManagerListener.kt index 62ddf6fd2..88420d65b 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/IInAppMessageManagerListener.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/listeners/IInAppMessageManagerListener.kt @@ -14,7 +14,7 @@ import com.braze.ui.inappmessage.InAppMessageOperation * overriding Braze's default display handling and implementing its own custom behavior. * * - * If you are implementing Unity, you must use IAppboyUnityInAppMessageListener instead. + * If you are implementing Unity, you must use IBrazeUnityInAppMessageListener instead. * * * See [BrazeInAppMessageManager] diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/utils/InAppMessageButtonViewUtils.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/utils/InAppMessageButtonViewUtils.kt index a03e9c563..12d03e2a7 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/utils/InAppMessageButtonViewUtils.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/utils/InAppMessageButtonViewUtils.kt @@ -8,7 +8,7 @@ import android.graphics.drawable.StateListDrawable import android.os.Build import android.view.View import android.widget.Button -import com.appboy.ui.R +import com.braze.ui.R import com.braze.models.inappmessage.MessageButton object InAppMessageButtonViewUtils { diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/utils/InAppMessageWebViewClient.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/utils/InAppMessageWebViewClient.kt index 962bdd32a..22733c483 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/utils/InAppMessageWebViewClient.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/utils/InAppMessageWebViewClient.kt @@ -124,7 +124,7 @@ open class InAppMessageWebViewClient( } val uri = Uri.parse(url) val queryBundle = getBundleFromUrl(url) - if (uri.scheme != null && uri.scheme == APPBOY_INAPP_MESSAGE_SCHEME) { + if (uri.scheme != null && uri.scheme == BRAZE_INAPP_MESSAGE_SCHEME) { // Check the authority when (uri.authority) { null -> brazelog { "Uri authority was null. Uri: $uri" } @@ -162,7 +162,7 @@ open class InAppMessageWebViewClient( companion object { private const val BRIDGE_JS_FILE = "braze-html-in-app-message-bridge.js" - private const val APPBOY_INAPP_MESSAGE_SCHEME = "appboy" + private const val BRAZE_INAPP_MESSAGE_SCHEME = "appboy" private const val AUTHORITY_NAME_CLOSE = "close" private const val AUTHORITY_NAME_NEWSFEED = "feed" private const val AUTHORITY_NAME_CUSTOM_EVENT = "customEvent" diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageBoundedLayout.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageBoundedLayout.kt index a70351b08..0878673ef 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageBoundedLayout.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageBoundedLayout.kt @@ -3,7 +3,7 @@ package com.braze.ui.inappmessage.views import android.content.Context import android.util.AttributeSet import android.widget.RelativeLayout -import com.appboy.ui.R +import com.braze.ui.R /** * A [RelativeLayout] that respects maximum/minimum dimension bounds. diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageFullView.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageFullView.kt index 7b995d975..74dd04310 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageFullView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageFullView.kt @@ -8,7 +8,7 @@ import android.view.View import android.widget.ImageView import android.widget.TextView import androidx.core.view.WindowInsetsCompat -import com.appboy.ui.R +import com.braze.ui.R import com.braze.enums.inappmessage.ImageStyle import com.braze.models.inappmessage.IInAppMessageImmersive import com.braze.support.BrazeLogger.brazelog diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageHtmlFullView.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageHtmlFullView.kt index 2af855606..54cd80e6b 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageHtmlFullView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageHtmlFullView.kt @@ -2,7 +2,7 @@ package com.braze.ui.inappmessage.views import android.content.Context import android.util.AttributeSet -import com.appboy.ui.R +import com.braze.ui.R open class InAppMessageHtmlFullView(context: Context?, attrs: AttributeSet?) : InAppMessageHtmlBaseView(context, attrs) { diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageHtmlView.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageHtmlView.kt index 8239e5b48..8221685ee 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageHtmlView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageHtmlView.kt @@ -2,7 +2,7 @@ package com.braze.ui.inappmessage.views import android.content.Context import android.util.AttributeSet -import com.appboy.ui.R +import com.braze.ui.R open class InAppMessageHtmlView(context: Context?, attrs: AttributeSet?) : InAppMessageHtmlBaseView(context, attrs) { diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageImmersiveBaseView.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageImmersiveBaseView.kt index 480e81587..d870237b9 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageImmersiveBaseView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageImmersiveBaseView.kt @@ -8,7 +8,7 @@ import android.view.KeyEvent import android.view.TouchDelegate import android.view.View import android.widget.TextView -import com.appboy.ui.R +import com.braze.ui.R import com.braze.enums.inappmessage.TextAlign import com.braze.models.inappmessage.MessageButton import com.braze.support.BrazeLogger.Priority.W diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageModalView.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageModalView.kt index 3ebac0739..32ac6f69f 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageModalView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageModalView.kt @@ -7,7 +7,7 @@ import android.view.View import android.widget.ImageView import android.widget.RelativeLayout import android.widget.TextView -import com.appboy.ui.R +import com.braze.ui.R import com.braze.enums.inappmessage.ImageStyle import com.braze.models.inappmessage.IInAppMessageImmersive import com.braze.models.inappmessage.InAppMessageModal diff --git a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageSlideupView.kt b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageSlideupView.kt index 47d19b601..9e1ef31b6 100644 --- a/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageSlideupView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/inappmessage/views/InAppMessageSlideupView.kt @@ -8,7 +8,7 @@ import android.widget.ImageView import android.widget.RelativeLayout import android.widget.TextView import androidx.core.view.WindowInsetsCompat -import com.appboy.ui.R +import com.braze.ui.R import com.braze.enums.inappmessage.ClickAction import com.braze.models.inappmessage.IInAppMessage import com.braze.support.BrazeLogger.brazelog diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/widget/BannerImageCardView.java b/android-sdk-ui/src/main/java/com/braze/ui/widget/BannerImageCardView.java similarity index 81% rename from android-sdk-ui/src/main/java/com/appboy/ui/widget/BannerImageCardView.java rename to android-sdk-ui/src/main/java/com/braze/ui/widget/BannerImageCardView.java index c7d60cd3a..7df751716 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/widget/BannerImageCardView.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/widget/BannerImageCardView.java @@ -1,11 +1,11 @@ -package com.appboy.ui.widget; +package com.braze.ui.widget; import android.content.Context; import android.widget.ImageView; -import com.appboy.models.cards.BannerImageCard; -import com.appboy.ui.R; -import com.appboy.ui.feed.view.BaseFeedCardView; +import com.braze.models.cards.BannerImageCard; +import com.braze.ui.R; +import com.braze.ui.feed.view.BaseFeedCardView; import com.braze.support.BrazeLogger; import com.braze.ui.actions.IAction; @@ -25,7 +25,7 @@ public BannerImageCardView(Context context) { @SuppressWarnings("deprecation") // getDrawable() until Build.VERSION_CODES.LOLLIPOP public BannerImageCardView(final Context context, BannerImageCard card) { super(context); - mImage = (ImageView) getProperViewFromInflatedStub(R.id.com_appboy_banner_image_card_imageview_stub); + mImage = (ImageView) getProperViewFromInflatedStub(R.id.com_braze_banner_image_card_imageview_stub); mImage.setScaleType(ImageView.ScaleType.CENTER_CROP); mImage.setAdjustViewBounds(true); @@ -33,12 +33,12 @@ public BannerImageCardView(final Context context, BannerImageCard card) { setCard(card); } - setBackground(getResources().getDrawable(R.drawable.com_appboy_card_background)); + setBackground(getResources().getDrawable(R.drawable.com_braze_card_background)); } @Override protected int getLayoutResource() { - return R.layout.com_appboy_banner_image_card; + return R.layout.com_braze_banner_image_card; } @Override diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/widget/BaseCardView.kt b/android-sdk-ui/src/main/java/com/braze/ui/widget/BaseCardView.kt similarity index 95% rename from android-sdk-ui/src/main/java/com/appboy/ui/widget/BaseCardView.kt rename to android-sdk-ui/src/main/java/com/braze/ui/widget/BaseCardView.kt index 3b90f3caa..d033a98a3 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/widget/BaseCardView.kt +++ b/android-sdk-ui/src/main/java/com/braze/ui/widget/BaseCardView.kt @@ -1,4 +1,4 @@ -package com.appboy.ui.widget +package com.braze.ui.widget import android.content.Context import android.os.Bundle @@ -6,9 +6,9 @@ import android.view.ViewTreeObserver import android.widget.ImageView import android.widget.RelativeLayout import android.widget.TextView -import com.appboy.models.cards.Card -import com.appboy.ui.R -import com.appboy.ui.feed.AppboyImageSwitcher +import com.braze.models.cards.Card +import com.braze.ui.R +import com.braze.ui.feed.BrazeImageSwitcher import com.braze.Braze import com.braze.configuration.BrazeConfigurationProvider import com.braze.enums.BrazeViewBounds @@ -30,11 +30,11 @@ abstract class BaseCardView(context: Context) : RelativeLayout(context @JvmField protected var card: T? = null @JvmField - var imageSwitcher: AppboyImageSwitcher? = null + var imageSwitcher: BrazeImageSwitcher? = null @JvmField protected var configurationProvider = BrazeConfigurationProvider(context) - private var isUnreadCardVisualIndicatorEnabled: Boolean = configurationProvider.isNewsfeedVisualIndicatorOn + private val isUnreadCardVisualIndicatorEnabled: Boolean = configurationProvider.isNewsfeedVisualIndicatorOn val isUnreadIndicatorEnabled: Boolean get() = isUnreadCardVisualIndicatorEnabled @@ -108,7 +108,7 @@ abstract class BaseCardView(context: Context) : RelativeLayout(context * Checks to see if the card object is viewed and if so, sets the read/unread status * indicator image. If the card is null, does nothing. */ - fun setCardViewedIndicator(imageSwitcher: AppboyImageSwitcher?, card: Card) { + fun setCardViewedIndicator(imageSwitcher: BrazeImageSwitcher?, card: Card) { if (imageSwitcher == null) { brazelog(W) { "imageSwitcher is null. Can't set card viewed indicator." } return diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/widget/CaptionedImageCardView.java b/android-sdk-ui/src/main/java/com/braze/ui/widget/CaptionedImageCardView.java similarity index 75% rename from android-sdk-ui/src/main/java/com/appboy/ui/widget/CaptionedImageCardView.java rename to android-sdk-ui/src/main/java/com/braze/ui/widget/CaptionedImageCardView.java index 0fd032a25..9d91b3bc8 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/widget/CaptionedImageCardView.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/widget/CaptionedImageCardView.java @@ -1,12 +1,12 @@ -package com.appboy.ui.widget; +package com.braze.ui.widget; import android.content.Context; import android.widget.ImageView; import android.widget.TextView; -import com.appboy.models.cards.CaptionedImageCard; -import com.appboy.ui.R; -import com.appboy.ui.feed.view.BaseFeedCardView; +import com.braze.models.cards.CaptionedImageCard; +import com.braze.ui.R; +import com.braze.ui.feed.view.BaseFeedCardView; import com.braze.support.BrazeLogger; import com.braze.ui.actions.IAction; @@ -29,24 +29,24 @@ public CaptionedImageCardView(Context context) { @SuppressWarnings("deprecation") // getDrawable() until Build.VERSION_CODES.LOLLIPOP public CaptionedImageCardView(final Context context, CaptionedImageCard card) { super(context); - mImage = (ImageView) getProperViewFromInflatedStub(R.id.com_appboy_captioned_image_card_imageview_stub); + mImage = (ImageView) getProperViewFromInflatedStub(R.id.com_braze_captioned_image_card_imageview_stub); mImage.setScaleType(ImageView.ScaleType.CENTER_CROP); mImage.setAdjustViewBounds(true); - mTitle = findViewById(R.id.com_appboy_captioned_image_title); - mDescription = findViewById(R.id.com_appboy_captioned_image_description); - mDomain = findViewById(R.id.com_appboy_captioned_image_card_domain); + mTitle = findViewById(R.id.com_braze_captioned_image_title); + mDescription = findViewById(R.id.com_braze_captioned_image_description); + mDomain = findViewById(R.id.com_braze_captioned_image_card_domain); if (card != null) { setCard(card); } - setBackground(getResources().getDrawable(R.drawable.com_appboy_card_background)); + setBackground(getResources().getDrawable(R.drawable.com_braze_card_background)); } @Override protected int getLayoutResource() { - return R.layout.com_appboy_captioned_image_card; + return R.layout.com_braze_captioned_image_card; } @Override diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/widget/DefaultCardView.java b/android-sdk-ui/src/main/java/com/braze/ui/widget/DefaultCardView.java similarity index 77% rename from android-sdk-ui/src/main/java/com/appboy/ui/widget/DefaultCardView.java rename to android-sdk-ui/src/main/java/com/braze/ui/widget/DefaultCardView.java index 4df32c6b7..98e452ec9 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/widget/DefaultCardView.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/widget/DefaultCardView.java @@ -1,10 +1,10 @@ -package com.appboy.ui.widget; +package com.braze.ui.widget; import android.content.Context; -import com.appboy.models.cards.Card; -import com.appboy.ui.R; -import com.appboy.ui.feed.view.BaseFeedCardView; +import com.braze.models.cards.Card; +import com.braze.ui.R; +import com.braze.ui.feed.view.BaseFeedCardView; import com.braze.support.BrazeLogger; public class DefaultCardView extends BaseFeedCardView { @@ -24,7 +24,7 @@ public DefaultCardView(Context context, Card card) { @Override protected int getLayoutResource() { - return R.layout.com_appboy_default_card; + return R.layout.com_braze_default_card; } @Override public void onSetCard(Card card) { diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/widget/ShortNewsCardView.java b/android-sdk-ui/src/main/java/com/braze/ui/widget/ShortNewsCardView.java similarity index 73% rename from android-sdk-ui/src/main/java/com/appboy/ui/widget/ShortNewsCardView.java rename to android-sdk-ui/src/main/java/com/braze/ui/widget/ShortNewsCardView.java index 7ac442534..acef70132 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/widget/ShortNewsCardView.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/widget/ShortNewsCardView.java @@ -1,12 +1,12 @@ -package com.appboy.ui.widget; +package com.braze.ui.widget; import android.content.Context; import android.widget.ImageView; import android.widget.TextView; -import com.appboy.models.cards.ShortNewsCard; -import com.appboy.ui.R; -import com.appboy.ui.feed.view.BaseFeedCardView; +import com.braze.models.cards.ShortNewsCard; +import com.braze.ui.R; +import com.braze.ui.feed.view.BaseFeedCardView; import com.braze.support.BrazeLogger; import com.braze.ui.actions.IAction; @@ -26,11 +26,11 @@ public ShortNewsCardView(Context context) { @SuppressWarnings("deprecation") // getDrawable() until Build.VERSION_CODES.LOLLIPOP public ShortNewsCardView(final Context context, ShortNewsCard card) { super(context); - mDescription = findViewById(R.id.com_appboy_short_news_card_description); - mTitle = findViewById(R.id.com_appboy_short_news_card_title); - mDomain = findViewById(R.id.com_appboy_short_news_card_domain); + mDescription = findViewById(R.id.com_braze_short_news_card_description); + mTitle = findViewById(R.id.com_braze_short_news_card_title); + mDomain = findViewById(R.id.com_braze_short_news_card_domain); - mImage = (ImageView) getProperViewFromInflatedStub(R.id.com_appboy_short_news_card_imageview_stub); + mImage = (ImageView) getProperViewFromInflatedStub(R.id.com_braze_short_news_card_imageview_stub); mImage.setScaleType(ImageView.ScaleType.CENTER_CROP); mImage.setAdjustViewBounds(true); @@ -38,12 +38,12 @@ public ShortNewsCardView(final Context context, ShortNewsCard card) { setCard(card); } - setBackground(getResources().getDrawable(R.drawable.com_appboy_card_background)); + setBackground(getResources().getDrawable(R.drawable.com_braze_card_background)); } @Override protected int getLayoutResource() { - return R.layout.com_appboy_short_news_card; + return R.layout.com_braze_short_news_card; } @Override diff --git a/android-sdk-ui/src/main/java/com/appboy/ui/widget/TextAnnouncementCardView.java b/android-sdk-ui/src/main/java/com/braze/ui/widget/TextAnnouncementCardView.java similarity index 69% rename from android-sdk-ui/src/main/java/com/appboy/ui/widget/TextAnnouncementCardView.java rename to android-sdk-ui/src/main/java/com/braze/ui/widget/TextAnnouncementCardView.java index 2c66e065a..9e860f21e 100644 --- a/android-sdk-ui/src/main/java/com/appboy/ui/widget/TextAnnouncementCardView.java +++ b/android-sdk-ui/src/main/java/com/braze/ui/widget/TextAnnouncementCardView.java @@ -1,11 +1,11 @@ -package com.appboy.ui.widget; +package com.braze.ui.widget; import android.content.Context; import android.widget.TextView; -import com.appboy.models.cards.TextAnnouncementCard; -import com.appboy.ui.R; -import com.appboy.ui.feed.view.BaseFeedCardView; +import com.braze.models.cards.TextAnnouncementCard; +import com.braze.ui.R; +import com.braze.ui.feed.view.BaseFeedCardView; import com.braze.support.BrazeLogger; import com.braze.ui.actions.IAction; @@ -23,20 +23,20 @@ public TextAnnouncementCardView(Context context) { @SuppressWarnings("deprecation") // getDrawable() until Build.VERSION_CODES.LOLLIPOP public TextAnnouncementCardView(final Context context, TextAnnouncementCard card) { super(context); - mTitle = findViewById(R.id.com_appboy_text_announcement_card_title); - mDescription = findViewById(R.id.com_appboy_text_announcement_card_description); - mDomain = findViewById(R.id.com_appboy_text_announcement_card_domain); + mTitle = findViewById(R.id.com_braze_text_announcement_card_title); + mDescription = findViewById(R.id.com_braze_text_announcement_card_description); + mDomain = findViewById(R.id.com_braze_text_announcement_card_domain); if (card != null) { setCard(card); } - setBackground(getResources().getDrawable(R.drawable.com_appboy_card_background)); + setBackground(getResources().getDrawable(R.drawable.com_braze_card_background)); } @Override protected int getLayoutResource() { - return R.layout.com_appboy_text_announcement_card; + return R.layout.com_braze_text_announcement_card; } @Override diff --git a/android-sdk-ui/src/main/res/drawable-nodpi/com_appboy_card_background.xml b/android-sdk-ui/src/main/res/drawable-nodpi/com_appboy_card_background.xml deleted file mode 100644 index df056c9be..000000000 --- a/android-sdk-ui/src/main/res/drawable-nodpi/com_appboy_card_background.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android-sdk-ui/src/main/res/drawable-nodpi/com_braze_card_background.xml b/android-sdk-ui/src/main/res/drawable-nodpi/com_braze_card_background.xml new file mode 100644 index 000000000..7fe869730 --- /dev/null +++ b/android-sdk-ui/src/main/res/drawable-nodpi/com_braze_card_background.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android-sdk-ui/src/main/res/drawable-nodpi/com_braze_content_cards_unread_bar_background.xml b/android-sdk-ui/src/main/res/drawable-nodpi/com_braze_content_cards_unread_bar_background.xml index 66803e37c..18ea01a49 100644 --- a/android-sdk-ui/src/main/res/drawable-nodpi/com_braze_content_cards_unread_bar_background.xml +++ b/android-sdk-ui/src/main/res/drawable-nodpi/com_braze_content_cards_unread_bar_background.xml @@ -5,8 +5,8 @@ + android:bottomLeftRadius="@dimen/com_braze_card_background_corner_radius" + android:bottomRightRadius="@dimen/com_braze_card_background_corner_radius"/> diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_banner_image_card.xml b/android-sdk-ui/src/main/res/layout/com_braze_banner_image_card.xml similarity index 66% rename from android-sdk-ui/src/main/res/layout/com_appboy_banner_image_card.xml rename to android-sdk-ui/src/main/res/layout/com_braze_banner_image_card.xml index a9615d323..324ea0cee 100644 --- a/android-sdk-ui/src/main/res/layout/com_appboy_banner_image_card.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_banner_image_card.xml @@ -1,8 +1,8 @@ diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_captioned_image_card.xml b/android-sdk-ui/src/main/res/layout/com_braze_captioned_image_card.xml similarity index 62% rename from android-sdk-ui/src/main/res/layout/com_appboy_captioned_image_card.xml rename to android-sdk-ui/src/main/res/layout/com_braze_captioned_image_card.xml index 686082577..fef053895 100644 --- a/android-sdk-ui/src/main/res/layout/com_appboy_captioned_image_card.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_captioned_image_card.xml @@ -1,21 +1,21 @@ - + diff --git a/android-sdk-ui/src/main/res/layout/com_braze_content_cards.xml b/android-sdk-ui/src/main/res/layout/com_braze_content_cards.xml index 44eec9849..44d0535f1 100644 --- a/android-sdk-ui/src/main/res/layout/com_braze_content_cards.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_content_cards.xml @@ -1,7 +1,7 @@ - + - \ No newline at end of file + diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_feed.xml b/android-sdk-ui/src/main/res/layout/com_braze_feed.xml similarity index 84% rename from android-sdk-ui/src/main/res/layout/com_appboy_feed.xml rename to android-sdk-ui/src/main/res/layout/com_braze_feed.xml index 8859c9ee6..28b1d2405 100644 --- a/android-sdk-ui/src/main/res/layout/com_appboy_feed.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_feed.xml @@ -2,17 +2,17 @@ + android:id="@+id/com_braze_feed_transparent_full_bounds_container_view"/> diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_feed_activity.xml b/android-sdk-ui/src/main/res/layout/com_braze_feed_activity.xml similarity index 74% rename from android-sdk-ui/src/main/res/layout/com_appboy_feed_activity.xml rename to android-sdk-ui/src/main/res/layout/com_braze_feed_activity.xml index 570070ce9..78b0dcdd1 100644 --- a/android-sdk-ui/src/main/res/layout/com_appboy_feed_activity.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_feed_activity.xml @@ -4,8 +4,8 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_feed_footer.xml b/android-sdk-ui/src/main/res/layout/com_braze_feed_footer.xml similarity index 100% rename from android-sdk-ui/src/main/res/layout/com_appboy_feed_footer.xml rename to android-sdk-ui/src/main/res/layout/com_braze_feed_footer.xml diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_feed_header.xml b/android-sdk-ui/src/main/res/layout/com_braze_feed_header.xml similarity index 100% rename from android-sdk-ui/src/main/res/layout/com_appboy_feed_header.xml rename to android-sdk-ui/src/main/res/layout/com_braze_feed_header.xml diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_feed_read_indicator_holder.xml b/android-sdk-ui/src/main/res/layout/com_braze_feed_read_indicator_holder.xml similarity index 67% rename from android-sdk-ui/src/main/res/layout/com_appboy_feed_read_indicator_holder.xml rename to android-sdk-ui/src/main/res/layout/com_braze_feed_read_indicator_holder.xml index 5c8664405..d11b5ee2f 100644 --- a/android-sdk-ui/src/main/res/layout/com_appboy_feed_read_indicator_holder.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_feed_read_indicator_holder.xml @@ -2,7 +2,7 @@ - diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_short_news_card.xml b/android-sdk-ui/src/main/res/layout/com_braze_short_news_card.xml similarity index 58% rename from android-sdk-ui/src/main/res/layout/com_appboy_short_news_card.xml rename to android-sdk-ui/src/main/res/layout/com_braze_short_news_card.xml index fa283fcf3..72f94f108 100644 --- a/android-sdk-ui/src/main/res/layout/com_appboy_short_news_card.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_short_news_card.xml @@ -1,27 +1,27 @@ - + + android:id="@+id/com_braze_short_news_card_image"> + android:layout_below="@id/com_braze_short_news_card_image"/> diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_stubbed_feed_image_view.xml b/android-sdk-ui/src/main/res/layout/com_braze_stubbed_feed_image_view.xml similarity index 85% rename from android-sdk-ui/src/main/res/layout/com_appboy_stubbed_feed_image_view.xml rename to android-sdk-ui/src/main/res/layout/com_braze_stubbed_feed_image_view.xml index 3bf086613..05529a3ba 100644 --- a/android-sdk-ui/src/main/res/layout/com_appboy_stubbed_feed_image_view.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_stubbed_feed_image_view.xml @@ -1,7 +1,7 @@ @@ -12,7 +12,7 @@ and not a merge tag due to this issue: http://stackoverflow.com/questions/29344787/including-views-using-merge-tag-and-viewstub. --> - \ No newline at end of file + diff --git a/android-sdk-ui/src/main/res/layout/com_appboy_text_announcement_card.xml b/android-sdk-ui/src/main/res/layout/com_braze_text_announcement_card.xml similarity index 74% rename from android-sdk-ui/src/main/res/layout/com_appboy_text_announcement_card.xml rename to android-sdk-ui/src/main/res/layout/com_braze_text_announcement_card.xml index 8080ce935..95c50a723 100644 --- a/android-sdk-ui/src/main/res/layout/com_appboy_text_announcement_card.xml +++ b/android-sdk-ui/src/main/res/layout/com_braze_text_announcement_card.xml @@ -1,9 +1,9 @@ - + - ليس لدينا أي تحديث. يرجى التحقق مرة أخرى لاحقاً. - خلل في الاتصال - لا يمكن إجراء الاتصال بالشبكة. يرجى تكرار المحاولة لاحقا. + ليس لدينا أي تحديث. يرجى التحقق مرة أخرى لاحقاً. + خلل في الاتصال + لا يمكن إجراء الاتصال بالشبكة. يرجى تكرار المحاولة لاحقا. لإغلاق diff --git a/android-sdk-ui/src/main/res/values-cs/strings.xml b/android-sdk-ui/src/main/res/values-cs/strings.xml index 4e1364251..1156bf34d 100644 --- a/android-sdk-ui/src/main/res/values-cs/strings.xml +++ b/android-sdk-ui/src/main/res/values-cs/strings.xml @@ -1,8 +1,8 @@ - Nemáme žádné aktualizace. Zkontrolujte prosím znovu později. - Chyba připojení - Nelze navázat síťové připojení. Prosím zkuste to znovu později. + Nemáme žádné aktualizace. Zkontrolujte prosím znovu později. + Chyba připojení + Nelze navázat síťové připojení. Prosím zkuste to znovu později. zavřít diff --git a/android-sdk-ui/src/main/res/values-da/strings.xml b/android-sdk-ui/src/main/res/values-da/strings.xml index 4e4460b05..6d1f72f72 100644 --- a/android-sdk-ui/src/main/res/values-da/strings.xml +++ b/android-sdk-ui/src/main/res/values-da/strings.xml @@ -1,8 +1,8 @@ - Vi har ingen updates. Prøv venligst senere. - Netværksfejl - Kan ikke etablere netværksforbindelse. Prøv venligst senere. + Vi har ingen updates. Prøv venligst senere. + Netværksfejl + Kan ikke etablere netværksforbindelse. Prøv venligst senere. at lukke diff --git a/android-sdk-ui/src/main/res/values-de/strings.xml b/android-sdk-ui/src/main/res/values-de/strings.xml index 99587a29b..60c12643d 100644 --- a/android-sdk-ui/src/main/res/values-de/strings.xml +++ b/android-sdk-ui/src/main/res/values-de/strings.xml @@ -1,8 +1,8 @@ - Derzeit sind keine Updates verfügbar. Bitte später noch einmal versuchen. - Verbindungsfehler - Netzwerkverbindung kann nicht aufgebaut werden. Bitte später noch einmal versuchen. + Derzeit sind keine Updates verfügbar. Bitte später noch einmal versuchen. + Verbindungsfehler + Netzwerkverbindung kann nicht aufgebaut werden. Bitte später noch einmal versuchen. schließen diff --git a/android-sdk-ui/src/main/res/values-es-rES/strings.xml b/android-sdk-ui/src/main/res/values-es-rES/strings.xml index dc504e066..5c4449ce3 100644 --- a/android-sdk-ui/src/main/res/values-es-rES/strings.xml +++ b/android-sdk-ui/src/main/res/values-es-rES/strings.xml @@ -1,8 +1,8 @@ - No tenemos actualizaciones. Por favor compruébelo más tarde. - Error de conexión - No se puede establecer conexión de red. Por favor inténtelo más tarde. + No tenemos actualizaciones. Por favor compruébelo más tarde. + Error de conexión + No se puede establecer conexión de red. Por favor inténtelo más tarde. cerrar diff --git a/android-sdk-ui/src/main/res/values-es/strings.xml b/android-sdk-ui/src/main/res/values-es/strings.xml index ec036d8ee..a5dfbaefe 100644 --- a/android-sdk-ui/src/main/res/values-es/strings.xml +++ b/android-sdk-ui/src/main/res/values-es/strings.xml @@ -1,8 +1,8 @@ - No tenemos ninguna actualización. Vuelva a verificar más tarde. - Error de conexión - No se puede establecer conexión con la red. Por favor, vuelva a intentarlo más tarde. + No tenemos ninguna actualización. Vuelva a verificar más tarde. + Error de conexión + No se puede establecer conexión con la red. Por favor, vuelva a intentarlo más tarde. cerrar diff --git a/android-sdk-ui/src/main/res/values-et/strings.xml b/android-sdk-ui/src/main/res/values-et/strings.xml index c46ec7781..e5abea0bb 100644 --- a/android-sdk-ui/src/main/res/values-et/strings.xml +++ b/android-sdk-ui/src/main/res/values-et/strings.xml @@ -1,8 +1,8 @@ - Uuendusi pole praegu saadaval. Proovige hiljem uuesti. - Üheduse viga - Võrguühenduse loomine ebaõnnestus. Proovige hiljem uuesti. + Uuendusi pole praegu saadaval. Proovige hiljem uuesti. + Üheduse viga + Võrguühenduse loomine ebaõnnestus. Proovige hiljem uuesti. sulgema diff --git a/android-sdk-ui/src/main/res/values-fi/strings.xml b/android-sdk-ui/src/main/res/values-fi/strings.xml index 97ff8a201..00f155b78 100644 --- a/android-sdk-ui/src/main/res/values-fi/strings.xml +++ b/android-sdk-ui/src/main/res/values-fi/strings.xml @@ -1,8 +1,8 @@ - Päivityksiä ei ole saatavilla. Tarkista myöhemmin uudelleen. - Yhteysvirhe - Verkkoyhteyttä ei voida luoda. Yritä myöhemmin uudelleen. + Päivityksiä ei ole saatavilla. Tarkista myöhemmin uudelleen. + Yhteysvirhe + Verkkoyhteyttä ei voida luoda. Yritä myöhemmin uudelleen. sulkea diff --git a/android-sdk-ui/src/main/res/values-fr/strings.xml b/android-sdk-ui/src/main/res/values-fr/strings.xml index 0cc339e67..6e5c065a5 100644 --- a/android-sdk-ui/src/main/res/values-fr/strings.xml +++ b/android-sdk-ui/src/main/res/values-fr/strings.xml @@ -1,8 +1,8 @@ - Aucune mise à jour disponible. Veuillez vérifier ultérieurement. - Erreur de connexion. - Impossible d\'établir la connexion réseau. Veuillez réessayer ultérieurement. + Aucune mise à jour disponible. Veuillez vérifier ultérieurement. + Erreur de connexion. + Impossible d\'établir la connexion réseau. Veuillez réessayer ultérieurement. fermer diff --git a/android-sdk-ui/src/main/res/values-hdpi/dimens.xml b/android-sdk-ui/src/main/res/values-hdpi/dimens.xml index e52ef1dfd..7ca7597d6 100644 --- a/android-sdk-ui/src/main/res/values-hdpi/dimens.xml +++ b/android-sdk-ui/src/main/res/values-hdpi/dimens.xml @@ -1,10 +1,10 @@ - 1.5dp - 1.5dp - 1.0dp - 1.5dp - 1.0dp + 1.5dp + 1.5dp + 1.0dp + 1.5dp + 1.0dp 1.5dp 1.5dp diff --git a/android-sdk-ui/src/main/res/values-hi/strings.xml b/android-sdk-ui/src/main/res/values-hi/strings.xml index c3d850b19..3938b5fe2 100644 --- a/android-sdk-ui/src/main/res/values-hi/strings.xml +++ b/android-sdk-ui/src/main/res/values-hi/strings.xml @@ -1,8 +1,8 @@ - हमारे पास कोई अपडेट नहीं हैं। कृपया बाद में फिर से जाँच करें.। - कनेक्शन की त्रुटि - नेटवर्क कनेक्शन स्थापित नहीं हो रहा है। कृपया बाद में दोबारा प्रयास करें।. + हमारे पास कोई अपडेट नहीं हैं। कृपया बाद में फिर से जाँच करें.। + कनेक्शन की त्रुटि + नेटवर्क कनेक्शन स्थापित नहीं हो रहा है। कृपया बाद में दोबारा प्रयास करें।. बंद करना diff --git a/android-sdk-ui/src/main/res/values-in/strings.xml b/android-sdk-ui/src/main/res/values-in/strings.xml index 532c4cc4f..93b8bd123 100644 --- a/android-sdk-ui/src/main/res/values-in/strings.xml +++ b/android-sdk-ui/src/main/res/values-in/strings.xml @@ -1,8 +1,8 @@ - Kami tidak memiliki pembaruan. Coba lagi nanti. - Kesalahan Koneksi - Tidak bisa melakukan koneksi jaringan. Coba lagi nanti. + Kami tidak memiliki pembaruan. Coba lagi nanti. + Kesalahan Koneksi + Tidak bisa melakukan koneksi jaringan. Coba lagi nanti. untuk menutup diff --git a/android-sdk-ui/src/main/res/values-it/strings.xml b/android-sdk-ui/src/main/res/values-it/strings.xml index 4dcefd658..e6622c068 100644 --- a/android-sdk-ui/src/main/res/values-it/strings.xml +++ b/android-sdk-ui/src/main/res/values-it/strings.xml @@ -1,8 +1,8 @@ - Non ci sono aggiornamenti. Ricontrollare più tardi. - Errore di connessione - Impossibile stabilire una connessione di rete. Riprovare più tardi. + Non ci sono aggiornamenti. Ricontrollare più tardi. + Errore di connessione + Impossibile stabilire una connessione di rete. Riprovare più tardi. chiudere diff --git a/android-sdk-ui/src/main/res/values-iw/strings.xml b/android-sdk-ui/src/main/res/values-iw/strings.xml index 1c3be29f1..0ff3a1803 100644 --- a/android-sdk-ui/src/main/res/values-iw/strings.xml +++ b/android-sdk-ui/src/main/res/values-iw/strings.xml @@ -1,8 +1,8 @@ - אין לנו עדכונים. בבקשה בדוק שוב בקרוב. - שגיאת חיבור רשת - לא ניתן לקבוע חיבור רשת. בבקשה נסה שוב בקרוב. + אין לנו עדכונים. בבקשה בדוק שוב בקרוב. + שגיאת חיבור רשת + לא ניתן לקבוע חיבור רשת. בבקשה נסה שוב בקרוב. לסגור diff --git a/android-sdk-ui/src/main/res/values-ja/strings.xml b/android-sdk-ui/src/main/res/values-ja/strings.xml index b8a037701..319521281 100644 --- a/android-sdk-ui/src/main/res/values-ja/strings.xml +++ b/android-sdk-ui/src/main/res/values-ja/strings.xml @@ -1,8 +1,8 @@ - アップデートはありません。後でもう一度確認してください。 - 接続エラー - ネットワークに接続できません。後でもう一度試してください。 + アップデートはありません。後でもう一度確認してください。 + 接続エラー + ネットワークに接続できません。後でもう一度試してください。 閉じる diff --git a/android-sdk-ui/src/main/res/values-km/strings.xml b/android-sdk-ui/src/main/res/values-km/strings.xml index 3a6f63309..80bcbb920 100644 --- a/android-sdk-ui/src/main/res/values-km/strings.xml +++ b/android-sdk-ui/src/main/res/values-km/strings.xml @@ -1,8 +1,8 @@ - យើងមិនមានការធ្វើបច្ចុប្បន្នភាពទេ។ សូមពិនិត្យមើលម្តងទៀតនៅពេលក្រោយ. - កំហុសឆ្គងក្នុងការតភ្ជាប់ - មិនអាចបង្កើតបណ្តាញតភ្ជាប់បានទេ។ សូមព្យាយាមម្តងទៀតនៅពេលក្រោយ. + យើងមិនមានការធ្វើបច្ចុប្បន្នភាពទេ។ សូមពិនិត្យមើលម្តងទៀតនៅពេលក្រោយ. + កំហុសឆ្គងក្នុងការតភ្ជាប់ + មិនអាចបង្កើតបណ្តាញតភ្ជាប់បានទេ។ សូមព្យាយាមម្តងទៀតនៅពេលក្រោយ. បិទ diff --git a/android-sdk-ui/src/main/res/values-ko/strings.xml b/android-sdk-ui/src/main/res/values-ko/strings.xml index 1e1993d93..5ddfc07bb 100644 --- a/android-sdk-ui/src/main/res/values-ko/strings.xml +++ b/android-sdk-ui/src/main/res/values-ko/strings.xml @@ -1,8 +1,8 @@ - 업데이트가 없습니다. 다음에 다시 확인해 주십시오. - 연결 오류 - 네트워크 연결을 할 수 없습니다. 나중에 다시 시도해 주십시오. + 업데이트가 없습니다. 다음에 다시 확인해 주십시오. + 연결 오류 + 네트워크 연결을 할 수 없습니다. 나중에 다시 시도해 주십시오. 가까운 diff --git a/android-sdk-ui/src/main/res/values-lo/strings.xml b/android-sdk-ui/src/main/res/values-lo/strings.xml index d6caa0e39..dd48ef427 100644 --- a/android-sdk-ui/src/main/res/values-lo/strings.xml +++ b/android-sdk-ui/src/main/res/values-lo/strings.xml @@ -1,8 +1,8 @@ - ພວກ​ເຮົາ​ບໍ່​ມີ​ການ​ອັບ​ເດດ. ກະ​ລຸ​ນາ​ລອງ​ໃໝ່​ພາຍ​ຫຼັງ. - ການ​ເຊື່ອມ​ຕໍ່​ຜິດ​ພາດ - ບໍ່​ສາ​ມາດ​ຕັ້ງ​ການ​ເຊື່ອມ​ຕໍ່​ເຄືອ​ຂ່າຍ​ໄດ້. ກະ​ລຸ​ນາ​ລອງ​ໃໝ່​ພາຍ​ຫຼັງ. + ພວກ​ເຮົາ​ບໍ່​ມີ​ການ​ອັບ​ເດດ. ກະ​ລຸ​ນາ​ລອງ​ໃໝ່​ພາຍ​ຫຼັງ. + ການ​ເຊື່ອມ​ຕໍ່​ຜິດ​ພາດ + ບໍ່​ສາ​ມາດ​ຕັ້ງ​ການ​ເຊື່ອມ​ຕໍ່​ເຄືອ​ຂ່າຍ​ໄດ້. ກະ​ລຸ​ນາ​ລອງ​ໃໝ່​ພາຍ​ຫຼັງ. ໃກ້ diff --git a/android-sdk-ui/src/main/res/values-mdpi/dimens.xml b/android-sdk-ui/src/main/res/values-mdpi/dimens.xml index e52ef1dfd..7ca7597d6 100644 --- a/android-sdk-ui/src/main/res/values-mdpi/dimens.xml +++ b/android-sdk-ui/src/main/res/values-mdpi/dimens.xml @@ -1,10 +1,10 @@ - 1.5dp - 1.5dp - 1.0dp - 1.5dp - 1.0dp + 1.5dp + 1.5dp + 1.0dp + 1.5dp + 1.0dp 1.5dp 1.5dp diff --git a/android-sdk-ui/src/main/res/values-ms/strings.xml b/android-sdk-ui/src/main/res/values-ms/strings.xml index a6e468e7b..79fdb2f47 100644 --- a/android-sdk-ui/src/main/res/values-ms/strings.xml +++ b/android-sdk-ui/src/main/res/values-ms/strings.xml @@ -1,8 +1,8 @@ - Tiada kemas kini. Sila periksa kemudian. - Ralat Sambungan - Tidak boleh membuat sambungan rangkaian. Sila cuba kemudian. + Tiada kemas kini. Sila periksa kemudian. + Ralat Sambungan + Tidak boleh membuat sambungan rangkaian. Sila cuba kemudian. untuk menutup diff --git a/android-sdk-ui/src/main/res/values-my/strings.xml b/android-sdk-ui/src/main/res/values-my/strings.xml index 04ec9d67c..8b34d5257 100644 --- a/android-sdk-ui/src/main/res/values-my/strings.xml +++ b/android-sdk-ui/src/main/res/values-my/strings.xml @@ -1,8 +1,8 @@ - ကၽႊႏု္ပ္ တို႕တြင္ အသစ္တင္ျပရန္မရွိပါ။ ေက်းဇူးျပဳ၍ ေနာင္တြင္ ထပ္စစ္ပါ။ . - ဆက္သြယ္ေရး အမွား - ကြန္ယက္ဆက္သြယ္ျခင္း မျပဳလုပ္ႏိုင္ပါ။ ေက်းဇူးျပဳ၍ ထပ္မံၾကိဳးစားၾကည္႕ပါ။. + ကၽႊႏု္ပ္ တို႕တြင္ အသစ္တင္ျပရန္မရွိပါ။ ေက်းဇူးျပဳ၍ ေနာင္တြင္ ထပ္စစ္ပါ။ . + ဆက္သြယ္ေရး အမွား + ကြန္ယက္ဆက္သြယ္ျခင္း မျပဳလုပ္ႏိုင္ပါ။ ေက်းဇူးျပဳ၍ ထပ္မံၾကိဳးစားၾကည္႕ပါ။. ပိတ်ရန် diff --git a/android-sdk-ui/src/main/res/values-nb/strings.xml b/android-sdk-ui/src/main/res/values-nb/strings.xml index a273bad05..af1d0fc20 100644 --- a/android-sdk-ui/src/main/res/values-nb/strings.xml +++ b/android-sdk-ui/src/main/res/values-nb/strings.xml @@ -1,8 +1,8 @@ - Vi har ingen oppdateringer. Vennligst sjekk igjen senere. - Tilkoblingsfeil - Kan ikke etablere nettverkstilkobling. Vennligst prøv igjen senere. + Vi har ingen oppdateringer. Vennligst sjekk igjen senere. + Tilkoblingsfeil + Kan ikke etablere nettverkstilkobling. Vennligst prøv igjen senere. å lukke diff --git a/android-sdk-ui/src/main/res/values-nl/strings.xml b/android-sdk-ui/src/main/res/values-nl/strings.xml index 90909239a..6fa2e2e89 100644 --- a/android-sdk-ui/src/main/res/values-nl/strings.xml +++ b/android-sdk-ui/src/main/res/values-nl/strings.xml @@ -1,8 +1,8 @@ - Er zijn geen updates. Probeer het later opnieuw. - Verbindingsfout - Kan geen netwerkverbinding maken. Probeer het later opnieuw. + Er zijn geen updates. Probeer het later opnieuw. + Verbindingsfout + Kan geen netwerkverbinding maken. Probeer het later opnieuw. sluiten diff --git a/android-sdk-ui/src/main/res/values-pl/strings.xml b/android-sdk-ui/src/main/res/values-pl/strings.xml index 91ea8d667..013a57714 100644 --- a/android-sdk-ui/src/main/res/values-pl/strings.xml +++ b/android-sdk-ui/src/main/res/values-pl/strings.xml @@ -1,8 +1,8 @@ - Brak aktualizacji. Proszę sprawdzić ponownie później. - Błąd połączenia - Nie można ustanowić połączenia z siecią. Proszę spróbować ponownie później. + Brak aktualizacji. Proszę sprawdzić ponownie później. + Błąd połączenia + Nie można ustanowić połączenia z siecią. Proszę spróbować ponownie później. zamknąć diff --git a/android-sdk-ui/src/main/res/values-pt-rPT/strings.xml b/android-sdk-ui/src/main/res/values-pt-rPT/strings.xml index 1df1b3bc8..bd2edf2b0 100644 --- a/android-sdk-ui/src/main/res/values-pt-rPT/strings.xml +++ b/android-sdk-ui/src/main/res/values-pt-rPT/strings.xml @@ -1,8 +1,8 @@ - Não temos atualizações. Por favor, verifique mais tarde. - Erro de Ligação - Não é possível estabelecer a ligação à rede. Por favor, tente mais tarde. + Não temos atualizações. Por favor, verifique mais tarde. + Erro de Ligação + Não é possível estabelecer a ligação à rede. Por favor, tente mais tarde. fechar diff --git a/android-sdk-ui/src/main/res/values-pt/strings.xml b/android-sdk-ui/src/main/res/values-pt/strings.xml index 21590d60e..b1adfb3ee 100644 --- a/android-sdk-ui/src/main/res/values-pt/strings.xml +++ b/android-sdk-ui/src/main/res/values-pt/strings.xml @@ -1,8 +1,8 @@ - Não temos nenhuma atualização. Verifique novamente mais tarde. - Erro de conexão - Não é possível estabelecer uma conexão de rede. Tente novamente mais tarde. + Não temos nenhuma atualização. Verifique novamente mais tarde. + Erro de conexão + Não é possível estabelecer uma conexão de rede. Tente novamente mais tarde. fechar diff --git a/android-sdk-ui/src/main/res/values-ru/strings.xml b/android-sdk-ui/src/main/res/values-ru/strings.xml index 369f60190..1e460e60d 100644 --- a/android-sdk-ui/src/main/res/values-ru/strings.xml +++ b/android-sdk-ui/src/main/res/values-ru/strings.xml @@ -1,8 +1,8 @@ - Обновления недоступны. Пожалуйста, проверьте снова позже. - Ошибка подключения - Невозможно установить сетевое подключение. Пожалуйста, повторите попытку позже. + Обновления недоступны. Пожалуйста, проверьте снова позже. + Ошибка подключения + Невозможно установить сетевое подключение. Пожалуйста, повторите попытку позже. слишком близко diff --git a/android-sdk-ui/src/main/res/values-sv/strings.xml b/android-sdk-ui/src/main/res/values-sv/strings.xml index b3b322420..35cbf40bf 100644 --- a/android-sdk-ui/src/main/res/values-sv/strings.xml +++ b/android-sdk-ui/src/main/res/values-sv/strings.xml @@ -1,8 +1,8 @@ - Det finns inga uppdateringar. Försök igen senare. - Anslutningsfel - Det gick inte att skapa en nätverksanslutning. Försök igen senare. + Det finns inga uppdateringar. Försök igen senare. + Anslutningsfel + Det gick inte att skapa en nätverksanslutning. Försök igen senare. för nära diff --git a/android-sdk-ui/src/main/res/values-sw600dp/dimens.xml b/android-sdk-ui/src/main/res/values-sw600dp/dimens.xml index eb590a1a9..e473e7566 100644 --- a/android-sdk-ui/src/main/res/values-sw600dp/dimens.xml +++ b/android-sdk-ui/src/main/res/values-sw600dp/dimens.xml @@ -1,5 +1,5 @@ - 600.0dp + 600.0dp 600.0dp diff --git a/android-sdk-ui/src/main/res/values-th/strings.xml b/android-sdk-ui/src/main/res/values-th/strings.xml index 165017351..baf32431f 100644 --- a/android-sdk-ui/src/main/res/values-th/strings.xml +++ b/android-sdk-ui/src/main/res/values-th/strings.xml @@ -1,8 +1,8 @@ - เราไม่มีการอัพเดต กรุณาตรวจสอบภายหลัง. - ผิดพลาดการเชื่อมต่อ - ไม่สามารถสร้างการเชื่อมต่อเครือข่าย กรุณาลองใหม่ภายหลัง. + เราไม่มีการอัพเดต กรุณาตรวจสอบภายหลัง. + ผิดพลาดการเชื่อมต่อ + ไม่สามารถสร้างการเชื่อมต่อเครือข่าย กรุณาลองใหม่ภายหลัง. ใกล้ diff --git a/android-sdk-ui/src/main/res/values-tl/strings.xml b/android-sdk-ui/src/main/res/values-tl/strings.xml index a0c10c46e..bfe1ae728 100644 --- a/android-sdk-ui/src/main/res/values-tl/strings.xml +++ b/android-sdk-ui/src/main/res/values-tl/strings.xml @@ -1,8 +1,8 @@ - Wala kaming mga update. Mangyaring suriin muli sa ibang pagkakataon. - May Error sa Koneksyon - Hindi makapagtatag ng koneksyon sa network. Mangyaring subukan muli mamaya. + Wala kaming mga update. Mangyaring suriin muli sa ibang pagkakataon. + May Error sa Koneksyon + Hindi makapagtatag ng koneksyon sa network. Mangyaring subukan muli mamaya. Isara diff --git a/android-sdk-ui/src/main/res/values-uk/strings.xml b/android-sdk-ui/src/main/res/values-uk/strings.xml index ff25de153..0d64b00eb 100644 --- a/android-sdk-ui/src/main/res/values-uk/strings.xml +++ b/android-sdk-ui/src/main/res/values-uk/strings.xml @@ -1,8 +1,8 @@ - Оновлення недоступні. Будь ласка, перевірте знову пізніше. - Помилка підключення - неможливо встановити з\'єднання з мережею. Будь ласка, спробуйте ще раз пізніше. + Оновлення недоступні. Будь ласка, перевірте знову пізніше. + Помилка підключення + неможливо встановити з\'єднання з мережею. Будь ласка, спробуйте ще раз пізніше. закрити diff --git a/android-sdk-ui/src/main/res/values-vi/strings.xml b/android-sdk-ui/src/main/res/values-vi/strings.xml index af757314b..2600f2dcb 100644 --- a/android-sdk-ui/src/main/res/values-vi/strings.xml +++ b/android-sdk-ui/src/main/res/values-vi/strings.xml @@ -1,8 +1,8 @@ - Chúng tôi không có cập nhật nào. Vui lòng kiểm tra lại sau. - Lỗi Kết Nối - Không thể thiết lập kết nối mạng. Vui lòng thử lại sau. + Chúng tôi không có cập nhật nào. Vui lòng kiểm tra lại sau. + Lỗi Kết Nối + Không thể thiết lập kết nối mạng. Vui lòng thử lại sau. đóng diff --git a/android-sdk-ui/src/main/res/values-xhdpi/dimens.xml b/android-sdk-ui/src/main/res/values-xhdpi/dimens.xml index ec0d6c827..53a5e95fc 100644 --- a/android-sdk-ui/src/main/res/values-xhdpi/dimens.xml +++ b/android-sdk-ui/src/main/res/values-xhdpi/dimens.xml @@ -1,10 +1,10 @@ - 1.0dp - 1.0dp - 0.5dp - 1.0dp - 1.0dp + 1.0dp + 1.0dp + 0.5dp + 1.0dp + 1.0dp 1.0dp 1.0dp diff --git a/android-sdk-ui/src/main/res/values-zh-rCN/strings.xml b/android-sdk-ui/src/main/res/values-zh-rCN/strings.xml index e07eab62e..7a0633e80 100644 --- a/android-sdk-ui/src/main/res/values-zh-rCN/strings.xml +++ b/android-sdk-ui/src/main/res/values-zh-rCN/strings.xml @@ -1,8 +1,8 @@ - 暂时没有更新。\n请稍候再试。 - 连接错误 - 无法建立网络连接。\n请稍候再试。 + 暂时没有更新。\n请稍候再试。 + 连接错误 + 无法建立网络连接。\n请稍候再试。 接近 diff --git a/android-sdk-ui/src/main/res/values-zh-rHK/strings.xml b/android-sdk-ui/src/main/res/values-zh-rHK/strings.xml index 608b0e88c..6f864fa1c 100644 --- a/android-sdk-ui/src/main/res/values-zh-rHK/strings.xml +++ b/android-sdk-ui/src/main/res/values-zh-rHK/strings.xml @@ -1,8 +1,8 @@ - 暫時沒有更新。\n請稍候再試。 - 連線錯誤 - 無法建立網路連線。\n請稍候再試。 + 暫時沒有更新。\n請稍候再試。 + 連線錯誤 + 無法建立網路連線。\n請稍候再試。 接近 diff --git a/android-sdk-ui/src/main/res/values-zh-rSG/strings.xml b/android-sdk-ui/src/main/res/values-zh-rSG/strings.xml index e07eab62e..7a0633e80 100644 --- a/android-sdk-ui/src/main/res/values-zh-rSG/strings.xml +++ b/android-sdk-ui/src/main/res/values-zh-rSG/strings.xml @@ -1,8 +1,8 @@ - 暂时没有更新。\n请稍候再试。 - 连接错误 - 无法建立网络连接。\n请稍候再试。 + 暂时没有更新。\n请稍候再试。 + 连接错误 + 无法建立网络连接。\n请稍候再试。 接近 diff --git a/android-sdk-ui/src/main/res/values-zh-rTW/strings.xml b/android-sdk-ui/src/main/res/values-zh-rTW/strings.xml index 608b0e88c..6f864fa1c 100644 --- a/android-sdk-ui/src/main/res/values-zh-rTW/strings.xml +++ b/android-sdk-ui/src/main/res/values-zh-rTW/strings.xml @@ -1,8 +1,8 @@ - 暫時沒有更新。\n請稍候再試。 - 連線錯誤 - 無法建立網路連線。\n請稍候再試。 + 暫時沒有更新。\n請稍候再試。 + 連線錯誤 + 無法建立網路連線。\n請稍候再試。 接近 diff --git a/android-sdk-ui/src/main/res/values/attrs.xml b/android-sdk-ui/src/main/res/values/attrs.xml index 980113686..b1ee8bcb4 100644 --- a/android-sdk-ui/src/main/res/values/attrs.xml +++ b/android-sdk-ui/src/main/res/values/attrs.xml @@ -1,8 +1,8 @@ - - - + + + diff --git a/android-sdk-ui/src/main/res/values/colors.xml b/android-sdk-ui/src/main/res/values/colors.xml index 77ddd5208..310a2f24e 100644 --- a/android-sdk-ui/src/main/res/values/colors.xml +++ b/android-sdk-ui/src/main/res/values/colors.xml @@ -16,20 +16,20 @@ #1B78CF #5f000000 - #3F3F3F - #666565 - #3F3F3F + #3F3F3F + #666565 + #3F3F3F - #F5F5F5 + #F5F5F5 - #50CCCCCC - #30CCCCCC - @android:color/white + #50CCCCCC + #30CCCCCC + @android:color/white - #f33e3e - #1bbdf2 - #2f3436 - #ffffff + #f33e3e + #1bbdf2 + #2f3436 + #ffffff #3F3F3F #50CCCCCC diff --git a/android-sdk-ui/src/main/res/values/dimens.xml b/android-sdk-ui/src/main/res/values/dimens.xml index 3a0ec428c..4d96a8e57 100644 --- a/android-sdk-ui/src/main/res/values/dimens.xml +++ b/android-sdk-ui/src/main/res/values/dimens.xml @@ -1,14 +1,14 @@ - 380.0dp + 380.0dp - 1.0dp - 1.0dp - 0.5dp - 1.0dp - 1.0dp - 1.0dp - 2.0dp + 1.0dp + 1.0dp + 0.5dp + 1.0dp + 1.0dp + 1.0dp + 2.0dp 1.0dp 1.0dp diff --git a/android-sdk-ui/src/main/res/values/strings.xml b/android-sdk-ui/src/main/res/values/strings.xml index 428721076..4b1a7d4aa 100644 --- a/android-sdk-ui/src/main/res/values/strings.xml +++ b/android-sdk-ui/src/main/res/values/strings.xml @@ -1,9 +1,9 @@ - We have no updates.\nPlease check again later. - Connection Error - Cannot establish network connection.\nPlease try again later. + We have no updates.\nPlease check again later. + Connection Error + Cannot establish network connection.\nPlease try again later. Close diff --git a/android-sdk-ui/src/main/res/values/styles.xml b/android-sdk-ui/src/main/res/values/styles.xml index 248054b85..798fab696 100644 --- a/android-sdk-ui/src/main/res/values/styles.xml +++ b/android-sdk-ui/src/main/res/values/styles.xml @@ -390,21 +390,21 @@ @@ -430,22 +430,22 @@ wrap_content