I'm trying to integrate with the sumup solo machine.
in the documentation (https://github.com/sumup/sumup-android-sdk/tree/master) talks about dependencies:
Add the dependency to a module:
following Erel's post https://www.b4x.com/android/forum/threads/solved-gradle-dependencies-compileonly.104701/post-655975
To add an online dependency you must use:
to download the .aar (https://maven.sumup.com/repository/releases/com/sumup/merchant-sdk/4.3.0/merchant-sdk-4.3.0.aar)
But unfortunately I couldn't make it work, can anyone help me?
in the documentation (https://github.com/sumup/sumup-android-sdk/tree/master) talks about dependencies:
1. Dependency
Add the repository to your gradle dependencies:
Java:
allprojects {
repositories {
maven { url 'https://maven.sumup.com/releases' }
}
}
Add the dependency to a module:
Java:
implementation 'com.sumup:merchant-sdk:4.3.0'
following Erel's post https://www.b4x.com/android/forum/threads/solved-gradle-dependencies-compileonly.104701/post-655975
To add an online dependency you must use:
B4X:
'#AdditionalJar: yourjar, ReferenceOnly
'#AdditionalJar: merchant-sdk-4.3.0.aar, https://maven.sumup.com/releases
#AdditionalJar: com.sumup:merchant-sdk:4.3.0, https://maven.sumup.com/releases
to download the .aar (https://maven.sumup.com/repository/releases/com/sumup/merchant-sdk/4.3.0/merchant-sdk-4.3.0.aar)
But unfortunately I couldn't make it work, can anyone help me?
B4X:
#Region Project Attributes
#ApplicationLabel: maquininhaLite
#VersionCode: 1
#VersionName: 1
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#BridgeLogger: True
#End Region
#AdditionalJar: com.sumup:merchant-sdk:4.3.0, https://maven.sumup.com/releases
'#AdditionalJar: merchant-sdk-4.3.0.aar
Sub Process_Globals
Private xui As XUI
Private ctxt As JavaObject
Private SumUpState As JavaObject
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
ctxt.InitializeContext
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Private Sub Activity_Click
SumUpState.InitializeStatic("com.sumup.merchant.reader.api.SumUpState")
SumUpState = SumUpState.RunMethod("init", Array(ctxt))
End Sub
Code:
Logger connected to: KFL7NV6LNVZ5MR79
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
main_activity_click (java line: 352)
java.lang.ClassNotFoundException: com.sumup.merchant$reader$api$SumUpState
at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:289)
at anywheresoftware.b4j.object.JavaObject.InitializeStatic(JavaObject.java:75)
at b4a.example.main._activity_click(main.java:352)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:205)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:7560)
at android.view.View.performClickInternal(View.java:7533)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:29756)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8232)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)
Attachments
Last edited: