The request was raised here. Attached a shortcut wrap for this. Posting the following:
1. B4A library files - extract them from the zipped file and copy them to your additional libs folder
2. DemoRes.zip - extract the folder and then copy the folder with its contents to be on the same folder level as that of the B4A project's /Files and /Object folders
3. Sample B4A project
You will need an initial internet connection. When you start the B4A app it will prompt you to download QR Droid. Once downloaded you need to install the downloaded APK - check for the APK in your device's /Files/Download folder.
Once the APK has been installed you can disable your internet connection. Start the B4A app and click on the button "Start Scanner". The scanner should start up.
I have only done a shortcut wrap for the scanner. Not for anything else that QR Droid provides for.
Take note of the B4A manifest file!
I have not yet added any code to bring scanned results back to B4A (via event(s)) but can do so should anyone wish to make use of this.
Sample Code:
1. B4A library files - extract them from the zipped file and copy them to your additional libs folder
2. DemoRes.zip - extract the folder and then copy the folder with its contents to be on the same folder level as that of the B4A project's /Files and /Object folders
3. Sample B4A project
You will need an initial internet connection. When you start the B4A app it will prompt you to download QR Droid. Once downloaded you need to install the downloaded APK - check for the APK in your device's /Files/Download folder.
Once the APK has been installed you can disable your internet connection. Start the B4A app and click on the button "Start Scanner". The scanner should start up.
I have only done a shortcut wrap for the scanner. Not for anything else that QR Droid provides for.
Take note of the B4A manifest file!
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddApplicationText(<activity android:name="la.droid.qr.services.Services"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation">
</activity>
<activity android:name="la.droid.qr.services.Scan"
android:label="@string/scan"
android:configChanges="keyboardHidden|orientation">
</activity>
<activity android:name="la.droid.qr.services.Encode"
android:label="@string/encode"
android:configChanges="keyboardHidden|orientation">
</activity>
<activity android:name="la.droid.qr.services.Decode"
android:label="@string/decode"
android:configChanges="keyboardHidden|orientation">
</activity>)
I have not yet added any code to bring scanned results back to B4A (via event(s)) but can do so should anyone wish to make use of this.
Sample Code:
B4X:
#Region Project Attributes
#ApplicationLabel: b4aQrDroidService
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\DemoRes
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim qrds As QrDroidService
Private Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
qrds.Initialize("")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
qrds.startQrDroidService
End Sub
Attachments
Last edited: