A shortcut wrap for this project that I found on the web. Download FaceSpotterOtherLibFiles.zip from the link below and then copy the extracted jars to your additional library folder.
https://drive.google.com/open?id=1gbO9xKOv1Y8zaDcs8ogbGxf2g4pWhk--
Attached the following:
1. zipped B4A project
2. resource.zip - extract it and the copy folder "resource" including its contents to be on the same efolder level as that of the /Files and /Objects folder of the B4A project
3. DemoRes.zip - extract it and the copy folder "DemoRes" including its contents to be on the same efolder level as that of the /Files and /Objects folder of the B4A project
4. b4aFaceSpotterLibFiles.zip - extract the jar and the xml and copy them to your additional library folder.
Take note of the B4A manifest file:
Sample Code:
B4A Manifest File contents:
You should see something like this (obviously with your own face....):
It was done with B4A V7.80 on an Android 7.0 device.
https://drive.google.com/open?id=1gbO9xKOv1Y8zaDcs8ogbGxf2g4pWhk--
Attached the following:
1. zipped B4A project
2. resource.zip - extract it and the copy folder "resource" including its contents to be on the same efolder level as that of the /Files and /Objects folder of the B4A project
3. DemoRes.zip - extract it and the copy folder "DemoRes" including its contents to be on the same efolder level as that of the /Files and /Objects folder of the B4A project
4. b4aFaceSpotterLibFiles.zip - extract the jar and the xml and copy them to your additional library folder.
Take note of the B4A manifest file:
Sample Code:
B4X:
#Region Project Attributes
#ApplicationLabel: b4aFaceSpotter
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\DemoRes
#AdditionalRes: ..\resource
#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 fc As FaceSpotter
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")
fc.Initialize("")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
fc.BeginScan
End Sub
B4A Manifest File contents:
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="22"/>
<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.
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
AddApplicationText(<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode" />
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="ocr" />
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="face" />
<activity android:name="com.raywenderlich.facespotter.FaceActivity"
android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden">
</activity>)
AddPermission(android.permission.CAMERA) ' Required to be able to access the camera device.
AddPermission(android.permission.GET_TASKS)
AddPermission("android.hardware.camera")
AddPermission("android.permission.FLASHLIGHT")
You should see something like this (obviously with your own face....):
It was done with B4A V7.80 on an Android 7.0 device.