Setup
In the project level build.gradle
file, add the following lines. This will make the SDKs from our server available to you.
- Java
- Kotlin
- React Native
- Flutter
Project/build.gradle
buildscript { // ... dependencies { // VERSION must be 3.3.3, 3.4.3, 3.5.4, 3.6.4, 4.0.1 or 4.1.x classpath("com.android.tools.build:gradle:VERSION") }}allprojects { repositories { // ... maven { url "https://repository.bharatx.tech/repository/maven-releases/" credentials { username "repository-user" password "nxN7D4U6CBdJs8g2" } } }}
Add the following line to your app-level build.gradle
file.
Project/app/build.gradle
implementation 'tech.bharatx.sdk:startup:1.0.6'
Project/build.gradle
buildscript { // ... dependencies { // VERSION must be 3.3.3, 3.4.3, 3.5.4, 3.6.4, 4.0.1 or 4.1.x classpath("com.android.tools.build:gradle:VERSION") }}allprojects { repositories { // ... maven { url "https://repository.bharatx.tech/repository/maven-releases/" credentials { username "repository-user" password "nxN7D4U6CBdJs8g2" } } }}
Add the following line to your app-level build.gradle
file.
Project/app/build.gradle
implementation 'tech.bharatx.sdk:startup:1.0.6'
Project/android/build.gradle
buildscript { // ... dependencies { // VERSION must be 3.3.3, 3.4.3, 3.5.4, 3.6.4, 4.0.1 or 4.1.x classpath("com.android.tools.build:gradle:VERSION") }}allprojects { repositories { // ... maven { url "https://repository.bharatx.tech/repository/maven-releases/" credentials { username "repository-user" password "nxN7D4U6CBdJs8g2" } } }}
Install the required BharatX packages:
- NPM
- Yarn
npm install --save @bharatx/bharatx-reactnative-securityhelpers@1.0.3-release1 @bharatx/bharatx-reactnative-alternatedata@1.0.2-release1 @bharatx/bharatx-reactnative-common@1.0.6-release1 @bharatx/bharatx-reactnative-startup@1.0.6-release1
yarn add @bharatx/bharatx-reactnative-securityhelpers@1.0.3-release1 @bharatx/bharatx-reactnative-alternatedata@1.0.2-release1 @bharatx/bharatx-reactnative-common@1.0.6-release1 @bharatx/bharatx-reactnative-startup@1.0.6-release1
Project/android/build.gradle
buildscript { // ... dependencies { // VERSION must be 3.3.3, 3.4.3, 3.5.4, 3.6.4, 4.0.1 or 4.1.x classpath("com.android.tools.build:gradle:VERSION") }}allprojects { repositories { // ... maven { url "https://repository.bharatx.tech/repository/maven-releases/" credentials { username "repository-user" password "nxN7D4U6CBdJs8g2" } } }}
Add the BharatX dependency to pubspec.yaml
:
Project/pubspec.yaml
dependencies: bharatx_flutter_startup: 1.0.6-release1
For BharatX's SDK to work, your Flutter's Main Activity should extend
from FlutterFragmentActivity
rather than FlutterActivity
given default.
Go to:
Project/android/app/src/main/java.kotlin/your/apps/packagename/MainActivity
and replace all references to FlutterActivity
by FlutterFragmentActivity
.
You can now use BharatX's SDK in your project!