iOS Question SelectFromPhotoLibrary failing on iPad

Alessandro71

Well-Known Member
Licensed User
Longtime User
the following code works on iPhone but not on iPad, triggering the catch statement

B4X:
    Dim p As B4XPageInfo = B4XUtils.GetPageInfoFromView(mBase)
    Private Camera As Camera
    Camera.Initialize("Camera", B4XPages.GetNativeParent(p.B4XPage))
    Try
        Camera.SelectFromPhotoLibrary(Me, Camera.TYPE_IMAGE)
        Wait For Camera_Complete (Success As Boolean, Image As Bitmap, VideoPath As String)
        WriteLog("camera event received")
        If Success Then
            ProcessImage(Image)
        Else
            WriteLog("no picture returned from selection")
        End If
    Catch
        ToastMessage.Show("Camera is not available.", ToastMessage.TOAST_ERR)
    End Try
 
Top