A shortcut wrap for this Github project. You will need B4A V6.00 to run this project (I presume). Posting the following:
1. The Java code - do with it as you like. You will need to create a folder called libs on the same folder level as the src folder and copy android-support-v4.jar and android-support-v7-appcompat.jar into this libs folder in order to compile the Java code.
2. A link to my complete B4A project (too big to post here) - https://www.dropbox.com/s/axmou469kmvwcok/b4aSquareCamera.zip?dl=0
3. The B4A library files and the AppCompat library files - copy them all (including the .aar) to your additional library folder.
From the Github posting:
Android module that takes a square photo using the native Android Camera APIs.
Sample code:
1. The Java code - do with it as you like. You will need to create a folder called libs on the same folder level as the src folder and copy android-support-v4.jar and android-support-v7-appcompat.jar into this libs folder in order to compile the Java code.
2. A link to my complete B4A project (too big to post here) - https://www.dropbox.com/s/axmou469kmvwcok/b4aSquareCamera.zip?dl=0
3. The B4A library files and the AppCompat library files - copy them all (including the .aar) to your additional library folder.
From the Github posting:
Android module that takes a square photo using the native Android Camera APIs.
- Tap to focus
- Two fingers zooming
- Front & Back camera
- Flash mode (Saved when the user exits)
- Supports both portrait & landscape
- Runtime permission is supported for saving/viewing photos
Sample code:
B4X:
#Region Project Attributes
#ApplicationLabel: SquareCamera
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\resource
#AdditionalRes: ..\SquareCameraLibRes
#AdditionalRes: ..\SquareCameraDemoRes
#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.
Private Button1 As Button
Private Label1 As Label
Dim squarecamera As SquareCamera
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")
squarecamera.Initialize("squarecamera")
Label1.Visible = True
Label1.Text = "Wrapped by Johan Schoeman"
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
squarecamera.GotoSquareCamera
End Sub