Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
931ee72
Initial commit. Added Optimize RN package and Android sample app.
shtomar-adb Oct 22, 2021
dd46322
Update README.md
shtomar-adb Oct 22, 2021
10646c1
Added classed offer and Proposition
shtomar-adb Oct 23, 2021
8a8cde6
Merge branch 'optimize' of github.com:adobe/aepsdk-react-native into …
shtomar-adb Oct 23, 2021
8517f67
Added model class Offer and Preposition in js and hadle Offer tapped …
shtomar-adb Oct 29, 2021
e28cace
Added podspec in Optimize wrapper.
shtomar-adb Nov 5, 2021
80cce92
Added RN wrapper ios bridge code
shtomar-adb Nov 10, 2021
a41080a
Updated js files with values type.
shtomar-adb Nov 19, 2021
e60abad
Modified the model classes Offer, Proposition, DecisionScope
shtomar-adb Nov 20, 2021
c48da13
Code optimization in model classes and data movement between native a…
shtomar-adb Dec 1, 2021
edb49ba
Updated Android aar and made necessary changes in js and Android native.
shtomar-adb Dec 15, 2021
c0a4ec9
Added following 2 news js API: generateReferenceXDM and generateTapIn…
shtomar-adb Dec 16, 2021
bd8f578
Made changes in ios code to integrate with changes in JS API.
shtomar-adb Dec 17, 2021
490b539
code review feedback
shtomar-adb Feb 15, 2022
30d1816
Code review feedback
shtomar-adb Feb 15, 2022
47fc39c
Code review feedback.
shtomar-adb Feb 17, 2022
dc175cd
Removed flow-typed folder
shtomar-adb Feb 23, 2022
5239e4e
Updated Readme
shtomar-adb Feb 23, 2022
2de922e
Added public class documentation
shtomar-adb Feb 23, 2022
9087805
Updated the comments for DecisionScope
shtomar-adb Feb 25, 2022
bdda743
Merge branch 'optimize' of github.com:adobe/aepsdk-react-native into …
shtomar-adb Feb 25, 2022
a993441
Merge staging branch and resolve the merge conflicts.
shtomar-adb Feb 25, 2022
6396e79
Fix compilation issues.
shtomar-adb Feb 26, 2022
db890e4
Improved the UI: Improve the List view showing all the Offers.
shtomar-adb Mar 1, 2022
0330b23
Implemented Offer displayed interaction in sample app.
shtomar-adb Mar 2, 2022
6a2bf3d
Added typescript definition file and Unit tests.
shtomar-adb Mar 4, 2022
e3e269b
Changes in Offer.js to fix the broken Offer.display() and Offer.tappe…
shtomar-adb Mar 23, 2022
f93e5ab
Fixed an issue in getting fetched propositions.
shtomar-adb Mar 30, 2022
4e54868
Updated the public class definitions in Readme
shtomar-adb Mar 30, 2022
feb14f8
Updated installation instructions
shtomar-adb Mar 31, 2022
62c298d
Merge branch 'staging' of https://github.com/adobe/aepsdk-react-nativ…
dsoffiantini Apr 13, 2022
32f4613
feat: converts optimize to ts
dsoffiantini Apr 14, 2022
4c6eeab
-updating messaging RN dependencies on optimize to use RN pod and pac…
sbenedicadb Apr 26, 2022
e5ced8c
-update pods
sbenedicadb May 3, 2022
d8d1272
-point to dev for services
sbenedicadb May 3, 2022
1125b2e
Merge pull request #176 from sbenedicadb/messaging
sbenedicadb May 3, 2022
26ffaf8
Merge branch 'staging' of https://github.com/adobe/aepsdk-react-nativ…
dsoffiantini May 11, 2022
b30d2b5
Getting dependencies from SNAPSHOT instead of using aar
cacheung May 19, 2022
9053474
remove aar
cacheung May 19, 2022
24b0d70
bug: fixes optimize sample app view
dsoffiantini May 20, 2022
8002436
Merge pull request #178 from cacheung/optimize
cacheung May 27, 2022
c306c87
feat: updates messaging snapshot
dsoffiantini May 31, 2022
f3e5dbb
Merge branch 'messaging' of https://github.com/adobe/aepsdk-react-nat…
dsoffiantini Jun 2, 2022
a0e66f6
updates ios build
dsoffiantini Jun 2, 2022
270f398
ios fixes
dsoffiantini Jun 10, 2022
5d5ae0a
android fixes
dsoffiantini Jun 11, 2022
a69b83b
android fixes
dsoffiantini Jun 11, 2022
f209aef
remove optimize aar
dsoffiantini Jun 15, 2022
5390546
docs: update optimize documentation
dsoffiantini Jun 15, 2022
bdb04b9
fix: pr feedback
dsoffiantini Jun 20, 2022
3f73a64
fix: updates hoisting
dsoffiantini Jun 14, 2022
e3bc55e
fix:revert gradle versions
dsoffiantini Jun 22, 2022
743a007
fix: update copyrights
dsoffiantini Jun 22, 2022
60b54d5
Merge branch 'optimize' of https://github.com/adobe/aepsdk-react-nati…
dsoffiantini Jun 22, 2022
15aef6b
fix: bad merge on workspaces
dsoffiantini Jun 22, 2022
0be24c5
feat: change optimize to async await
dsoffiantini Jun 22, 2022
0fa3863
docs: update docs to be more accurate
dsoffiantini Jun 22, 2022
c2906fa
version: bump optimize to beta
dsoffiantini Jun 22, 2022
456f127
version: bump messaging version, add readme badges
dsoffiantini Jun 23, 2022
c41f9ed
docs: update iam docs
dsoffiantini Jun 23, 2022
bef71cb
Merge branch 'staging' of https://github.com/adobe/aepsdk-react-nativ…
dsoffiantini Jun 27, 2022
ac8d602
Merge branch 'staging' of https://github.com/adobe/aepsdk-react-nativ…
dsoffiantini Jun 29, 2022
5890a82
version: revert messaging version
dsoffiantini Jul 18, 2022
97f9535
Merge branch 'staging' of https://github.com/adobe/aepsdk-react-nativ…
dsoffiantini Jul 18, 2022
4d556c1
fix: remove snapshot for android
dsoffiantini Jul 18, 2022
6a2f7dd
docs: update messaging docs
dsoffiantini Jul 18, 2022
90db378
docs: messaging docs formatting
dsoffiantini Jul 18, 2022
64bdeb2
Merge pull request #177 from adobe/optimize
dsoffiantini Jul 18, 2022
d0d3664
fix: :bug: register optimize in sample app
dsoffiantini Jul 18, 2022
e478cee
Merge pull request #191 from adobe/register-optimize
dsoffiantini Jul 18, 2022
17c98f4
fix: :bug: register edge consent on ios sample app
dsoffiantini Jul 18, 2022
74a0d9b
docs: add beta tag to ios sdk
dsoffiantini Jul 18, 2022
9814f94
Merge branch 'optimize' of https://github.com/adobe/aepsdk-react-nati…
dsoffiantini Jul 18, 2022
d4015da
Merge pull request #193 from adobe/register-edge-consent-ios
dsoffiantini Jul 18, 2022
0e67f95
Merge pull request #192 from adobe/optimize
dsoffiantini Jul 18, 2022
52afcad
fix: removes android warning using event emitter
dsoffiantini Jul 19, 2022
371e566
docs: missing comma
dsoffiantini Jul 20, 2022
9019125
build: circleci version
dsoffiantini Jul 20, 2022
6d328e4
Merge pull request #194 from adobe/android-event-emitter-warning
dsoffiantini Jul 20, 2022
0fd87b2
Merge pull request #197 from adobe/optimize
dsoffiantini Jul 20, 2022
d8b7336
feat: includes meta information in offer
dsoffiantini Jul 20, 2022
1e7cd11
Merge pull request #198 from adobe/add-meta-to-offer
dsoffiantini Jul 20, 2022
30ca0a0
Merge pull request #199 from adobe/optimize
dsoffiantini Jul 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions PRERELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# Using Pre-Release Extensions

If you would like to use Optimize or Messaging before they have been released, you can use the following steps to install them onto your app

## Steps to Install Optimize and Messaging

- Place Optimize and Messaging packages folder into app repo or directory of your choosing
- In your app repository, run
```javascript
npm install (path/to/optimize) (path/to/messaging)
```
to install the local version of the package to your app

### Android
- Inside android/app.gradle add the following into the two repositories blocks in the file `maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }`

### IOS
- Inside Podfile, add the following line inside the target block `pod "AEPMessaging", :git => "https://github.com/adobe/aepsdk-messaging-ios.git", :branch => "staging"`
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ This repository is a monorepo and contains a collection of React Native modules
| [@adobe/react-native-aepedgeidentity](./packages/edgeidentity) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepedgeidentity.svg)](https://www.npmjs.com/package/@adobe/react-native-aepedgeidentity) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepedgeidentity)](https://www.npmjs.com/package/@adobe/react-native-aepedgeidentity) |[EdgeIdentity](https://aep-sdks.gitbook.io/docs/foundation-extensions/identity-for-edge-network)
| [@adobe/react-native-aepedgeconsent](./packages/edgeconsent) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepedgeconsent.svg)](https://www.npmjs.com/package/@adobe/react-native-aepedgeconsent) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepedgeconsent)](https://www.npmjs.com/package/@adobe/react-native-aepedgeconsent) | [EdgeConsent](https://aep-sdks.gitbook.io/docs/foundation-extensions/consent-for-edge-network)
| [@adobe/react-native-aepmessaging](./packages/messaging) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepmessaging.svg)](https://www.npmjs.com/package/@adobe/react-native-aepmessaging) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepmessaging)](https://www.npmjs.com/package/@adobe/react-native-aepmessaging) | [Messaging](https://aep-sdks.gitbook.io/docs/beta/iam)
| [@adobe/react-native-aepassurance](./packages/assurance) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepassurance.svg)](https://www.npmjs.com/package/@adobe/react-native-aepassurance) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepassurance)](https://www.npmjs.com/package/@adobe/react-native-aepassurance) | [Assurance](https://aep-sdks.gitbook.io/docs/foundation-extensions/adobe-experience-platform-assurance)
| [@adobe/react-native-aepassurance](./packages/assurance) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepassurance.svg)](https://www.npmjs.com/package/@adobe/react-native-aepassurance) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepassurance)](https://www.npmjs.com/package/@adobe/react-native-aepassurance) | [Assurance](https://aep-sdks.gitbook.io/docs/foundation-extensions/adobe-experience-platform-assurance)
| [@adobe/react-native-aepoptimize](./packages/optimize) | [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepoptimize)](https://www.npmjs.com/package/@adobe/react-native-aepoptimize) ![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepoptimize) | [Optimize](https://aep-sdks.gitbook.io/docs/using-mobile-extensions/adobe-journey-optimizer-decisioning)

> Note: @adobe/react-native-aepassurance <=2.0 is not compatible with @adobe/react-native-aepcore. Please use @adobe/react-native-aepassurance [3.x or above](./packages/assurance#install-npm-package).

Expand Down
4 changes: 3 additions & 1 deletion apps/AEPSampleApp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ build/
.gradle
local.properties
*.iml
*.hprof

# node.js
#
Expand Down Expand Up @@ -55,5 +56,6 @@ buck-out/
# Bundle artifact
*.jsbundle

# CocoaPods
# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/
10 changes: 9 additions & 1 deletion apps/AEPSampleApp/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';
import { Button, View } from 'react-native';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { NavigationContainer } from '@react-navigation/native';
import OptimizeView from './extensions/OptimizeView';
import ProfileView from './extensions/ProfileView';
import MessagingView from './extensions/MessagingView';
import CoreView from './extensions/CoreView';
Expand All @@ -27,9 +28,15 @@ function HomeScreen({ navigation }: NavigationProps) {
onPress={() => navigation.navigate('IdentityView')}
title="Identity"
/>

<Button
onPress={() => navigation.navigate('MessagingView')}
title="Messaging" />
title="Messaging" />

<Button
onPress={() => navigation.navigate('OptimizeView')}
title="Optimize"/>

<Button
onPress={() => navigation.navigate('EdgeView')}
title="Edge"
Expand Down Expand Up @@ -65,6 +72,7 @@ export default function App() {
<Drawer.Screen name="EdgeIdentityView" component={EdgeIdentityView} />
<Drawer.Screen name="ConsentView" component={ConsentView} />
<Drawer.Screen name="AssuranceView" component={AssuranceView} />
<Drawer.Screen name="OptimizeView" component={OptimizeView}/>
</Drawer.Navigator >
</NavigationContainer >
);
Expand Down
2 changes: 1 addition & 1 deletion apps/AEPSampleApp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
How to run the sample app:

### Add your App Id:
In `ios/**/AppDelegate.m`, find the call to `configureWithAppId` and add your app id.
In `ios/**/AppDelegate.mm`, find the call to `configureWithAppId` and add your app id.

In `android/**/MainApplication.java`, find the call to `configureWithAppId` and add your app id.

Expand Down
116 changes: 107 additions & 9 deletions apps/AEPSampleApp/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: "com.android.application"

import com.android.build.OutputFile
import org.apache.tools.ant.taskdefs.condition.Os

/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
Expand Down Expand Up @@ -114,35 +115,111 @@ def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* This should be set on project.ext.react and that value will be read here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);

/**
* Architectures to build native code for.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
applicationId "com.aepsampleapp"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-21",
"APP_STL=c++_shared",
"NDK_TOOLCHAIN_VERSION=clang",
"GENERATED_SRC_DIR=$buildDir/generated/source",
"PROJECT_BUILD_DIR=$buildDir",
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build"
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
cppFlags "-std=c++17"
// Make sure this target name is the same you specify inside the
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
targets "aepsampleapp_appmodules"

// Fix for windows limit on number of character in file paths and in command lines
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
arguments "NDK_APP_SHORT_COMMANDS=true"
}
}
}
if (!enableSeparateBuildPerCPUArchitecture) {
ndk {
abiFilters (*reactNativeArchitectures())
}
}
}
}

if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
path "$projectDir/src/main/jni/Android.mk"
}
}
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
afterEvaluate {
// If you wish to add a custom TurboModule or component locally,
// you should uncomment this line.
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)

// Due to a bug inside AGP, we have to explicitly set a dependency
// between configureNdkBuild* tasks and the preBuild tasks.
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
configureNdkBuildRelease.dependsOn(preReleaseBuild)
configureNdkBuildDebug.dependsOn(preDebugBuild)
reactNativeArchitectures().each { architecture ->
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
dependsOn("preDebugBuild")
}
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
dependsOn("preReleaseBuild")
}
}
}
}

splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
include (*reactNativeArchitectures())
}
}
signingConfigs {
Expand Down Expand Up @@ -185,13 +262,14 @@ android {

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])

//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
exclude group:'com.facebook.fbjni'
}

debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
Expand All @@ -212,11 +290,31 @@ dependencies {
}
}

if (isNewArchitectureEnabled()) {
// If new architecture is enabled, we let you build RN from source
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
// This will be applied to all the imported transtitive dependency.
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.facebook.react:react-native"))
.using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source")
}
}
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
from configurations.implementation
into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

def isNewArchitectureEnabled() {
// To opt-in for the New Architecture, you can either:
// - Set `newArchEnabled` to true inside the `gradle.properties` file
// - Invoke gradle with `-newArchEnabled=true`
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
Expand All @@ -19,6 +19,7 @@
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceEventListener;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
Expand Down Expand Up @@ -51,7 +52,7 @@ public void apply(OkHttpClient.Builder builder) {
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceManager.ReactInstanceEventListener() {
new ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
Expand Down
50 changes: 17 additions & 33 deletions apps/AEPSampleApp/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,40 +1,24 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.aepsampleapp">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.aepsampleapp">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:name=".MainApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme">

<meta-data
android:name="activityId"
android:value="xcore:offer-activity:14a161ea55e38721"/>
<meta-data
android:name="placementId"
android:value="xcore:offer-placement:14ac98265948c89b"/>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme">

<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:label="@string/app_name"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<meta-data android:name="activityId" android:value="xcore:offer-activity:14a161ea55e38721"/>
<meta-data android:name="placementId" android:value="xcore:offer-placement:14ac98265948c89b"/>
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="assurance" />
</intent-filter>
</activity>
</application>
<data android:scheme="assurance" />
</intent-filter>
</activity>
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
package com.aepsampleapp;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;

public class MainActivity extends ReactActivity {

Expand All @@ -23,4 +25,27 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "AEPSampleApp";
}

/**
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
* you can specify the rendered you wish to use (Fabric or the older renderer).
*/
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new MainActivityDelegate(this, getMainComponentName());
}

public static class MainActivityDelegate extends ReactActivityDelegate {
public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
super(activity, mainComponentName);
}

@Override
protected ReactRootView createRootView() {
ReactRootView reactRootView = new ReactRootView(getContext());
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
return reactRootView;
}
}
}
Loading