@@ -14,64 +14,65 @@ governing permissions and limitations under the License.
1414*/
1515
1616import React from 'react' ;
17- import { Button , Text , View , ScrollView , NativeModules } from 'react-native' ;
18- import { AEPCore , AEPLifecycle , AEPSignal , AEPMobileLogLevel , AEPMobilePrivacyStatus , AEPMobileVisitorAuthenticationState , AEPVisitorID , AEPExtensionEvent } from '@adobe/react-native-aepcore' ;
17+ import { Button , Text , View , ScrollView , NativeModules } from 'react-native' ;
18+ import { AEPCore , AEPLifecycle , AEPSignal , AEPMobileLogLevel , AEPMobilePrivacyStatus , AEPMobileVisitorAuthenticationState , AEPVisitorID , AEPExtensionEvent } from '@adobe/react-native-aepcore' ;
1919import styles from '../styles/styles' ;
2020
2121export default Core = ( { navigation } ) => {
2222
2323 return (
2424 < View style = { styles . container } >
25- < ScrollView contentContainerStyle = { { marginTop : 75 } } >
25+ < ScrollView contentContainerStyle = { { marginTop : 75 } } >
2626 < Button onPress = { ( ) => navigation . goBack ( ) } title = "Go to main page" />
2727 < Text style = { styles . welcome } > Core</ Text >
28- < Button title = "extensionVersion()" onPress = { coreExtensionVersion } />
29- < Button title = "updateConfiguration" onPress = { updateConfiguration } />
30- < Button title = "setPrivacyStatus(OptIn)" onPress = { setPrivacyOptIn } />
31- < Button title = "getPrivacyStatus()" onPress = { getPrivacyStatus } />
32- < Button title = "log(...)" onPress = { log } />
33- < Button title = "setLogLevel(AEPMobileLogLevel.VERBOSE)" onPress = { setLogLevel } />
34- < Button title = "getLogLevel()" onPress = { getLogLevel } />
35- < Button title = "setPushIdentifier()" onPress = { setPushIdentifier } />
36- < Button title = "setAdvertisingIdentifier()" onPress = { setAdvertisingIdentifier } />
37- < Button title = "getSdkIdentities()" onPress = { getSdkIdentities } />
38- < Button title = "collectPii()" onPress = { collectPii } />
39- < Button title = "trackAction()" onPress = { trackAction } />
40- < Button title = "trackState()" onPress = { trackState } />
41- < Button title = "dispatchEvent()" onPress = { dispatchEvent } />
42- < Button title = "dispatchEventWithResponseCallback()" onPress = { dispatchEventWithResponseCallback } />
28+ < Button title = "extensionVersion()" onPress = { coreExtensionVersion } />
29+ < Button title = "updateConfiguration" onPress = { updateConfiguration } />
30+ < Button title = "setPrivacyStatus(OptIn)" onPress = { setPrivacyOptIn } />
31+ < Button title = "getPrivacyStatus()" onPress = { getPrivacyStatus } />
32+ < Button title = "log(...)" onPress = { log } />
33+ < Button title = "setLogLevel(AEPMobileLogLevel.VERBOSE)" onPress = { setLogLevel } />
34+ < Button title = "getLogLevel()" onPress = { getLogLevel } />
35+ < Button title = "setPushIdentifier()" onPress = { setPushIdentifier } />
36+ < Button title = "setAdvertisingIdentifier()" onPress = { setAdvertisingIdentifier } />
37+ < Button title = "getSdkIdentities()" onPress = { getSdkIdentities } />
38+ < Button title = "collectPii()" onPress = { collectPii } />
39+ < Button title = "trackAction()" onPress = { trackAction } />
40+ < Button title = "trackState()" onPress = { trackState } />
41+ < Button title = "dispatchEvent()" onPress = { dispatchEvent } />
42+ < Button title = "dispatchEventWithResponseCallback()" onPress = { dispatchEventWithResponseCallback } />
43+ < Button title = "resetIdentities()" onPress = { resetIdentities } />
4344 < Text style = { styles . welcome } > Lifecycle</ Text >
44- < Button title = "AEPLifecycle::extensionVersion()" onPress = { lifecycleExtensionVersion } />
45+ < Button title = "AEPLifecycle::extensionVersion()" onPress = { lifecycleExtensionVersion } />
4546 < Text style = { styles . welcome } > Signal</ Text >
46- < Button title = "AEPSignal::extensionVersion()" onPress = { signalExtensionVersion } />
47- </ ScrollView >
48- </ View >
47+ < Button title = "AEPSignal::extensionVersion()" onPress = { signalExtensionVersion } />
48+ </ ScrollView >
49+ </ View >
4950 )
5051}
5152
52- function trackAction ( ) {
53- AEPCore . trackAction ( "action name" , { "key" : "value" } ) ;
53+ function trackAction ( ) {
54+ AEPCore . trackAction ( "action name" , { "key" : "value" } ) ;
5455}
5556
56- function trackState ( ) {
57- AEPCore . trackState ( "state name" , { "key" : "value" } ) ;
57+ function trackState ( ) {
58+ AEPCore . trackState ( "state name" , { "key" : "value" } ) ;
5859}
5960
60- function setPushIdentifier ( ) {
61+ function setPushIdentifier ( ) {
6162 AEPCore . setPushIdentifier ( "xxx" ) ;
6263}
6364
6465function collectPii ( ) {
65- AEPCore . collectPii ( { "myPii" : "data" } ) ;
66+ AEPCore . collectPii ( { "myPii" : "data" } ) ;
6667}
6768
6869function dispatchEvent ( ) {
69- var event = new AEPExtensionEvent ( "eventName" , "eventType" , "eventSource" , { "testDataKey" : "testDataValue" } ) ;
70+ var event = new AEPExtensionEvent ( "eventName" , "eventType" , "eventSource" , { "testDataKey" : "testDataValue" } ) ;
7071 AEPCore . dispatchEvent ( event ) ;
7172}
7273
7374function dispatchEventWithResponseCallback ( ) {
74- var event = new AEPExtensionEvent ( "eventName" , "eventType" , "eventSource" , { "testDataKey" : "testDataValue" } ) ;
75+ var event = new AEPExtensionEvent ( "eventName" , "eventType" , "eventSource" , { "testDataKey" : "testDataValue" } ) ;
7576 AEPCore . dispatchEventWithResponseCallback ( event ) . then ( responseEvent => console . log ( "AdobeExperienceSDK: responseEvent = " + responseEvent ) ) ;
7677}
7778
@@ -81,8 +82,8 @@ function setAdvertisingIdentifier() {
8182function getSdkIdentities ( ) {
8283 AEPCore . getSdkIdentities ( ) . then ( identities => console . log ( "AdobeExperienceSDK: Identities = " + identities ) ) ;
8384}
84- function updateConfiguration ( ) {
85- AEPCore . updateConfiguration ( { "global.privacy" :"optedout" } ) ;
85+ function updateConfiguration ( ) {
86+ AEPCore . updateConfiguration ( { "global.privacy" : "optedout" } ) ;
8687}
8788
8889function getLogLevel ( ) {
@@ -116,6 +117,11 @@ function setPrivacyOptIn() {
116117function getPrivacyStatus ( ) {
117118 AEPCore . getPrivacyStatus ( ) . then ( status => console . log ( "AdobeExperienceSDK: Privacy Status = " + status ) ) ;
118119}
120+
119121function log ( ) {
120122 AEPCore . log ( AEPMobileLogLevel . ERROR , "React Native Tag" , "React Native Message" ) ;
123+ }
124+
125+ function resetIdentities ( ) {
126+ AEPCore . resetIdentities ( ) ;
121127}
0 commit comments