diff --git a/README.md b/README.md index 98d45e0..fa82249 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ This React Native bridge supports React Native app builds with version `0.61.5` - [Campaigns](#campaigns) - [The App Id](#the-app-id) - [Events](#events) + - [Standard Events](#standard-events) - [Campaign submission callback](#campaign-submission-callback) - [Reset Campaign data](#reset-campaign-data) - [Managing an existing Campaign](#managing-an-existing-campaign) @@ -79,6 +80,23 @@ You can start using the Usabilla for React Native module in your app by requirin `const usabilla = require('usabilla-react-native')` +**Note : For using latest SDK and Standard Events, Hosting App's Gradle needs to be updated** +1. Change `distributionUrl` in **gradle-wrapper.properties** - `distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip` + +![](./images/Android1.png) + +2. Udate **build.gradle** to use + `buildToolsVersion = "30.0.2"` + `compileSdkVersion = 31` + `targetSdkVersion = 31` + `classpath("com.android.tools.build:gradle:7.1.2")` + +![](./images/Android2.png) + +3. Explicitly declare the `android:exported=”true”` attribute in the **AndroidManifest**. + +![](./images/Android3.png) + ## Campaigns In the Usabilla for Apps Platform, a campaign is defined as a proactive survey targeted to a specific set of users. @@ -121,6 +139,24 @@ For more on how to use custom variables, have a look at [Custom Variables](#cust **Note: A campaign will never be triggered for the same user more than once.** +### Standard Events + +From **`v1.0.0`** onwards we are introducing a new feature **Standard Events**. + +**Note : Now with Standard Events you can show campaigns in your application(Host application embedded with GetFeedback Digital/ Usabilla SDK) without adding any extra lines of code. You just have to create Standard Campaigns(Campaigns with Default/System Events) with your `User-Account` at `GetFeedback`.** + +Currently we are supporting these lifecycle / system events : + - `LAUNCH` : Define as when the app is entering foreground + - `EXIT` : Define as when the app is entering to the background + - `CRASH` : Define as when the app is crashed ( terminated due to an unexpected behaviour) + +**Note : SDK will not listen to any Default / System events, until it has been initialised and it is recommended to initialise only once. In order to make this work properly, SDK has to be initialize using `FlutterUsabilla.initialize` at the earliest possibility, preferably in the initState method:** + +To get some additional information about the response left by your user, you have the option to use the [`callback`](#campaign-submission-callback) method. This is a listener that listens in to the moment a Campaign with standard events is closed. + +[Click here](https://support.usabilla.com/hc/en-us/articles/4747575452562) to read more about Standard Events. + + ### Campaign submission callback To get some additional information about the response left by your user, you have the option to use the `setCampaignDidClose` method. This is a listener that listens in to the moment a Campaign is closed. diff --git a/android/build.gradle b/android/build.gradle index 5955e2c..15bfabe 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 28 - buildToolsVersion "28.0.3" + compileSdkVersion 31 + buildToolsVersion "30.0.2" defaultConfig { minSdkVersion 19 - targetSdkVersion 28 + targetSdkVersion 31 versionCode 1 versionName "1.0.0" } @@ -16,8 +16,7 @@ android { } dependencies { - /* TODO: Revert back ubform to semantic version for all minor & patches ~ 7.+ */ - implementation 'com.usabilla.sdk:ubform:7.4.0' + implementation 'com.usabilla.sdk:ubform:7.+' implementation "com.facebook.react:react-native:0.+" implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' } diff --git a/images/Android1.png b/images/Android1.png new file mode 100644 index 0000000..b434b00 Binary files /dev/null and b/images/Android1.png differ diff --git a/images/Android2.png b/images/Android2.png new file mode 100644 index 0000000..0bd9e29 Binary files /dev/null and b/images/Android2.png differ diff --git a/images/Android3.png b/images/Android3.png new file mode 100644 index 0000000..881e425 Binary files /dev/null and b/images/Android3.png differ