You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by JC Lang <ne...@yahoo.fr> on 2014/01/24 10:08:00 UTC
AIR CameraRoll / MediaPromise path issue?
Hello devs,
I encounter a problem with data returned by CameraRoll on Android.
(Not sure if it's the correct place to ask, but I didn't find anything on the subject...)
It looks like the path of the File returned by CameraRoll when selecting an image using the OS internal "Gallery" doesn't return the "real" path of the file;
but instead, some sort of "local" path which looks like a meta data value used by the "Gallery" to tag elements.
The problem occurs only when files are "moved" or renamed externally, meaning the first "tag" value assignment matches the real file path.
So MediaPromise takes this "gallery path" value as file path, and cannot find the file of course.
Question: am I doing something wrong or have somebody seen this problem already?
Re: AIR CameraRoll / MediaPromise path issue?
Posted by JC Lang <ne...@yahoo.fr>.
Actually, I don't try to open the FIle from the MediaPromise.
I tried both ways:
-open the MediaPromise with an IDataInput (no bitmap, very quick)
-or use a Loader and loadFilePromise() (use bitmap: very slow...)
Each method returns same "File not found"...
Reminder: both methods work fine with file not moved (or renamed) externally after the OS "Gallery" (I'm trying on Android) has "referenced" them internally.
Any advice is welcome :)
>________________________________
> De : Cosma Colanicchia <co...@gmail.com>
>À : Apache Flex Developers ML <de...@flex.apache.org>; JC Lang <ne...@yahoo.fr>
>Envoyé le : Vendredi 24 janvier 2014 10h15
>Objet : Re: AIR CameraRoll / MediaPromise path issue?
>
>
>On iOS, you should not try to open the selected image as a file, instead
>you should use the MediaPromise API to access the content (iOS won’t
>actually let apps to access those files directly). If you do a search for
>CameraRoll + MediaPromise you should find some example.
>
>
>
>2014/1/24 JC Lang <ne...@yahoo.fr>
>
>> Hello devs,
>> I encounter a problem with data returned by CameraRoll on Android.
>> (Not sure if it's the correct place to ask, but I didn't find anything on
>> the subject...)
>>
>> It looks like the path of the File returned by CameraRoll when selecting
>> an image using the OS internal "Gallery" doesn't return the "real" path of
>> the file;
>> but instead, some sort of "local" path which looks like a meta data value
>> used by the "Gallery" to tag elements.
>> The problem occurs only when files are "moved" or renamed externally,
>> meaning the first "tag" value assignment matches the real file path.
>>
>> So MediaPromise takes this "gallery path" value as file path, and cannot
>> find the file of course.
>> Question: am I doing something wrong or have somebody seen this problem
>> already?
>
>
Re: AIR CameraRoll / MediaPromise path issue?
Posted by Cosma Colanicchia <co...@gmail.com>.
On iOS, you should not try to open the selected image as a file, instead
you should use the MediaPromise API to access the content (iOS won’t
actually let apps to access those files directly). If you do a search for
CameraRoll + MediaPromise you should find some example.
2014/1/24 JC Lang <ne...@yahoo.fr>
> Hello devs,
> I encounter a problem with data returned by CameraRoll on Android.
> (Not sure if it's the correct place to ask, but I didn't find anything on
> the subject...)
>
> It looks like the path of the File returned by CameraRoll when selecting
> an image using the OS internal "Gallery" doesn't return the "real" path of
> the file;
> but instead, some sort of "local" path which looks like a meta data value
> used by the "Gallery" to tag elements.
> The problem occurs only when files are "moved" or renamed externally,
> meaning the first "tag" value assignment matches the real file path.
>
> So MediaPromise takes this "gallery path" value as file path, and cannot
> find the file of course.
> Question: am I doing something wrong or have somebody seen this problem
> already?