Pick a song

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Pick a song

Post by maxs »

When I use this code, I am able to pick a song, but the result is empty. How can I get the pathname to play the mp3 song?

mobilePickMedia true, "music", "anyAudio"
put the result into tResult
answer tResult
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

I am able to pick a song, but it will not play. tline return nothing. Any ideas?

mobilePickMedia true, "music", "anyAudio"
put the result into tResult

repeat for each line tLine in tResult
put ( tLine & return ) after fld "songlist" of grp "Songlist"
play tLine
end repeat


Max
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Pick a song

Post by Klaus »

Hi Max,

just to be sure:
"mobilepickmedia" does NOT work in the simulator!


Best

Klaus
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

Not on my ipad either.

At least on my ipad I can select a song.

Max
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

HI On my ipad I can select a song from my library with mobilePickMedia, but it does not return anything, I cant get any mp3 song to play

mobilePickMedia true, "music", "anyAudio"
put the result into tResult

mobilePlaySoundOnChannel tResult , "current", "now"

THis is what is in the dictionary, but it does not seem to work

Max
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

I still cannot find a way to play a song from my music library from LC.

Does anyone have any sample scripts to make this work?
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

I want to select a song from my laptop Itunes library, and from IOS.

Has anyone done this successfully?

Max
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

Has anyone got this code to work?

mobilePickMedia true, "music", "anyAudio"


mobilePlaySoundOnChannel tResult , "current", "now"
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

I usually get a good response from great people here.

My hunch is that no one bothers to access music from the ipad.

I just want to know if it works.

Max
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

Gee, it's lonely here.
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Pick a song

Post by FourthWorld »

I wonder if this is a documentation bug. The Dictionary entry for mobilePickMedia says the returned value will be in "the result", but that's more commonly used for error info. Most commands that return data do so in "it".

To test this, try checking the value of "it" rather than "the result".

If it works, please submit a bug report for that Dictionary entry.

If it doesn't work report back here and we'll explore this further.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

Hi RIchard

"It" returned nothing.

"Result" returned nothing.

For some reason I've been having alot of bad luck with Livecode this year. Thanks for looking into this. As you can see there is not much interest here in this subject.

Max
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Pick a song

Post by FourthWorld »

I wish I could help, but I just tested mobilePickMedia in an Android app and discovered a bug:
http://quality.livecode.com/show_bug.cgi?id=19279

To try to get more attention here you may want to consider changing the title of this thread to something like "problem with mobilePickMedia" so folks can better anticipate what the thread is about.

You may also want to consider asking your question on the use-livecode discussion list. There's some overlap between the two audiences, but also many only here in the forums or only there on the list. Might be good to see if you get any interest there.
For some reason I've been having alot of bad luck with Livecode this year.
IIRC it hasn't been just LiveCode, but mostly that you've been doing a lot of mobile development. Dealing with more restricted OSes, single window GUI, limited file system access, and other constraints we don't have on the desktop make mobile development like building a ship in a bottle.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am

Re: Pick a song

Post by maxs »

Hi Richard,

You are exactly right about the Mobile environment. All the trouble started after I made the app.

Thank you for looking at the command. I had tried every way to make it work. It seems that I was the only one.

I am not familiar with the use-livecode discussion list. I'll look into it.

Thanks, Max
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Pick a song

Post by FourthWorld »

I thought I'd seen your posts on the list. Must have been mistaken.

Signup and archives here:
http://lists.runrev.com/mailman/listinfo/use-livecode
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Post Reply