How to get an Activity in a ReactMethod?

Viewed 9

I have an application made in React Native with a native module, in one of the methods of the native module I need to access an Activity to be able to generate a token through an SDK.

The method looks like this:

@ReactMethod
public void createOpenpayCard(String holderName){

 String deviceIdString = openpay.getDeviceCollectorDefaultImpl().setup(activity);

}

To the setup method, I must send an activity and it must be different from getCurrentActivity()

I have created an empty activity, but I don't know how to call it in this method. How can I call this activity that I created? I don't want to show it at any time

0 Answers
Related