New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iRoot is not defined, 2nd time launch the app #7
Comments
Hallo @Piraban I check this asap. Thanks for report. |
Seems this is an issue in this plugin. May I know this can be resolved asap? |
@Piraban so... it work good on my test project: you should wrap your call with import {Component, OnInit} from '@angular/core';
declare var IRoot: any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title = 'app';
isRootedORJailBreak: boolean;
ngOnInit() {
document.addEventListener("deviceready", function () {
if (typeof (IRoot) !== 'undefined' && IRoot) {
IRoot.isRooted((data) => {
if (data && data === 1) {
this.isRootedORJailBreak = true
alert("*******This is routed device");
} else {
this.isRootedORJailBreak = false
alert("*******This is not routed device");
}
}, (data) => {
this.isRootedORJailBreak = false
alert("*******routed device detection failed case: " + JSON.stringify(data, null, 2));
});
}
}, false);
}
} |
Thanks a lot for the quick fix. I am using ionic 3. I will check and update you. But in ionic i have used platform ready
This one didn't work. same issue |
@Piraban which version of this plugin are you using? Look at way of implementation in Ionic. |
@Piraban any news? |
a simple note We should use the following check: |
@Piraban Is this issue resolved? |
@bhargavas12 this was already fixed. What do you do exactly? |
I have done as a blow
The first time launch app, this is working, after that remove the app from a session, then launch the app, it says 'iRoot is not defined'
Please any help/solution. I am struggling to find a solution more than 3 days.
The text was updated successfully, but these errors were encountered: