Page 1 of 1

mobilePickPhoto no select button on the preview picture

Posted: Wed Oct 24, 2018 5:45 am
by Saman Sjr.
Hi,

testing mobilePickPhoto "camera" on galaxy note 9 (android 8.1.0),
the build in camera work as expected but after taking a picture there's no select/confirmation button to save the new picture,
so i have to press the back key to get back to my app. In this case LC get the result as cancel, not the new picture from camera.

any hint of this ?

regards,
Sam

Re: mobilePickPhoto no select button on the preview picture

Posted: Wed Oct 24, 2018 12:26 pm
by Klaus
Namaste Saman,
Saman Sjr. wrote:
Wed Oct 24, 2018 5:45 am
... but after taking a picture there's no select/confirmation button to save the new picture...
Shame on the developer! Oh, wait, the developer is you, right? So shame on YOU! 8)
Taking a look into the dictionary will help most of the time and would in this case, HINT, HINT!

"mobilepickphoto..." will import a photo into your stack as a new image object, which is quite big and will cover your complete stack in general. So you either need to export/save to disk this image immediatly or make it smaller to keep it on your card for furhter actions.
1. Immediate export:

Code: Select all

...
mobilepickphoto...
if the result = "cancel" then
  exit to top
end if
## Export immediately
## New image has highest layer so it is the LAST IMAGE on the card
export last img to file (specialfolderpath("documents") & "/an_image.jpg") as JPEG
## Get rid of the image
delete last img
...
2. Resize to not cover the complete card:

Code: Select all

...
## maxwidth and maxheight parameter to mobilepickphoto will only work on iOS
## But this works everywhere, and it IS in fact listed in the dictionary entry for MOBILEPICKPHOTO!
set the width of the templateimage to 100
set the height of the templateimage to 100
mobilepickphoto...
reset the templateimage
if the result = "cancel" then
  exit to top
end if
...
Please consult the dictionary if and also if not in doubt!


Best

Klaus

Re: mobilePickPhoto no select button on the preview picture

Posted: Wed Oct 24, 2018 3:25 pm
by Saman Sjr.
Hi Klaus :twisted:

the problem is before the import process, it's in the camera it self.
after press the shooter on the camera app and there is no "ok" menu to confirm the photo so it can import it to LC stack.
All my stack with mobilepickphoto run well on other phone from android 4 - 6, but not on galaxy note 9 (android 8.1.0).
I attach 2 pictures to show the different, the one that i put blue circle on the bottom left is the "ok" menu after the shooter button is pressed on the camera app that launch by mobilepickphoto "camera". The other picture (2.jpg) is the one from galaxy note 9 (android 8.1.0), as you can see there no "ok" menu after the photo is taken.

Yes, the dictionary is the first place i go when to find hints, but this time no luck :roll:

regards,
Sam
1.jpg
2.jpg

Re: mobilePickPhoto no select button on the preview picture

Posted: Wed Oct 24, 2018 3:32 pm
by Klaus
Oh, sorry for my false assumption!

I do not own a cellphone or tablet, so I cannot test/confirm this, maybe someone with Android experience will chime in...
Sounds like a bug however!

Re: mobilePickPhoto no select button on the preview picture

Posted: Thu Oct 25, 2018 6:01 pm
by jacque
This is one reason I stopped getting Samsung phones, they change too much of the Android OS. But since they are so popular, it's probably a good idea to report this as a bug. You can't fix it in script.

Re: mobilePickPhoto no select button on the preview picture

Posted: Fri Oct 26, 2018 3:40 pm
by Saman Sjr.
Yup, many of my clients use samsung for their phone.
I'll try with cameraControl

thanks guys

Re: mobilePickPhoto no select button on the preview picture

Posted: Thu Jun 27, 2019 8:57 pm
by simon.schvartzman
Hi Saman, were you able to fix this? How?

I'm facing exactly the same problem with an App generated with LC 9.0.4 on a Samsung 6j running Android 9.0.

Help needed!

Thanks

Re: mobilePickPhoto no select button on the preview picture

Posted: Fri Jun 28, 2019 6:07 am
by strongbow
This (or similar) has been reported in the QCC as Bug 22054 :

https://quality.livecode.com/show_bug.cgi?id=22054

Hoping this is resolved sometime soon!

Re: mobilePickPhoto no select button on the preview picture

Posted: Sat Jun 29, 2019 3:37 am
by Saman Sjr.
Hi Simon,

currently I've solved the problem bydown grade my app to LC 8.x
It's seem like the problem is caused by the SDK API 26 of LC 9.x
As far as i know, LC 9.0 still using SDK API 15 same as LC 8.0, so i think temporary we can solved this by using LC 8.x or 9.0 until they fix the bug.

hope this help,
simon.schvartzman wrote:
Thu Jun 27, 2019 8:57 pm
Hi Saman, were you able to fix this? How?

I'm facing exactly the same problem with an App generated with LC 9.0.4 on a Samsung 6j running Android 9.0.

Help needed!

Thanks

Re: mobilePickPhoto no select button on the preview picture

Posted: Sat Jun 29, 2019 10:36 pm
by simon.schvartzman
Thanks Sam.

Downgrading to LC 8.0 or 9.0 may make the App loose some important functionalities for all phones/brands and could be worst than the original problem...

Hi LC are you listening? Can you fix it? The problem was reported for the first time in October last year.

Best!