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: Copy
    #If B4i
    cam.Initialize("cam", MP.CurrentPage) ' Cam = camera; MP = B4XMainPage
    cam.SelectFromSavedPhotos(Sender, cam.TYPE_ALL)
    #End If

Thanks in advance!
 
 
Upvote 0

Similar Threads

Replies
8
Views
17K
Replies
2
Views
13K
Replies
22
Views
42K
  • Locked
  • Article Article
Replies
4
Views
23K
Back
Top