dpcunningham / exertimer_i4ng_v0

Public Tutorial (from Gary Simon's DesignCourse): Build an exercise interval timer using Ionic4/Angular
0 stars 0 forks source link

add "keep-awake" feature to avoid timeouts from inactivity #19

Closed dpcunningham closed 4 years ago

dpcunningham commented 4 years ago

Per the instructions at 58m12s...

We'll use an Ionic Native feature called "Insomnia"

Install it:

  1. $ ionic cordova plugin add cordova-plugin-insomnia
  2. $ npm install @ionic-native/insomnia

Update the code:

  1. Add insomnia to your:
    • App-modules: ./src/app/app.modules.ts
    • Home page TS: ./src/app/home/home.page.ts`
  2. Add the calls in the startTime() and stopTime() methods

Check it in: $ git commit -am "Added "insomnia" features to avoid timeouts from inactivity."