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 pdf As PDFViewer
Dim i,pc As Int=0
Dim iv
Dim rp As RuntimePermissions
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")
If Not(rp.Check(rp.PERMISSION_WRITE_EXTERNAL_STORAGE))Then
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Else
'gmap.MyLocationEnabled = Result
Log("Permssi accordati")
Log("CopyFile()")
If Not(File.Exists(File.DirRootExternal, "test.pdf")) Then
Log("test.pdf does not exist at DirRootExternal")
File.Copy(File.DirAssets, "test.pdf", File.DirRootExternal, "test.pdf")
Log("test.pdf copied")
End If
pdf.init
Activity.AddView(pdf,0,0,-1,-1)
pdf.getpdf2(File.Combine(File.DirRootExternal,"test.pdf"),"")
End If
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
If Permission = rp.PERMISSION_WRITE_EXTERNAL_STORAGE Then
'gmap.MyLocationEnabled = Result
Log("Permssi accordati")
Log("CopyFile()")
If Not(File.Exists(File.DirRootExternal, "test.pdf")) Then
Log("test.pdf does not exist at DirRootExternal")
File.Copy(File.DirAssets, "test.pdf", File.DirRootExternal, "test.pdf")
Log("test.pdf copied")
End If
pdf.init
Activity.AddView(pdf,0,0,-1,-1)
pdf.getpdf2(File.Combine(File.DirRootExternal,"test.pdf"),"")
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub