Hi everyone,
I am coming across this weird issue and I'm not sure how to work around it.
I am displaying markers on a Google map and when the orientation change, the map is reset. To "fix" this issue, I have set the orientation to portrait only like so:
This works fine, however, if I open the camera using the camera intent code found here: Intent Based Camera | B4X Programming Forum
When the camera is opened and then a picture is taken, if the phone is in landscape once the app resumes, the map is re-drawn.
I have no idea how to stop the map from being re-drawn using the camera intent. Does anyone have this problem before?
EDIT:
I have uploaded an example to show what I mean.
1. Add your Google Map API key into the manifest editor
2. Run the app
3. Tap on the map to add a marker
4. Tap on the marker to open the system camera using Camera Intent
5. Take a picture in landscape mode then press OK to go back to the app while still in landscape or just press the back button while in landscape mode
You will see that the map is refreshed and all the markers are gone now even though in our app, we set
I am coming across this weird issue and I'm not sure how to work around it.
I am displaying markers on a Google map and when the orientation change, the map is reset. To "fix" this issue, I have set the orientation to portrait only like so:
#SupportedOrientations: portrait
This works fine, however, if I open the camera using the camera intent code found here: Intent Based Camera | B4X Programming Forum
When the camera is opened and then a picture is taken, if the phone is in landscape once the app resumes, the map is re-drawn.
I have no idea how to stop the map from being re-drawn using the camera intent. Does anyone have this problem before?
EDIT:
I have uploaded an example to show what I mean.
1. Add your Google Map API key into the manifest editor
2. Run the app
3. Tap on the map to add a marker
4. Tap on the marker to open the system camera using Camera Intent
5. Take a picture in landscape mode then press OK to go back to the app while still in landscape or just press the back button while in landscape mode
You will see that the map is refreshed and all the markers are gone now even though in our app, we set
#SupportedOrientations: portrait
Attachments
Last edited: