How can you access audio files saved on an iPhone using PhoneGap? - iphone

I'm trying to make an application on the iPhone using PhoneGap. I know that you can access photos stored in the phone's photo library using navigator.camera.PictureSourceType.PHOTOLIBRARY. Is there an equivalent of this for accessing audio files on the phone? I've looked through the documentation for PhoneGap, but haven't been able to find anything.
Thanks in advance!

Firstly iOS give us the limited access to the media files . By navigator.camera.PictureSourceType.PHOTOLIBRARY you can only access the camera roll. you cant access the pre stored video also using this code . SO i don't think you can access the audio files stored in the iPhone by using any way .

Related

Pulling songs from iOS music library into an App?

I am developing an HTML5 mobile application that should allow users to upload music directly into the application.
The music should be able to be pulled from:
Youtube (opens YouTube interface to insert YouTube link)
SoundCloud (opens SoundCloud profile to insert link/mp3)
Upload from Phone (open iOS music library within phone to select song to upload)
Question:
I want to allow the users to pick a song from their iOS native music library and upload it directly into the app as an mp3.
I've read that a possible solution is to copy the raw song data to the App Storage Directory via the AVAssetReader.
Any other good solutions?
Im going to assume then this is a hybrid so the app will be part native. Yes, you can get the raw song data. You can get it in a variety of different file types. You can do whatever you want to it. You want to somehow send it across to a server, and then load it back into your app on the html5 web interface? Sounds crazy but you might be able to do that. You also might have legal issues and get denied from the app store.

Saving location information of a video using UISaveVideoAtPathToSavedPhotosAlbum

I have a video recording app. I sync the recorded videos to the iPhone Camera Roll using UISaveVideoAtPathToSavedPhotosAlbum. However when I read the synched videos from the Camera Roll using AssetsLibrary framework and access the location information using valueForProperty: ALAssetPropertyLocation API, I do not get valid location. How do I save the location when I sync the video?
Thanks,
Sahana
Hi there is no officially supported way to do this. What you may do: Store the info you want to save in a seperate database. The downside however is that such information is then only available in your app.
What exactly are you trying to accomplish?
Cheers,
Hendrik

Save audio file from app to iPad/iPhone library

I have been trying to figure out how to do this for most of the day, but I haven't been able to find much help. We have this multimedia app that allows users to view pictures, videos, and music/ringtones about the particular subject. I know you can save images using UIImageWriteToSavedPhotosAlbum and you can save a video file using UISaveVideoAtPathToSavedPhotosAlbum. But I can't figure out how to allow the user to save an audio file. All the files are stored within the app, so its not like I'm trying to stream or download them from the internet. Does anyone have any pointers on how to do this?
The official SDK only allows you to retrieve information with MPMediaLibrary, no write access.

Accessing the music files in iPhone

I need to build a system which backup and restore system in which all the phone datas
including audio, video, pictures. From iPhone 4.0 , there is support for accessing the videos
and photos from the library . Is there any way to access the music files. I need to convert those music files into binary format . Is there any way to accomplish this...
awaiting for the response
Best Regards,
Mohammed Sadiq.
Mohammed,
Please see the Add Music example on Apple's website:
http://developer.apple.com/iphone/library/samplecode/AddMusic/Introduction/Intro.html
-Rob

How to access the mp3 stored in iPhone in iPhone SDK

How does one access an MP3 stored in iPhone iTune_controls directory? When i want to see the MP3 it is not visible for me in my applcation.
I'm not sure I understand your question correctly, but it sounds like you want to access an MP3 from your app that is in the iTunes (iPod?) area of the phone, is this correct?
If so then you can't directly access the file, since your app runs in an isolated sand-box.
If on the other hand you're wanting to play an MP3 that's part of your app then look in the iPhone Library - Audio Queue Services section.