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();
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.
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