Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

media.capturePhoto, some android devices will leave public artifacts.
Started by amdolan Dec 11 2018 08:31 AM

1 reply to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

amdolan

[GLOBAL: userInfoPane.html]
amdolan
  • Observer

  • 2 posts
  • Corona SDK

I've noticed when using `media.capturePhoto`, that some artifacts may be left in the Android Gallery app.  Further investigation shows that this is the .thumbnails folder, and I'm guessing this is a device specific issue.  In my testing, this is happening on at least one LG device, but who knows which others.  I haven't tested on ios, but I doubt there is the same issue.

 

e.g.

media.capturePhoto( { listener = callback, destination = { filename = fileName, baseDir = system.TemporaryDirectory } });

For my application, this is really bad.  Short of developing native plugins that work around this issue, is there anything I can do about this?

 

I was under the assumption that sandboxed files would be somewhat isolated.  Is this a bad assumption?

 

Thanks for any advice!

 

Edit:
I wonder if it's caused by me immediately displaying with display.newImageRect.  This might give me an avenue to hack around this issue.. I'll follow up.

 

Nope, has nothing to do with display.newImageRect.  The thumbnail is added to DCIM automatically by the camera app, or something.


Edited by amdolan, 17 December 2018 - 10:28 AM.


[TOPIC: post.html]
#2

amdolan

[GLOBAL: userInfoPane.html]
amdolan
  • Observer

  • 2 posts
  • Corona SDK

I will try lfs* and os.remove(), but this seems like a bad solution.




[topic_controls]
[/topic_controls]