Cordova Plugin for checking if developer mode is enabled or not

0

Want to integrate this cordova plugin in ionic framework : https://github.com/Secullum/cordova-plugin-devoptionschecker. to see if the app is running in android’s Developer mode or not.

But can’t seem to make it work.
app.component.ts

Issues noted:

1)The author hasnt mentioned any examples for integration with ionic/typescript based app.

2)Till now , I have written the following code:

declare var devoptions;

constructor()
{
platform
.ready()
.then(() => {

devoptions.check((bool) => {
console.log("Successfully called : ", bool);
}, (err) => {

console.log('Failed :', err);


});}

})
}

Developing on Ionic-Angular Framework.

It seems there is a problem in integration because I see error : devoptions is undefined

Why do you think you can access the Plugin via devoptions? In the Plugin’s Example you can see it is accessible over cordova.plugins.devoptionschecker

1 Like

Hello,

I can assist you, would you like to discuss over a quick Skype call?

Sk-ype - cis.seth

1 Like

Yeah this worked for me! I am new to ionic and using these plugins.
Thanks for pointing it out.

1 Like

Thanks @SethRogers23 :blush: . I was able to solve the issue.

No Problem. In general and for the future: You can see a Plugin’s Clobber (how it is available) in the Plugin’s plugin.xml here:

<clobbers target="cordova.plugins.devoptionschecker" />
1 Like

can i see your source code?