Android Question ContentChooser crash

ivanomonti

Expert
Licensed User
Longtime User
Use this function but on neo samsung and other ngm as I closes unexpectedly or not display picture

B4X:
Dim Chooser As ContentChooser
Chooser.Show("image/*", "Select an image")

B4X:
Sub chooser_Result (Success As Boolean, Dir As String, FileName As String)
    If Success Then
        Dim FileName2 As String = "image.jpg"
        Dim Dir2 As String = File.Combine(File.DirRootExternal,"DCIM/COSTOLA")
        File.Copy(Dir,FileName,Dir2,FileName2)
        If File.Exists(Dir2,FileName2) Then
            CenterBitmap(imv,LoadBitmap(Dir2,FileName2))
        End If
    Else
        ToastMessageShow("No image selected", True)
    End If
End Sub
 
Top