Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Take and show a photo
Started by jjrey95 Apr 23 2019 06:36 AM

2 replies to this topic
photo camera show save send
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

jjrey95

[GLOBAL: userInfoPane.html]
jjrey95
  • Observer

  • 29 posts
  • Corona SDK

Good Morning,

I have a question regarding access to the camera and the photo gallery, I know there are forums and information that exists on this subject. I can currently choose between taking the photo or just accessing the camera, but I can not do that by pressing a button, the option to take a photo or access the gallery appears. In the same way when I bring the image of the gallery and show it on the screen, I save it in baseDir = system.DocumentsDirectory but in the same way I need to save that photograph in a database and I do not know how to do it, I do not know if you can take the address where the photograph is saved and send it to the database. Besides this in the simulator it works very well at the moment of saving and showing the photo on the screen, but when it comes to testing on an Android device, it does not let me insert the photo, select it but never show it, in ios if it works normal.

I would really appreciate if you can help me.



[TOPIC: post.html]
#2

richard11

[GLOBAL: userInfoPane.html]
richard11
  • Contributor

  • 448 posts
  • Corona SDK

A shameless plug I know, but our camera plugin might be what you're looking for: https://marketplace.coronalabs.com/corona-plugins/android-custom-camera-preview

It's Android only, but you mentioned that iOS is already working for you so hopefully this is a feasible option to fix Android?

In a nutshell, out of the box Corona can only call Android's native camera app which doesn't force the user to actually take a photo. Our plugin does, and doesn't offer access to the gallery. The resulting image is saved and its filename returned to Corona so from there you can load it up however you like, using standard Corona functions.

[TOPIC: post.html]
#3

jjrey95

[GLOBAL: userInfoPane.html]
jjrey95
  • Observer

  • 29 posts
  • Corona SDK

thanks for the reply. but I really need that you have to choose what you want to use if the camera or if you want to access the gallery. In the same way the biggest problem is with Android, because I can choose the photo without problem but it is not shown on the screen.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: photo, camera, show, save, send