iPhone library v1.40 includes a new object type named DocumentInteraction.
With this controller you can allow the user to open a local file with an external app (this is the other side of this tutorial: https://www.b4x.com/android/forum/threads/open-external-files-with-your-app.50525/#content).
Using DocumentInteraction is pretty simple. You initialize it with the file that you want to open and then call DocumentInteraction.OpenFile.
You can optionally set the file type with the UTI property. The system types are listed here: https://developer.apple.com/library...fiers.html#//apple_ref/doc/uid/TP40009259-SW1
With this controller you can allow the user to open a local file with an external app (this is the other side of this tutorial: https://www.b4x.com/android/forum/threads/open-external-files-with-your-app.50525/#content).
Using DocumentInteraction is pretty simple. You initialize it with the file that you want to open and then call DocumentInteraction.OpenFile.
You can optionally set the file type with the UTI property. The system types are listed here: https://developer.apple.com/library...fiers.html#//apple_ref/doc/uid/TP40009259-SW1
B4X:
Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private di As DocumentInteraction
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.RootPanel.Color = Colors.Green
NavControl.ShowPage(Page1)
di.Initialize("di", File.DirAssets, "Workbook.xls") '<--- open a file from the assets folder
End Sub
Sub Page1_Click
di.OpenFile(Page1.RootPanel)
End Sub
Sub di_Closed
Log("Dialog closed")
End Sub
Sub di_SendingFile
Log("Opening file")
End Sub