You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Lane Friesen <la...@hotmail.com> on 2015/04/02 04:03:27 UTC

Access mp3 files in iOS

In Android, a file myFile in directory myDirec on device storage is accessed 
(read-only) by

xmlLoader.load(new URLRequest(file://mnt/sdcard/myDirec/myFile));

The files have been placed onto the device by the user previously, usually 
through a USB connection.

What is the best practice method for placing a directory with mp3 files, xml 
files and images into local Apple iOS device storage and then accessing the 
storage on a permanent basis later on from a Flex app, similar to what I am 
doing with Android? Payment is not an issue. I am concerned only with the 
convenience of internal storage as opposed to reliance on the Internet.

Specifically, what is the best location to place the files? What is the 
optimal way to load the files initially? What is the best way for Flex to 
access the files?

Thanks in advance,

Lane. 


Re: Access mp3 files in iOS

Posted by Lane Friesen <la...@hotmail.com>.
Thanks Om.

This is valuable information. I suspect it will become a reference for other 
users with similar challenges in the future.

Thanks again,

Lane.



--------------------------------------------------
From: "OmPrakash Muppirala" <bi...@gmail.com>
Sent: Friday, April 03, 2015 12:29 PM
To: <us...@flex.apache.org>
Subject: Re: Access mp3 files in iOS

> Using Adobe AIR's File class would be the best option for this.  This 
> would
> ensure that the app works correctly in a cross-platform way.
>
> Here are all the locations you can access on iOS:
>
> iOS
>
> Application
>
> /var/mobile/Applications/uid/filename.app
>
> Application-storage
>
> /var/mobile/Applications/uid/Library/Application
> Support/applicationID/Local Store
>
> Cache
>
> /var/mobile/Applications/uid/Library/Caches
>
> Desktop
>
> not accessible
>
> Documents
>
> /var/mobile/Applications/uid/Documents
>
> Temporary
>
> /private/var/mobile/Applications/uid/tmp/FlashTmpNNN
>
> User
>
> not accessible
>
> In your case, using File.applicationStorageDirectory
> or File.documentsDirectory seems most appropriate.
>
> There is a detailed reference here:
> http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html
>
> Hope this helps.
>
> Thanks,
> Om
>
> On Wed, Apr 1, 2015 at 7:03 PM, Lane Friesen <la...@hotmail.com>
> wrote:
>
>> In Android, a file myFile in directory myDirec on device storage is
>> accessed (read-only) by
>>
>> xmlLoader.load(new URLRequest(file://mnt/sdcard/myDirec/myFile));
>>
>> The files have been placed onto the device by the user previously, 
>> usually
>> through a USB connection.
>>
>> What is the best practice method for placing a directory with mp3 files,
>> xml files and images into local Apple iOS device storage and then 
>> accessing
>> the storage on a permanent basis later on from a Flex app, similar to 
>> what
>> I am doing with Android? Payment is not an issue. I am concerned only 
>> with
>> the convenience of internal storage as opposed to reliance on the 
>> Internet.
>>
>> Specifically, what is the best location to place the files? What is the
>> optimal way to load the files initially? What is the best way for Flex to
>> access the files?
>>
>> Thanks in advance,
>>
>> Lane.
>>
> 

Re: Access mp3 files in iOS

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Using Adobe AIR's File class would be the best option for this.  This would
ensure that the app works correctly in a cross-platform way.

Here are all the locations you can access on iOS:

iOS

Application

/var/mobile/Applications/uid/filename.app

Application-storage

/var/mobile/Applications/uid/Library/Application
Support/applicationID/Local Store

Cache

/var/mobile/Applications/uid/Library/Caches

Desktop

not accessible

Documents

/var/mobile/Applications/uid/Documents

Temporary

/private/var/mobile/Applications/uid/tmp/FlashTmpNNN

User

not accessible

In your case, using File.applicationStorageDirectory
or File.documentsDirectory seems most appropriate.

There is a detailed reference here:
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html

Hope this helps.

Thanks,
Om

On Wed, Apr 1, 2015 at 7:03 PM, Lane Friesen <la...@hotmail.com>
wrote:

> In Android, a file myFile in directory myDirec on device storage is
> accessed (read-only) by
>
> xmlLoader.load(new URLRequest(file://mnt/sdcard/myDirec/myFile));
>
> The files have been placed onto the device by the user previously, usually
> through a USB connection.
>
> What is the best practice method for placing a directory with mp3 files,
> xml files and images into local Apple iOS device storage and then accessing
> the storage on a permanent basis later on from a Flex app, similar to what
> I am doing with Android? Payment is not an issue. I am concerned only with
> the convenience of internal storage as opposed to reliance on the Internet.
>
> Specifically, what is the best location to place the files? What is the
> optimal way to load the files initially? What is the best way for Flex to
> access the files?
>
> Thanks in advance,
>
> Lane.
>