no device ready event received in ionic serve

no device ready event received in ionic serve



Platform: ionic 3



I find that no device ready event received when using ionic serve.

But there is the event with emulator.


ionic serve



Checking:


this.renderer.listen('document', 'deviceready', () =>
console.log("device ready");
);



The reason why I need the event is because a plugin starts after that event.

And I want to test the app using browser to save development time.

Is there any way to get the event using ionic serve?

I had a project that can init a node module listening deviceready. The problem is I don't know the config to do that.
Maybe I can fire the event manually?


ionic serve


deviceready



Details:

cordova-plugin-mfp - bootstrap.js


document.addEventListener('deviceready', loadMFP, false);
function loadMFP()
if(typeof WL !== 'undefined' && WL.StaticAppProps)
mfpready();







To use cordova-plugin-mfp plugin you should use real device or emulator, you can't do it with browser.

– Sudarshana Dayananda
Sep 13 '18 at 2:23


cordova-plugin-mfp






@SudarshanaDayananda yes, normally we should use native platform to test. However, i had a project previously that can init cordova-plugin-mfp using ionic serve. The problem is i don't know what config exactly done on the project.

– user3042713
Sep 13 '18 at 2:32


cordova-plugin-mfp




0



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)