Page 1 of 1

MobilpickPhoto is suddenly failing.

Posted: Mon Jun 24, 2019 4:41 am
by djkesler
I have working on an app upgrade for one I have in the App Store. I am adding the ability to add a photo to a database that is accessible from a desktop and mobile devices. Things were going well until the camera quit displaying images. All the buttons are there and work but a black screen otherwise. Pushing the shutter release appears normal but does thing functionally. The Cancel button works to exit the mobilePickPhoto. I made a little stack with just a button to call the mobilePickPhoto function and it works as it should. I think this failure started when I updated to iOS 12.3.1 ver.

Any help would be appreciated.

David Kesler

Re: MobilpickPhoto is suddenly failing.

Posted: Mon Jun 24, 2019 1:18 pm
by simon.schvartzman
Hi David, in order to see if I can be of any help can you share your code?

Best!

Re: MobilpickPhoto is suddenly failing.

Posted: Mon Jun 24, 2019 5:15 pm
by djkesler
Thank you for replying.

Here is the code. It not the actual code, but I tried this little snippet inside my program and it does work in the same way the actual code doesn't work anymore.

command takepicture hl
put empty into thesecs
if hl is empty then
put false into gtakepic
exit takepicture
end if
put the last word in line hl of fld "plantlist" into grecnum
put hl into gHilitedLine
-- put "main" into gCallingCard
-- go to card "photo"
mobilePickPhoto "camera"
end takepicture

the pic below shows what is produced when the mobilePickPhoto is executed. All buttons respond normally, but since the camera is not active, no picture is captured when the shutter release is tapped. It is really strange. It was working well for a couple of weeks and about the time 9.5.0 came out, it started doing this. But a small stack that just executes the mobilePickPhoto function works as it should on my phone.

Image

Re: MobilpickPhoto is suddenly failing.

Posted: Mon Jun 24, 2019 10:30 pm
by simon.schvartzman
David, have you tried with LC 9.0.4 instead of 9.5.0? I mean 9.5.0 is in Development Preview while 9.0.4 is Stable...

Also I'd like to mention that I had several problems with mobilePickPhoto but most of them where in Android, one of the them ( https://quality.livecode.com/show_bug.cgi?id=22055 ) has a workaround that deserves to be tried in your case.

Let us know how it ended up.

Best

Re: MobilpickPhoto is suddenly failing.

Posted: Mon Jun 24, 2019 10:54 pm
by djkesler
Thanks Simon,

I will try that work around. I did try 9.0.4 with the same result. I have not had any issues with 9.5.0 yet that I can attribute to its DP status. But I live well inside the boundaries of LiveCode!

I do hope that the LC team will continue sorting out memory leaks. I don’t know of any technique at the script level to avoid them. If there are techniques, I would love to investigate them.

Thanks again and I’ll let you know the results when I get back to my computer.

Re: MobilpickPhoto is suddenly failing.

Posted: Thu Jun 27, 2019 11:06 pm
by djkesler
Well, after chasing my tail for two more days, I figured it out.

Somehow the Camera permission for this app had been turned off. For the life of me, I cannot remember doing that.

It is a little strange, however. It seems that the permissions live longer than apps.

Even after deleting the app, because I used the same internal app ID, the Camera permission stayed Off even after a completely new download. Weird.

That you Simon for looking at my problem.

Sincerely,
David Kesler