Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to change time in simulator only
Started by akhtarx5 Feb 04 2019 07:48 AM

- - - - -
4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

akhtarx5

[GLOBAL: userInfoPane.html]
akhtarx5
  • Enthusiast

  • 70 posts
  • Corona SDK

Hi

 

im building an Alarm type app

Can somebody please tell me how to change the time in simulator

 

this will save from having to install to device every time to test alarm with real time

 

thankyou

 



[TOPIC: post.html]
#2

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,803 posts
  • Corona SDK

You could just copy os.time() into another variable, and then you can override that variable when testing.

[TOPIC: post.html]
#3

carloscosta

[GLOBAL: userInfoPane.html]
carloscosta
  • Contributor

  • 636 posts
  • Corona SDK

akhtarx5, hope you know that corona app will only work while running in foreground. no background running in corona. if app is minimized or paused it will stop running. to build an alarm in corona, the only way I can think of is using local notifications.



[TOPIC: post.html]
#4

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,106 posts
  • Corona SDK

Don't all phones come with alarms for like the past 10 years now?



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,790 posts
  • Enterprise

There are reasons people still want to build alarms into apps. I did a "Find my car" app and added a feature to let you get an alarm when your meter was set to expire.




[topic_controls]
[/topic_controls]