B4A Library Selfie - Make Screenshot of your own app

This is a wrap for this Github Project.

Selfie
Author:
DonManfred (wrapper)
Version: 1
  • Selfie
    Methods:
    • Initialize (EventName As String, selfie As Selfie)
    • IsInitialized As Boolean
    • Snap
  • SelfieBuilder
    Methods:
    • Initialize (EventName As String)
    • IsInitialized As Boolean
    • build As Selfie
      Build a Selfie with all the parameters
    • fileFormat (fileFormat As String) As SelfieBuilderWrapper

      fileFormat: The date fileFormat which the file will be created with
      Return type: @return:Builder
    • path (path As String) As SelfieBuilderWrapper
      Path to which we will save the screenshots
      path: The path where to save the file
      Return type: @return:Builder
    • quality (quality As Int) As SelfieBuilderWrapper
      Quality which we should generate the image 1-100
      quality: The quality (between 1-100) to save the file
      Return type: @return:Builder

Example-Code
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim sb As SelfieBuilder
    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("Layout1")
    sb.Initialize("")
    sb.fileFormat("png").path(File.DirRootExternal)
End Sub
Sub Button1_Click
    Dim selfie As Selfie = sb.build
    selfie.Snap
End Sub
 

Attachments

  • SelfieEx.zip
    7.6 KB · Views: 666
  • SelfieV1.0.zip
    5.8 KB · Views: 658

Peter Simpson

Expert
Licensed User
Longtime User

Daniel-White

Active Member
Licensed User
Longtime User
Heeyyy, very useful lib Don, I tested in Kitkat and android 6. Thanks you to share it.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Hey, greate lib. i canot find the parameter to set the name of the image, this is a problem, because i want to delete this image after upload and i cant adress the pic.
 
Top