LC Run Alert in Mobile environment in the background? - Solv
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
LC Run Alert in Mobile environment in the background? - Solv
Can LiveCode run in a Mobile environment in the background?
I want to make an app that reminds me to do certain things at certain times and certain dates.
Can LC be used to do something like this?
Thanks,
David
I want to make an app that reminds me to do certain things at certain times and certain dates.
Can LC be used to do something like this?
Thanks,
David
Last edited by DR White on Sat Dec 31, 2016 2:47 pm, edited 4 times in total.
Re: Running a program in the background?
Hi David,
just made a little test within the IDE with this script:
Then I switched over to Safari, waited a couple of seconds and got this, see screenshot.
Maybe that helps?
Best
Klaus
just made a little test within the IDE with this script:
Code: Select all
on mouseUp
send "xxx" to me in 30 secs
end mouseUp
command xxx
answer "Reminder..."
end xxx
Maybe that helps?
Best
Klaus
Re: Running a program in the background?
What Klaus said.
Here is another little gadget you might try. On a new card with a field and a button. This in the button script:
You can do whatever you want in another app while watching the counter back in LC.
Craig Newman
Here is another little gadget you might try. On a new card with a field and a button. This in the button script:
Code: Select all
on mouseUp
put 0 into fld 1
doCounter
end mouseUp
on doCounter
add 1 to fld 1
if fld 1 = 10 then
answer "Done"
exit to top
end if
send "doCounter" to me in 1 second
end doCounter
Craig Newman
Re: Running a program in the background?
I tried the suggested code from both Klause and Craig but:
When, I press "Home" on my iPhone 6, while the LC app is counting up, I do not see the field counting up or the message box, when the counter reaches 10.
I need a way of display a message from my LC app, after I initiate a timer in LC and after I press the iPhone Home button.
Is it possible with LC?
Thanks,
David
When, I press "Home" on my iPhone 6, while the LC app is counting up, I do not see the field counting up or the message box, when the counter reaches 10.
I need a way of display a message from my LC app, after I initiate a timer in LC and after I press the iPhone Home button.
Is it possible with LC?
Thanks,
David
Re: Running a program in the background?
Hi David,
in all NON mobile forums we presume a DESKTOP problem!
Maybe you can "fire" a local notification for this?
Check "mobileCreateLocalNotification" etc. in the dictionary.
Best
Klaus
I would be a good idea to note IMMEDIATELY that you are looking for a solution for MOBILE,DR White wrote:IWhen, I press "Home" on my iPhone 6, while the LC app is counting up, I do not see the field counting up or the message box, when the counter reaches 10.
in all NON mobile forums we presume a DESKTOP problem!

Maybe you can "fire" a local notification for this?
Check "mobileCreateLocalNotification" etc. in the dictionary.
Best
Klaus
Re: LC Run a program in Mobile environment in the background
Klaus,
Thanks,
David
Thanks,
David
Re: LC Run a program in Mobile environment in the background
Klaus,
I think you might be right about using "mobileCreateLocalNotification" for an alarm function.
I looked it up in the dictionary and appears to have the functionality I want, but I have not been successful in getting "mobileCreateLocalNotification" to work. I went to a LC site to learn more about it (http://lessons.livecode.com/m/4069/l/58 ... ifications), but could not get the sample file to work.
Do you know where I might find more information on this?
Thanks,
David
I think you might be right about using "mobileCreateLocalNotification" for an alarm function.
I looked it up in the dictionary and appears to have the functionality I want, but I have not been successful in getting "mobileCreateLocalNotification" to work. I went to a LC site to learn more about it (http://lessons.livecode.com/m/4069/l/58 ... ifications), but could not get the sample file to work.
Do you know where I might find more information on this?
Thanks,
David
Re: LC Run a program in Mobile environment in the background
The above sample works fine. I forgot to "check" the box for "Local Notification" in the IOS setup.
David
David
Re: LC Run a program in Mobile environment in the background
We'll, it worked fine on the IOS simulator,
but not when I tested it on my iPhone 6.
but not when I tested it on my iPhone 6.