da errore.
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
Bisognerebbe aggiungere all'intent
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
` /**
* @param apiFrontOfficeQPRequest parametri QP per tutti i nuovi merchant
* @param navigationEnabled abilita la navigazione in webview
* @param frontOfficeQPCallback callback in uscita a pagamento terminato/annullato/in errore
*/
public void paga(ApiFrontOfficeQPRequest apiFrontOfficeQPRequest, boolean navigationEnabled, FrontOfficeCallbackQP frontOfficeQPCallback) {
this.frontOfficeQPCallback = frontOfficeQPCallback;
Intent intent = new Intent(context, ActivityFrontOfficeQP.class);
intent.putExtra(FrontOfficeParametersQP.ALIAS, apiFrontOfficeQPRequest.getAlias());
intent.putExtra(FrontOfficeParametersQP.COD_TRANS, apiFrontOfficeQPRequest.getCodTrans());
intent.putExtra(FrontOfficeParametersQP.DIVISA, apiFrontOfficeQPRequest.getCurrency());
intent.putExtra(FrontOfficeParametersQP.IMPORTO, apiFrontOfficeQPRequest.getAmount());
intent.putExtra(FrontOfficeParametersQP.MAC, apiFrontOfficeQPRequest.getMac());
intent.putExtra(FrontOfficeParametersQP.ENVIRONMENT, selectedEnvironment);
intent.putExtra(FrontOfficeParametersQP.EXTRA_KEYS, apiFrontOfficeQPRequest.getExtraKeys());
intent.putExtra(BaseWebViewActivity.NAVIGATION_ENABLED, navigationEnabled);
frontOffice = this;
intent.putExtra(EnvironmentUtils.ACTIVITY_CALLER, this);
//riga da aggiungere
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}`