File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
android/src/main/java/com/sourcepoint/reactnativecmp Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ class RNSourcepointCmpModule internal constructor(context: ReactApplicationConte
119119 override fun onAction (view : View , consentAction : ConsentAction ): ConsentAction {
120120 sendEvent(SDKEvent .onAction, createMap().apply {
121121 putString(" actionType" , RNSourcepointActionType .from(consentAction.actionType).name)
122+ putString(" customActionId" , consentAction.customActionId ? : " " )
122123 })
123124 return consentAction
124125 }
Original file line number Diff line number Diff line change @@ -69,7 +69,10 @@ extension RNSourcepointCmp: SPDelegate {
6969 func onAction( _ action: SPAction , from controller: UIViewController ) {
7070 RNSourcepointCmp . shared? . sendEvent (
7171 withName: " onAction " ,
72- body: [ " actionType " : RNSourcepointActionType ( from: action. type) . rawValue]
72+ body: [
73+ " actionType " : RNSourcepointActionType ( from: action. type) . rawValue,
74+ " customActionId " : action. customActionId ?? " " ,
75+ ]
7376 )
7477 }
7578
Original file line number Diff line number Diff line change @@ -67,7 +67,12 @@ export class SPConsentManager implements Spec {
6767 RNSourcepointCmp . loadUSNatPrivacyManager ( pmId ) ;
6868 }
6969
70- onAction ( callback : ( body : { actionType : SPActionType } ) => void ) : void {
70+ onAction (
71+ callback : ( body : {
72+ actionType : SPActionType ;
73+ customActionId : string ;
74+ } ) => void
75+ ) : void {
7176 this . emitter . removeAllListeners ( 'onAction' ) ;
7277 this . emitter . addListener ( 'onAction' , callback ) ;
7378 }
You can’t perform that action at this time.
0 commit comments