Android Question B4XPages, return a picture from camera

Status
Not open for further replies.

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

Solution
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...
Use B4XImageView instead ImageView in the layout PageSzamlabekuldes_inner.
 
Upvote 0
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
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: Copy
SetServiceAttribute(KeepRunningService, android:foregroundServiceType, shortService)
 
Upvote 1
Solution
Status
Not open for further replies.

Similar Threads

Replies
8
Views
17K
Replies
22
Views
42K
  • Locked
  • Article Article
Replies
4
Views
23K
Replies
62
Views
85K
  • Locked
  • Article Article
Android Tutorial Intent Based Camera
Replies
48
Views
50K
Back
Top