B4A Library ExSDCard - SD memory card.

ExtSDCard v1.02 library
- An example to check on our phone
An external memory card (SD memory card) is installed:

'---------------------------------
' 0.Device storage: Samsung S3
'---------------------------------
"/mnt,sdcard"
"/sdcard"
"/storage,emulated/0"
"/storage,sdcard0"
Else
'---------------------------------
' 1.SD memory card: Samsung S3
'---------------------------------
"/mnt,extSdCard"
"/mnt,external_sd"
"/storage,extSdCard"
'---------------------------------

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

    Dim exSDCard As extSDCard
    Dim DefaultFolder, tessDataPath As String

End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Try
    exSDCard.Initialize
    DefaultFolder = exSDCard.DeviceStorage(1)
    tessDataPath = DefaultFolder & "/tessdata"
   
    If Not(File.IsDirectory(DefaultFolder, "tessdata")) Then File.MakeDir(DefaultFolder, "tessdata")
    Catch
        Msgbox(LastException.Message, Maps.L(0,"A T T E N T I O N"))
        ExitApplication
    End Try
End Sub
 

Attachments

  • ExSDCard Lib v1.02.zip
    18.3 KB · Views: 362
Top