Android Question B4XPages, return a picture from camera

rosippc64a

Active Member
Licensed User
Longtime User
Hi everyone!


This is my second B4XPages project (in generally I maintain my old apps that not B4XPages), and I’ve never had to capture an image with the camera in B4XPages before. So I took a sample project and started modifying it. The sample projects work fine. But in my case, I don’t want to call the camera from the MainPage, but from another page. The camera appears, and I think it actually takes the picture, but when it returns to the calling page, nothing shows up in the ImageView. There’s no error, just no image.
The code that calls the camera is in B4XPageSzamlabekuldes.bas, and the camera code itself is in B4XPageCamera.bas. I’ve made quite a mess of it during my three-day struggle, but no matter what I do, I can’t get the picture to appear.
The login doesn’t matter; the error is in the third menu item (photo), where you also need to click the photo button.
Please take a look at the code!


Thanks,
Steven
 

Attachments

  • Project.zip
    275.7 KB · Views: 15
Solution

teddybear

Well-Known Member
Licensed User
Use B4XImageView instead ImageView in the layout PageSzamlabekuldes_inner.
 
Upvote 0

Lucas Siqueira

Active Member
Licensed User
Longtime User
Use [B4X] MediaChooser - cross-platform video and image chooser

And avoid headaches; remember that in Android you need to add the service to the manifest:
Code:
SetServiceAttribute(KeepRunningService, android:foregroundServiceType, shortService)
 
Upvote 1
Solution

rosippc64a

Active Member
Licensed User
Longtime User
Thank you, the mediachooser solved my problem. I tried previously too, but there was some problem, so I ignored it. But now it works good.
 
Upvote 0

Similar Threads

Replies
21
Views
32K
Replies
4
Views
20K
Replies
62
Views
70K
  • Locked
  • Article
Android Tutorial Intent Based Camera
Replies
48
Views
39K
Cookies are required to use this site. You must accept them to continue using the site. Learn more…