I'm trying to integrate a native payment library in a react native application.
The library requires an view setup like this to process the pay result.
The library raises next error
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
I don't know if my configuration is wrong, the native library demo application works fine. :( The pay response intent tries load the activity but apparently it can't find it.
Update
The library function that fails is:
String appId = context.getPackageName() + "." + callbackSchema;
Intent intent = new Intent(appId);
intent.putExtra(ConstantUtil.RETURNED_JSON_KEY,json);
context.startActivity(intent); // <- this call raises the error
Update Finally I made it work. I was passing context like that:
getReactApplicationContext()
I solved it passing context like that:
getCurrentActivity()
In debug, I got this values:
but the error still raising :(
Any idea?
