iOS Question Help using camera with B4XPages

alexsilva_vs

New Member
Licensed User
Hello! I'm trying to get an image from the photo gallery, but when trying the example code provided by Erel, it fails because I'm using B4XPages and at startup the camera expects an object of type 'Page'.
I didn't find anything like that on the forum and I also tried a few things but nothing worked.

The error log: Expected: UIViewController, object type: b4i_cxpgprofile

My code:
B4X:
    #If B4i
    cam.Initialize("cam", MP.CurrentPage) ' Cam = camera; MP = B4XMainPage
    cam.SelectFromSavedPhotos(Sender, cam.TYPE_ALL)
    #End If

Thanks in advance!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0
Top