Re: Where do copied files go on mobile?

2020-04-20 Thread Mark Talluto via use-livecode
On Apr 20, 2020, at 11:00 AM, Mark Talluto  wrote:

> 
> function csi_soundDirectory
>  local tPath
>  
>  --USEFUL FOR GETTING THE ROOT FOLDER OF THIS APP
>  set the itemDel to slash
>  put specialFolderPath("resources") & slash into tPath
>  return tPath & "/sounds/" & sVehicle —in this example sVehicle contains 
> “lambo"
> end csi_soundDirectory

This function had an extra slash that is not needed. Here is the updated 
function:

function csi_soundDirectory
 local tPath
 
 --USEFUL FOR GETTING THE ROOT FOLDER OF THIS APP
 set the itemDel to slash
 put specialFolderPath("resources") into tPath
 return tPath & "/sounds/" & sVehicle —in this example sVehicle contains 
“lambo"
end csi_soundDirectory

Best regards,

Mark Talluto
livecloud.io 
nursenotes.net 
canelasoftware.com 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Where do copied files go on mobile?

2020-04-20 Thread Mark Talluto via use-livecode


> On Apr 19, 2020, at 9:37 AM, Graham Samuel via use-livecode 
>  wrote:
> 
> Hi Klaus
> 
> Thanks for your continued interest. In fact I got it working! As stated 
> earlier, I converted my sound to .m4a (there are internet services for this 
> kind of conversion) and included it in the Standalone Copy Files section.
> 
> I have this in the OpenStack handler of the main stack of the app (there is 
> only one stack).
> 
>put specialFolderPath("resources") & “/MySound.m4a" into tBeepPath
>set the beepsound to tBeepPath
>beep 3 — as a test
> 
> I ran it on the iPhone simulator and it did beep! I have something wrong 
> further on in my app when the beep is supposed to react as an alarm, but it 
> isn’t the sound itself. 
> 
> I am struggling with these additional problems and will almost certainly be 
> asking for more advice shortly!
> 
> Thanks again for your help.
> 
> Graham

Hi Graham,

I am working on a simple mobile app that is using the sensors and playback of 
sound as you are.
Using .m4a is perfect for mobile.

The code to play your sound is:  play tPath —tPath is the full path to your 
sound file.

My file structure is as follows:
A bunch of iOS related directories (which you can ignore)
myApp.app/sounds/lambo/start.m4a

I use the following function to build my path to that sound file:

function csi_soundDirectory
 local tPath
 
 --USEFUL FOR GETTING THE ROOT FOLDER OF THIS APP
 set the itemDel to slash
 put specialFolderPath("resources") & slash into tPath
 return tPath & "/sounds/" & sVehicle —in this example sVehicle contains 
“lambo"
end csi_soundDirectory

Best regards,

Mark Talluto
livecloud.io 
nursenotes.net 
canelasoftware.com 




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Where do copied files go on mobile?

2020-04-19 Thread Klaus major-k via use-livecode
Hi Graham,

> Am 19.04.2020 um 18:37 schrieb Graham Samuel via use-livecode 
> :
> 
> Hi Klaus
> 
> Thanks for your continued interest. In fact I got it working! As stated 
> earlier, I converted my sound to .m4a (there are internet services for this 
> kind of conversion) and included it in the Standalone Copy Files section.
> I have this in the OpenStack handler of the main stack of the app (there is 
> only one stack).
>put specialFolderPath("resources") & “/MySound.m4a" into tBeepPath
>set the beepsound to tBeepPath
>beep 3 — as a test
> I ran it on the iPhone simulator and it did beep!

great! :-)

> I have something wrong further on in my app when the beep is supposed to 
> react as an alarm, but it isn’t the sound itself. 
> I am struggling with these additional problems and will almost certainly be 
> asking for more advice shortly!
> Thanks again for your help.

You are very welcome!

I am the lucky guy who does not own (and need!) any mobile device, yes, no 
cell-phone, that's me.
But since I sleep with the LC dictionary under my pillow, I know whatever 
syntax is neccessary for mobile,
just cannot test it by myself. :-D

Some years ago I have been coaching/mentoring a complete LC newbie and a couple 
of months later he 
had a cool app with database etc. in the Apple and Google store. :-)

> Graham

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Where do copied files go on mobile?

2020-04-19 Thread Graham Samuel via use-livecode
Hi Klaus

Thanks for your continued interest. In fact I got it working! As stated 
earlier, I converted my sound to .m4a (there are internet services for this 
kind of conversion) and included it in the Standalone Copy Files section.

I have this in the OpenStack handler of the main stack of the app (there is 
only one stack).

put specialFolderPath("resources") & “/MySound.m4a" into tBeepPath
set the beepsound to tBeepPath
beep 3 — as a test

I ran it on the iPhone simulator and it did beep! I have something wrong 
further on in my app when the beep is supposed to react as an alarm, but it 
isn’t the sound itself. 

I am struggling with these additional problems and will almost certainly be 
asking for more advice shortly!

Thanks again for your help.

Graham


> On 19 Apr 2020, at 14:13, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
>> Am 19.04.2020 um 13:46 schrieb Graham Samuel via use-livecode 
>> :
>> 
>> Thanks Klaus. I am parking a sound in there and obviously only reading it, 
>> so should be OK.
> 
> yep!
> 
>> My mysterious unresponsiveness in my app must be something else...
> 
> Hm, what fileformat are you using and what is the syntax in your script?
> 
>> Keep safe 
> 
> You BET! :-)
> 
>> Graham
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Where do copied files go on mobile?

2020-04-19 Thread Klaus major-k via use-livecode
Hi Graham,

> Am 19.04.2020 um 13:46 schrieb Graham Samuel via use-livecode 
> :
> 
> Thanks Klaus. I am parking a sound in there and obviously only reading it, so 
> should be OK.

yep!

> My mysterious unresponsiveness in my app must be something else...

Hm, what fileformat are you using and what is the syntax in your script?

> Keep safe 

You BET! :-)

> Graham

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Where do copied files go on mobile?

2020-04-19 Thread Graham Samuel via use-livecode
Thanks Klaus. I am parking a sound in there and obviously only reading it, so 
should be OK. My mysterious unresponsiveness in my app must be something else...

Keep safe 

Graham

Sent from my iPhone

> On 19 Apr 2020, at 13:40, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
>> Am 19.04.2020 um 13:34 schrieb Graham Samuel via use-livecode 
>> :
>> 
>> When doing standalone settings for mobile, if one chooses to copy files  
>> where do they go? My simulator setup is having a meltdown at present so it’s 
>> hard to test. I hope it’s the ‘resources’ folder. LC docs don’t say AFAICS.
> 
> yes, everything you add to our app via the "Copy files" tab in the 
> "Standalone Application Settings"
> will be found in the runtime in  -> specialfolderpath("resources") on ANY 
> platform!
> 
> Hint:
> We are not allowed to write in that folder and even opening a database here 
> is considered
> "writing" and will fail.
> 
> So if you have a database (SQLite) file in your app, you need to copy it to 
> the users DOCUMENTS
> folder first and open it there!
> 
>> Graham
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Where do copied files go on mobile?

2020-04-19 Thread Klaus major-k via use-livecode
Hi Graham,

> Am 19.04.2020 um 13:34 schrieb Graham Samuel via use-livecode 
> :
> 
> When doing standalone settings for mobile, if one chooses to copy files  
> where do they go? My simulator setup is having a meltdown at present so it’s 
> hard to test. I hope it’s the ‘resources’ folder. LC docs don’t say AFAICS.

yes, everything you add to our app via the "Copy files" tab in the "Standalone 
Application Settings"
will be found in the runtime in  -> specialfolderpath("resources") on ANY 
platform!

Hint:
We are not allowed to write in that folder and even opening a database here is 
considered
"writing" and will fail.

So if you have a database (SQLite) file in your app, you need to copy it to the 
users DOCUMENTS
folder first and open it there!

> Graham

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Where do copied files go on mobile?

2020-04-19 Thread Graham Samuel via use-livecode
When doing standalone settings for mobile, if one chooses to copy files  where 
do they go? My simulator setup is having a meltdown at present so it’s hard to 
test. I hope it’s the ‘resources’ folder. LC docs don’t say AFAICS.

Graham

Sent from my iPhone
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode