Search code examples
ionic-frameworkionic-nativeapache-cordovaionic-clicordova-android

Ionic cordova bluetooth plugin is not working with - - prod flag build


My Bluetooth app is running well when I am building the app with

ionic cordova build android command. 

BUT when I am building my app with -- prod flag i.e.

ionic cordova build android --prod

my app is not getting access to the BLUETOOTH SERIAL cordova plugin and running as if it is on a desktop browser without cordova support.

I am using …

  • ionic-angular “3.7.1”
  • ionic-native/core "4.3.0"
  • ionic-native/bluetooth serial “4.3.2”

Solution

  • Maybe you're rootpage is called before your platform.ready() is called, so try to initialize value of rootpage in platform.ready().