Ionic 3 - Display lock screen when we minimized the app
up vote
0
down vote
favorite
In Ionic 3, we need to display the lock screen if app is minimized or goes to background if we open any other app.
Thanks
AK
background ionic3 lockscreen
add a comment |
up vote
0
down vote
favorite
In Ionic 3, we need to display the lock screen if app is minimized or goes to background if we open any other app.
Thanks
AK
background ionic3 lockscreen
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In Ionic 3, we need to display the lock screen if app is minimized or goes to background if we open any other app.
Thanks
AK
background ionic3 lockscreen
In Ionic 3, we need to display the lock screen if app is minimized or goes to background if we open any other app.
Thanks
AK
background ionic3 lockscreen
background ionic3 lockscreen
asked Nov 20 at 3:47
Anantha krishnan
139110
139110
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I got it how we can implement the above logic.
platform.pause.subscribe(() => {
//logic when the application is in the background
this.navCtrl.push(LockScreenPage);
});
platform.resume.subscribe(() => {
//logic when the application has been resumed after being paused.
});
But anybody have any idea where we can have it commonly in the application, because I am having 16 pages in my app. If I create BaseApp and extends with all the 16 pages then this code would executes 16times. Any other way to implement this logic. Is it OK we use it in component.ts?
Yes, app.component.ts is the good place to use.
– Suresh Kumar Ariya
Nov 20 at 12:06
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I got it how we can implement the above logic.
platform.pause.subscribe(() => {
//logic when the application is in the background
this.navCtrl.push(LockScreenPage);
});
platform.resume.subscribe(() => {
//logic when the application has been resumed after being paused.
});
But anybody have any idea where we can have it commonly in the application, because I am having 16 pages in my app. If I create BaseApp and extends with all the 16 pages then this code would executes 16times. Any other way to implement this logic. Is it OK we use it in component.ts?
Yes, app.component.ts is the good place to use.
– Suresh Kumar Ariya
Nov 20 at 12:06
add a comment |
up vote
0
down vote
I got it how we can implement the above logic.
platform.pause.subscribe(() => {
//logic when the application is in the background
this.navCtrl.push(LockScreenPage);
});
platform.resume.subscribe(() => {
//logic when the application has been resumed after being paused.
});
But anybody have any idea where we can have it commonly in the application, because I am having 16 pages in my app. If I create BaseApp and extends with all the 16 pages then this code would executes 16times. Any other way to implement this logic. Is it OK we use it in component.ts?
Yes, app.component.ts is the good place to use.
– Suresh Kumar Ariya
Nov 20 at 12:06
add a comment |
up vote
0
down vote
up vote
0
down vote
I got it how we can implement the above logic.
platform.pause.subscribe(() => {
//logic when the application is in the background
this.navCtrl.push(LockScreenPage);
});
platform.resume.subscribe(() => {
//logic when the application has been resumed after being paused.
});
But anybody have any idea where we can have it commonly in the application, because I am having 16 pages in my app. If I create BaseApp and extends with all the 16 pages then this code would executes 16times. Any other way to implement this logic. Is it OK we use it in component.ts?
I got it how we can implement the above logic.
platform.pause.subscribe(() => {
//logic when the application is in the background
this.navCtrl.push(LockScreenPage);
});
platform.resume.subscribe(() => {
//logic when the application has been resumed after being paused.
});
But anybody have any idea where we can have it commonly in the application, because I am having 16 pages in my app. If I create BaseApp and extends with all the 16 pages then this code would executes 16times. Any other way to implement this logic. Is it OK we use it in component.ts?
edited Nov 20 at 6:00
answered Nov 20 at 5:53
Anantha krishnan
139110
139110
Yes, app.component.ts is the good place to use.
– Suresh Kumar Ariya
Nov 20 at 12:06
add a comment |
Yes, app.component.ts is the good place to use.
– Suresh Kumar Ariya
Nov 20 at 12:06
Yes, app.component.ts is the good place to use.
– Suresh Kumar Ariya
Nov 20 at 12:06
Yes, app.component.ts is the good place to use.
– Suresh Kumar Ariya
Nov 20 at 12:06
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385933%2fionic-3-display-lock-screen-when-we-minimized-the-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown