Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
9e36891
Add getExperienceCloudId API
cacheung Sep 21, 2021
bdaa54e
Update Readme
cacheung Sep 21, 2021
f019b4d
Some more Readme fix
cacheung Sep 21, 2021
458ce85
Merge pull request #48 from cacheung/syncStaging
cacheung Sep 21, 2021
85e6ce6
Update links in Readme
cacheung Sep 21, 2021
55bb9c5
update peer dependency edgeidentity version in messaging wrapper
cacheung Sep 21, 2021
d5d75ee
update peerDependencies version
cacheung Sep 21, 2021
20b1fdf
revert Messaging package.json
cacheung Sep 21, 2021
3833c14
UserProfile (1.0.0-alpha.3) -> staging (#50) (#53)
yangyansong-adbe Sep 22, 2021
010dd42
Update with review comments
cacheung Sep 22, 2021
32ce266
Edge (1.0.0-alpha.2), Messaging (1.0.0-alpha.2) -> staging (#54)
yangyansong-adbe Sep 22, 2021
e438749
Update Edge Wrapper Readme
cacheung Sep 22, 2021
c93100d
update readme
cacheung Sep 22, 2021
10643a1
Merge pull request #56 from cacheung/edgeReadme
cacheung Sep 22, 2021
c1e5d72
Merge branch 'staging' of github.com:adobe/aepsdk-react-native into e…
cacheung Sep 22, 2021
596d224
Update Readme and revert code
cacheung Sep 22, 2021
0155864
update package json for sample app
cacheung Sep 22, 2021
37e8165
Merge pull request #49 from cacheung/edgeIdentity
cacheung Sep 22, 2021
b811484
Fix a typo in sample app
cacheung Sep 22, 2021
7612455
Merge pull request #57 from cacheung/edgeIdentity
cacheung Sep 22, 2021
2a13742
Add promise checking for error case
cacheung Sep 22, 2021
284ce32
Remove the unused import statements (#60)
cacheung Sep 23, 2021
2d6dcbe
EdgeIdentity (1.0.0-alpha.2) -> staging (#59)
yangyansong-adbe Sep 23, 2021
7271b88
fix a typo in readme (#61)
cacheung Sep 23, 2021
a1547ef
Merge branch 'main' into staging
yangyansong-adbe Sep 23, 2021
e67c005
add a new API in Core - resetIdentities (#63) (#64)
yangyansong-adbe Oct 2, 2021
a09ae8e
Merge commit 'b58470acfaf35b5dc6abdabc413233d609de9a51' into staging
yangyansong-adbe Oct 2, 2021
784c618
Update README.md
yangyansong-adbe Oct 4, 2021
f4001a5
add a FAQ section (#66)
yangyansong-adbe Oct 8, 2021
a282e07
add promise reject with error
cacheung Oct 13, 2021
2117c97
Merge branch 'edgeIdentity' into edgeIds
cacheung Oct 13, 2021
72735b2
Merge pull request #68 from cacheung/edgeIds
cacheung Oct 13, 2021
80e46c5
Updated for callback error
cacheung Oct 14, 2021
9f6c744
update to final for handleError parameter
cacheung Oct 14, 2021
1b38b08
update with review feedback
cacheung Oct 15, 2021
253b2cb
Merge pull request #58 from cacheung/promiseCheck
cacheung Oct 15, 2021
9ce3c07
add import statements for RCTAEPEdgeIdentityModule.java
cacheung Oct 15, 2021
7c4ad4d
Merge pull request #70 from cacheung/fixerror
cacheung Oct 15, 2021
6b5ad9a
Consent package setup
emdobrin Nov 1, 2021
a74b9c8
update dependencies
emdobrin Nov 1, 2021
4e105f3
Merge pull request #76 from emdobrin/edge
emdobrin Nov 2, 2021
927170c
Reduce visibility for util classes, cleanup
emdobrin Oct 29, 2021
e7a5c3e
Merge pull request #77 from emdobrin/utils-update
emdobrin Nov 2, 2021
c41641a
Fix consent module
emdobrin Nov 2, 2021
c3ab473
Add consent to iOS sample app
emdobrin Nov 2, 2021
3405b93
Renaming, update dependencies
emdobrin Nov 3, 2021
771949a
Update gradle
emdobrin Nov 5, 2021
875224c
Merge pull request #78 from emdobrin/consent
emdobrin Nov 5, 2021
30ce6f7
Add Edge Identity API in JS and Java (#74)
cacheung Nov 10, 2021
a762178
Added APIs for Consent extension (#80)
emdobrin Nov 12, 2021
ea83cd9
Merge branch 'staging' into consent-br
emdobrin Nov 16, 2021
53fe119
Merge pull request #83 from emdobrin/consent-br
emdobrin Nov 16, 2021
21960e1
fix the release issue: NPM registry enforces a minimum of TLS 1.2 beg…
yangyansong-adbe Nov 16, 2021
e7c9269
EdgeIdentity - Updates on JS public APIs, unit testing, test app (#81)
cacheung Nov 19, 2021
bf0813b
Add Edge Identity API in JS and Java (#74)
cacheung Nov 10, 2021
ac09b0a
EdgeIdentity - Updates on JS public APIs, unit testing, test app (#81)
cacheung Nov 19, 2021
9845670
Merge pull request #88 from emdobrin/edgeidentity-apis
emdobrin Nov 19, 2021
31066e1
Merge pull request #89 from adobe/edgeidentity-apis
emdobrin Nov 19, 2021
9803b20
Edge - renaming, sample app and documentation updates (#87)
emdobrin Nov 22, 2021
6f1135f
Consent - renaming public JS classes (#93)
emdobrin Nov 23, 2021
7218bda
Update Readme for EdgeIdentity (#82)
cacheung Nov 24, 2021
3ee2d0e
Edge Identity iOS implementation (#92)
cacheung Nov 24, 2021
6ce7077
EdgeIdentity - renaming
emdobrin Nov 24, 2021
1e71aab
EdgeIdentity - fix typo
emdobrin Nov 24, 2021
19d6a0a
update readme
cacheung Nov 24, 2021
de3af42
Merge pull request #95 from cacheung/edgeReadme
emdobrin Nov 24, 2021
6a1b536
EdgeIdentity - renaming in Readme
emdobrin Nov 24, 2021
ce1e59c
EdgeIdentity - more renaming
emdobrin Nov 24, 2021
0dd0bd3
Merge pull request #94 from emdobrin/identity-rename
emdobrin Nov 24, 2021
e01891f
Consent - updated return promise
emdobrin Nov 25, 2021
eb8f1f8
Pods update
emdobrin Nov 25, 2021
bbdce3c
Merge pull request #97 from emdobrin/consent
emdobrin Nov 25, 2021
4d33e15
Merge pull request #84 from adobe/consent
emdobrin Nov 25, 2021
893bd3a
Merge branch 'staging' into edge
emdobrin Nov 25, 2021
44ef077
Updated pods
emdobrin Nov 25, 2021
fe3c135
Merge pull request #99 from emdobrin/edge
emdobrin Nov 25, 2021
0003360
Convert native identity map object to js identity map
cacheung Nov 26, 2021
ebb2018
Update identity.js for iterating identity item
cacheung Nov 30, 2021
f91ba69
Core - renaming public JS classes (#102)
yangyansong-adbe Nov 30, 2021
d103245
Add jest tests for getIdentities API
cacheung Dec 1, 2021
423b449
remove an extra line of code
cacheung Dec 1, 2021
4e9dc6c
Core - clean up the sample app (#107)
yangyansong-adbe Dec 1, 2021
5c70ff7
Update getIdentity return promise
cacheung Dec 1, 2021
7ebc9cf
Merge pull request #100 from cacheung/customClassPromise
cacheung Dec 1, 2021
f50a961
Changes for the Beta release. Includes changes in the file names and …
shtomar-adb Dec 2, 2021
012ebdf
Updated the unit tests for Messaging.
shtomar-adb Dec 2, 2021
87b483f
Merge the staging branch.
shtomar-adb Dec 2, 2021
820e4a6
Merge branch 'staging' of github.com:adobe/aepsdk-react-native into e…
cacheung Dec 2, 2021
4576ca2
Update Sample App
cacheung Dec 2, 2021
55a2584
Merge branch 'staging' of github.com:adobe/aepsdk-react-native into e…
cacheung Dec 2, 2021
6431162
update app.js and remove an extra file
cacheung Dec 2, 2021
68dd6bd
UserProfile -> staging : rename JS classes (#108)
yangyansong-adbe Dec 2, 2021
a8d1ff5
Merge pull request #111 from cacheung/EdgeIdentityStaging
emdobrin Dec 2, 2021
8405aa1
Merge pull request #110 from cacheung/edgeStaging
cacheung Dec 2, 2021
d5b9a7d
Fixed code review comments.
shtomar-adb Dec 2, 2021
af8b1ba
Merged the staging branch.
shtomar-adb Dec 2, 2021
44f05f0
Removed merge conflicts.
shtomar-adb Dec 2, 2021
f1adeff
Updated the Readme.md
shtomar-adb Dec 3, 2021
ba97fbf
Updated Readme.
shtomar-adb Dec 3, 2021
9963ebd
Add return promise custom type
cacheung Dec 3, 2021
2800d6f
Remove Static for from Readme
cacheung Dec 3, 2021
59910f2
remove styles in EdgeIdentityView
cacheung Dec 3, 2021
bc77f57
revert consent sample app style change
cacheung Dec 3, 2021
acc9e61
move text and breakline to styles
cacheung Dec 3, 2021
49ffb34
remove static in Readme and update sample app style
cacheung Dec 3, 2021
6a602cc
Merge pull request #115 from cacheung/EdgeIdentityStaging
emdobrin Dec 3, 2021
6dd5ac4
Merge pull request #117 from cacheung/consent
emdobrin Dec 3, 2021
d094987
Update Edge.js for return catch error
cacheung Dec 3, 2021
7e30e3a
check null for promise return custom class
cacheung Dec 4, 2021
434d464
update with review feedback
cacheung Dec 4, 2021
200b167
Merge pull request #114 from cacheung/edgeStaging
emdobrin Dec 4, 2021
a621c3d
Fix return type for ts
emdobrin Dec 4, 2021
8028761
Merge pull request #119 from adobe/consent
emdobrin Dec 4, 2021
3eb20c0
Merge pull request #109 from adobe/messaging
emdobrin Dec 4, 2021
4d4fb16
Update syntax for sendEvent
emdobrin Dec 4, 2021
53dd1af
Merge pull request #120 from emdobrin/edge
emdobrin Dec 4, 2021
84436c5
Merge branch 'staging' into edge
emdobrin Dec 4, 2021
48778d5
Merge pull request #121 from emdobrin/edge
emdobrin Dec 4, 2021
e54c705
enum support for AuthenticatedState in ts
cacheung Dec 5, 2021
c654d82
remove extra spaces
cacheung Dec 5, 2021
4bbbe80
fixed typo
cacheung Dec 5, 2021
1e58375
Merge pull request #98 from adobe/edge
emdobrin Dec 14, 2021
77a673f
Merge pull request #122 from cacheung/EdgeIdentityStaging
cacheung Dec 14, 2021
b06ece5
merge from staging
cacheung Dec 14, 2021
0bad1df
Core -> staging: add enum support in d.ts file (#124)
yangyansong-adbe Dec 14, 2021
f213b4a
Rename Items to IdentityMap
cacheung Dec 14, 2021
cf0fab0
Merge pull request #125 from cacheung/edgeStaging
emdobrin Dec 15, 2021
29855d7
Merge pull request #116 from adobe/edgeIdentity
emdobrin Dec 15, 2021
9ed4c4e
Update Readme with initializing information for Edge extensions
cacheung Dec 15, 2021
b5ece34
update Readme files with the review comments
cacheung Dec 15, 2021
cac2014
Update few Readme format
cacheung Dec 15, 2021
c41b962
Merge pull request #126 from cacheung/staging
emdobrin Dec 16, 2021
c1f1f45
update version alpha -> beta (#127)
yangyansong-adbe Dec 16, 2021
a33cc0e
Move from Assurance_publish branch to staging (#128)
PravinPK Dec 17, 2021
634a936
Main README cleanup (#130)
yangyansong-adbe Dec 17, 2021
b94f7a3
REAME cleanup (#132)
yangyansong-adbe Dec 17, 2021
b2ae24c
Bug fix: correct error handling logic (#133)
yangyansong-adbe Dec 20, 2021
b484de6
Remove Jcenter() repository from Gradle file (#134)
yangyansong-adbe Jan 21, 2022
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
c1b4966
Update Home Readme
cacheung Feb 10, 2022
9693241
Fix format
cacheung Feb 10, 2022
152cf47
Address code review feedback.
shtomar-adb Feb 10, 2022
bba19b0
Remove Services from the Readme
cacheung Feb 10, 2022
68e643e
update comments for messaging
cacheung 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
96e45af
Update with review comments
cacheung Feb 12, 2022
4ed1412
Updated the installation instructions
shtomar-adb Feb 12, 2022
40a0a34
update readme package.json description
cacheung Feb 14, 2022
c4e33c5
Update Readme with dependencies and Lifecycle info
cacheung Feb 14, 2022
9d4cb33
Add Native Extension column and add description to extensions
cacheung Feb 15, 2022
0c4ce83
Fix the Capital letter
cacheung Feb 15, 2022
04299c5
New Approach for the doc format
cacheung Feb 15, 2022
978cc16
Updated more with review comments
cacheung Feb 16, 2022
0950837
update messaging link
cacheung Feb 16, 2022
8265232
Merge pull request #144 from cacheung/EdgeResponse
cacheung Feb 18, 2022
29c38d5
Add Arraylist support in WriteableArray
cacheung Feb 18, 2022
5d378ee
Add ArrayList check for more locations.
cacheung Feb 18, 2022
4090b71
Remove unused flow library definition files (#135)
yangyansong-adbe Feb 18, 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
4550ae1
Change checking the instanceof List instead of the ArrayList
cacheung Feb 28, 2022
f7d0b58
Merge pull request #145 from cacheung/EdgeResponse
cacheung Feb 28, 2022
d4181fe
Merge pull request #147 from adobe/edge
cacheung Mar 1, 2022
237a47c
Add List Array check for Writeable Map in Utils files
cacheung Mar 3, 2022
fc07d67
Added Unit tests and Type script description file.
shtomar-adb Mar 5, 2022
023d4b8
convert data to WritableMap when passing it to javascript (#149)
yangyansong-adbe Mar 7, 2022
8c22421
Merge branch 'staging' of github.com:adobe/aepsdk-react-native into List
cacheung Mar 7, 2022
4ba4660
Remove unused writeableMap for EdgeIdentity
cacheung Mar 8, 2022
2476bc5
Merge pull request #148 from cacheung/List
cacheung Mar 8, 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
b4dcaf0
Edge Beta.2 release (#150)
cacheung Mar 11, 2022
4d9841e
Merge branch 'main' into staging
yangyansong-adbe Mar 11, 2022
7454ee2
Update README.md
yangyansong-adbe Mar 11, 2022
e054bfc
Update README.md
yangyansong-adbe Mar 11, 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
f4a283d
feat: convert all packages to typescript (#146)
dsoffiantini Mar 21, 2022
26fe574
[userprofile] clean up userprofile package & update public docs with …
yangyansong-adbe Mar 22, 2022
f025a74
Clean up for Edge extension
cacheung Mar 24, 2022
6d887c3
Merge pull request #156 from cacheung/typescript
cacheung Mar 28, 2022
066abd8
[core] clean up core package & update public docs with typescript syn…
yangyansong-adbe Mar 29, 2022
56b89af
Clean up for EdgeIdentity and update readme.
cacheung Mar 30, 2022
815950c
Merge pull request #159 from cacheung/edgeId
cacheung Mar 30, 2022
c2baa57
[assurance] clean up assurance package & update public docs with type…
yangyansong-adbe Mar 30, 2022
a8c6b35
Merge branch 'staging' of github.com:adobe/aepsdk-react-native into e…
cacheung Mar 30, 2022
dc0c65c
remove babelrc file
cacheung Mar 30, 2022
08a2991
Merge pull request #161 from cacheung/edgeId
cacheung Mar 30, 2022
2c50ef2
Merge pull request #160 from adobe/edgeIdentity
cacheung Mar 30, 2022
1b85ea8
Clean up Consent package
cacheung Mar 30, 2022
b3737c6
Merge branch 'staging' of github.com:adobe/aepsdk-react-native into c…
cacheung Mar 30, 2022
fff667c
Merge pull request #162 from cacheung/consent
cacheung Mar 31, 2022
bb4ad46
Merge pull request #163 from adobe/consent
cacheung Mar 31, 2022
832033b
Merge commit '93137af2e77c94d8f6241f4d34514ab381b88f88' into staging
yangyansong-adbe Mar 31, 2022
7de30a9
add back android manifest for debug
cacheung Apr 1, 2022
80111f1
Merge pull request #165 from cacheung/staging
cacheung Apr 4, 2022
de1cacc
Update API docs with typescript syntax (migration doc/ readme) (#166)
yangyansong-adbe Apr 4, 2022
6c61108
[core] Add a new API: clearUpdatedConfiguration (#167)
yangyansong-adbe Apr 4, 2022
bb4a63f
On Android Null check for visitorId in getIdentifier
cacheung Apr 5, 2022
469a5d0
Update Identity Readme and migration
cacheung Apr 5, 2022
a159801
Revert "Update Identity Readme and migration"
cacheung Apr 5, 2022
2e7bb5f
Revert "On Android Null check for visitorId in getIdentifier"
cacheung Apr 5, 2022
72605f3
Update Identity Readme, migration doc and a bug fix
cacheung Apr 5, 2022
123ef43
Update migration and readme for identity
cacheung Apr 5, 2022
2e2e531
Merge branch 'staging' of github.com:adobe/aepsdk-react-native into r…
cacheung Apr 5, 2022
21f1fa0
Merge pull request #141 from cacheung/readme
cacheung Apr 5, 2022
07e45b0
Merge pull request #168 from cacheung/identityDocAndFix
cacheung Apr 6, 2022
75869fd
remove beta from package versions (#169)
yangyansong-adbe Apr 7, 2022
ccd7682
Merge commit 'a7d0febed8bcb7c58025bff4daa6a974953f3de4' into staging
yangyansong-adbe Apr 7, 2022
a0236ec
Update doc link for messaging in the readme (#173)
cacheung Apr 11, 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
5ad8b55
Merge pull request #139 from adobe/messaging
sbenedicadb Apr 22, 2022
739fdcf
Add getUrlVariables API
cacheung Jun 12, 2022
659098f
Include lock files
cacheung Jun 13, 2022
88aae78
remove AEPMobileOptimize
cacheung Jun 13, 2022
30b13ef
update edgeIdentity version number for Sample App in package.json
cacheung Jun 13, 2022
1404f10
Update with review comments
cacheung Jun 16, 2022
e2781ed
Add rejected logic in getUrlVariable ts
cacheung Jun 16, 2022
3c3b408
Update package-lock and yarn.lock files
cacheung Jun 17, 2022
addfe60
Update lock files
cacheung Jun 17, 2022
41ff385
revert a text format
cacheung Jun 20, 2022
3daaef0
Merge pull request #182 from cacheung/edgeIdentity
cacheung Jun 22, 2022
1e453f1
Merge pull request #184 from adobe/edgeIdentity
cacheung Jun 24, 2022
9e545a4
Merge branch 'main' into staging
cacheung Jun 28, 2022
ec543cf
remote extra file
cacheung Jun 28, 2022
45b581e
Merge pull request #186 from cacheung/edgeStaging
cacheung Jun 28, 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
command: sudo gem install cocoapods

- run:
name: intall pods
name: install pods
command: yarn sampleapp:ios:pod:install

- run:
Expand Down
17 changes: 11 additions & 6 deletions apps/AEPSampleApp/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,27 @@

<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" />

<category android:name="android.intent.category.DEFAULT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,25 @@
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.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 +67,26 @@ 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();
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();
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')
}
}
}
3 changes: 2 additions & 1 deletion apps/AEPSampleApp/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset']
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin']
};
11 changes: 11 additions & 0 deletions apps/AEPSampleApp/extensions/EdgeIdentityView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const EdgeIdentityView = ({navigation}: NavigationProps) => {
const [version, setVersion] = useState('');
const [identities, setIdentities] = useState('');
const [ecid, setECID] = useState('');
const [urlvariables, setUrlVariables] = useState('');
Identity.extensionVersion().then(version => setVersion(version));

function getIdentities() {
Expand Down Expand Up @@ -75,6 +76,14 @@ const EdgeIdentityView = ({navigation}: NavigationProps) => {
});
}

function getUrlVariables() {
Identity.getUrlVariables()
.then(urlVariables => {
setUrlVariables(urlVariables);
console.log('AdobeExperienceSDK: urlVariables = ' + urlVariables);
})
}

return (
<View style={styles.container}>
<ScrollView contentContainerStyle={{marginTop: 75}}>
Expand All @@ -84,9 +93,11 @@ const EdgeIdentityView = ({navigation}: NavigationProps) => {
<Button title="updateIdentities()" onPress={updateIdentities} />
<Button title="removeIdentity()" onPress={removeIdentity} />
<Button title="getIdentities()" onPress={getIdentities} />
<Button title="getUrlVariables()" onPress={getUrlVariables} />
<View style={styles.breakLine} />
<Text>{identities}</Text>
<Text>{ecid}</Text>
<Text>{urlvariables}</Text>
</ScrollView>
</View>
);
Expand Down
Loading