Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4272d8c
Added APIs for in-app messaging.
shtomar-adb Feb 3, 2022
32041fe
Added the JS equivalent of Messaging Delegate.
shtomar-adb Feb 8, 2022
acc79a9
Removed the suppresautotrack parameter from Message.dismiss.
shtomar-adb Feb 8, 2022
6bc2c05
Updated sample app to show usage of more IAM API's. Update in the imp…
shtomar-adb Feb 9, 2022
152cf47
Address code review feedback.
shtomar-adb Feb 10, 2022
3e74668
Addressed code review feedback.
shtomar-adb Feb 11, 2022
145b590
Added Message parameter in urlLoaded function of MessagingDelegate.
shtomar-adb Feb 11, 2022
0b5724c
Added IAM APIs in Messaging Readme
shtomar-adb Feb 11, 2022
7d7af90
Added more Logs.
shtomar-adb Feb 11, 2022
39e8415
Merge branch 'messaging' of github.com:adobe/aepsdk-react-native into…
shtomar-adb Feb 11, 2022
2c917fe
Merged the upstream staging branch.
shtomar-adb Feb 11, 2022
5821a50
Rename function Message.clearMessage to Message.clear
shtomar-adb Feb 11, 2022
1fbc49c
Updated the Readme to address code review feedback
shtomar-adb Feb 11, 2022
4ed1412
Updated the installation instructions
shtomar-adb Feb 12, 2022
0227248
Added Android native code RN package
shtomar-adb Feb 19, 2022
e8fbc67
Merge branch 'messaging' of github.com:adobe/aepsdk-react-native into…
shtomar-adb Feb 19, 2022
44d975f
Updated Android install instructions
shtomar-adb Feb 23, 2022
fc07d67
Added Unit tests and Type script description file.
shtomar-adb Mar 5, 2022
88e4ccb
Changes in RN Messaging package Android side.
shtomar-adb Mar 9, 2022
236aa9f
Added Offer activity id and placement id as metadata in AndroidManife…
shtomar-adb Mar 9, 2022
b5a4a28
Integrated the updated messaging.aar to keep track and handleJsMessag…
shtomar-adb Mar 12, 2022
3f955f9
Added the activity and placement id in plist. Changed the bundle id …
shtomar-adb Mar 12, 2022
a1cc78c
Merge branch 'staging' of https://github.com/adobe/aepsdk-react-nativ…
dsoffiantini Apr 13, 2022
db3ace5
-a couple small updates from the pr review
sbenedicadb Apr 21, 2022
e76001b
Merge pull request #174 from sbenedicadb/messaging
sbenedicadb Apr 21, 2022
204a49d
add some of the extensions back into android sample app
sbenedicadb Apr 21, 2022
fbd9193
-fix registerExtension calls
sbenedicadb Apr 21, 2022
ff7eb40
Merge pull request #175 from sbenedicadb/messaging
sbenedicadb Apr 22, 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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
18 changes: 11 additions & 7 deletions apps/AEPSampleApp/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@

<application
android:name=".MainApplication"
android:label="@string/app_name"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
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"/>

<activity
android:name=".MainActivity"
android:label="@string/app_name"
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" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,26 @@
package com.aepsampleapp;

import android.app.Application;
import android.content.Context;

import com.adobe.marketing.mobile.AdobeCallback;
import com.adobe.marketing.mobile.Assurance;
import com.adobe.marketing.mobile.InvalidInitException;
import com.adobe.marketing.mobile.Lifecycle;
import com.adobe.marketing.mobile.Edge;
import com.adobe.marketing.mobile.LoggingMode;
import com.adobe.marketing.mobile.Messaging;
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Edge;
import com.adobe.marketing.mobile.edge.consent.Consent;
import com.adobe.marketing.mobile.Lifecycle;
import com.adobe.marketing.mobile.Signal;
import com.adobe.marketing.mobile.UserProfile;
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Assurance;
import com.adobe.marketing.mobile.edge.identity.Identity;
import com.adobe.marketing.mobile.edge.consent.Consent;
import com.adobe.marketing.mobile.optimize.Optimize;
import com.adobe.marketing.mobile.InvalidInitException;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {
Expand Down Expand Up @@ -69,60 +68,27 @@ public ReactNativeHost getReactNativeHost() {
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
MobileCore.setApplication(this);
MobileCore.setLogLevel(LoggingMode.DEBUG);
try {
UserProfile.registerExtension();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add those extension registrations back.

com.adobe.marketing.mobile.Identity.registerExtension();
com.adobe.marketing.mobile.edge.identity.Identity.registerExtension();
Lifecycle.registerExtension();
Signal.registerExtension();
Edge.registerExtension();
Consent.registerExtension();
Messaging.registerExtension();
Assurance.registerExtension();
} catch (InvalidInitException e) {
e.printStackTrace();
}

MobileCore.configureWithAppID("your-app-ID");
MobileCore.start(new AdobeCallback() {
@Override
public void call(Object o) {
MobileCore.lifecycleStart(null);
}
});
}

/**
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
*
* @param context
* @param reactInstanceManager
*/
private static void initializeFlipper(
Context context, ReactInstanceManager reactInstanceManager) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.aepsampleapp.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
} catch (ClassNotFoundException e) {
MobileCore.setLogLevel(LoggingMode.VERBOSE);
try {
Edge.registerExtension();
Identity.registerExtension();
Optimize.registerExtension();
Messaging.registerExtension();
UserProfile.registerExtension();
Lifecycle.registerExtension();
Signal.registerExtension();
Consent.registerExtension();
Assurance.registerExtension();
} catch (InvalidInitException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
MobileCore.configureWithAppID("YOUR-APP-ID");
MobileCore.start(new AdobeCallback() {
@Override
public void call(Object o) {
MobileCore.lifecycleStart(null);
}
});
}
}
3 changes: 3 additions & 0 deletions apps/AEPSampleApp/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@ allprojects {
maven { url 'https://www.jitpack.io' }
mavenCentral()
jcenter()
flatDir {
dirs project(':adobe_react-native-aepmessaging').file('libs')
}
}
}
Loading