Android Question PayGate by DonManfred Event Question

Pokmot

Member
Licensed User
Longtime User
Relating to topic https://www.b4x.com/android/forum/conversations/swiping-library.21173/

Here is my code so far

B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("Main")
   Dim pg As SwipeController
   pg.Initialize("swipe", 30, True, True, "UNIMAG")
   Label1.Text = "Initialized"
   Label2.Text = ""
End Sub

Sub swipe_onDeviceConnected(Device As String)
   Label1.Text = Device
   Label2.Text = "OnDeviceConnected"
End Sub

Sub swipe_onSwipedCard(card As String, device As String)
   Label1.Text = card
   Label2.Text = "OnSwipedCard"
End Sub

I cannot see that the events are triggered. Am I using "swipe" correctly in pg.Initialize?
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
We first need to setup the App correctly as per Requirements in the Documentation.

Did you added the uses-permission lines from the docu?

Additionally i found out that there are additional resources needed.

Let´s start with his zip. Download it, copy the res folder to your projectfolder (where the B4A file is)

Add this line to your main activity code:
B4X:
#AdditionalRes: ..\res

start with using either the four permission lines or use the Block...

Use one of them in your manifest editor.

B4X:
AddPermission(android.permission.RECORD_AUDIO) ' Allows an application to record audio.
AddPermission(android.permission.MOUNT_UNMOUNT_FILESYSTEMS) ' Allows mounting and unmounting file systems for removable storage.
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE) ' Allows an application to write to external storage.
AddPermission(android.permission.INTERNET) ' Allows applications to open network sockets.

AddManifestText(
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
)
 

Attachments

  • res.zip
    4.2 KB · Views: 302
Upvote 0
Top