Hi there !
I am trying to wrap a library and I am having a big issue in passing the Activity for the java method:
I get this:
java.lang.RuntimeException: Method: Ativar not matched.
Tried other ways using BA.activity
What is the correct way to use the activity inside the Java Inline code. ?
I am trying to wrap a library and I am having a big issue in passing the Activity for the java method:
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
nexu.InitializeContext
End If
nexupayment = nexu.InitializeNewInstance("yashar.ynexu.main.nexutransaction", Null)
nexupayment.RunMethod("Ativar", Array(GetContext, Activity))
End Sub
#if java
import android.content.Context;
import android.app.Activity;
import java.util.HashMap;
import java.util.List;
import ca.nexu.nexupayment.NexuPayment;
import ca.nexu.nexupayment.NexuPaymentPrinterListener;
import ca.nexu.nexupayment.NexuPaymentTransactionListener;
public static class nexutransaction implements NexuPaymentTransactionListener, NexuPaymentPrinterListener {
public nexutransaction() {
// Required empty public constructor
}
public NexuPayment nexuPayment;
public void Ativar(Context c, Activity a) {
BA.Log("Transaction.Ativar");
NexuPayment.loadSDK(null);
nexuPayment = new NexuPayment(this, c, a, null, null);
I get this:
java.lang.RuntimeException: Method: Ativar not matched.
Tried other ways using BA.activity
What is the correct way to use the activity inside the Java Inline code. ?