@echo start installing required native and 3rd party plugins

@echo to update angular -> npm install -g @angular/cli
@echo to update ionic  -> npm install -g ionic

@echo add browser, android , ios platforms commit non required
@echo to add browser -> call ionic cordova platform add browser
@echo to add ios     -> call ionic cordova platform add ios

call ionic cordova platform add android


@echo copying android FCM google servcie file
call cp ./google-services.json  ./platforms/android/

call npm i @angular/animations 
call npm i @swimlane/ngx-charts --save

@echo primeng framework [angular] 

call npm install primeng --save
call npm install primeicons --save

@echo  add css links for primeng in global.scss 
@echo  @import "../node_modules/primeng/resources/themes/nova-light/theme.css";
@echo  @import "../node_modules/primeng/resources/primeng.min.css";
@echo  @import "../node_modules/primeicons/primeicons.css";

@echo install chartjs as dependency for primeng chartjs
call npm install chart.js --save
@echo add reference in [angular.json] in [scripts] array add (node_modules/chart.js/dist/Chart.js)


@echo calendar  https://mattlewis92.github.io/angular-calendar/#/kitchen-sink
call npm install --save @ng-bootstrap/ng-bootstrap
call npm install --save angular-calendar date-fns

@echo install android support gradle release because of barcode scanner  to install missing android attributes
call ionic cordova plugin add cordova-android-support-gradle-release --fetch

@echo push notifications
call ionic cordova plugin add phonegap-plugin-push  --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0" --variable FCM_VERSION="15.0.0"
call npm install @ionic-native/push


@echo sqlite storage
call ionic cordova plugin add cordova-sqlite-storage
call npm install @ionic-native/sqlite


@echo native storage
call ionic cordova plugin add cordova-plugin-nativestorage
call npm install @ionic-native/native-storage


@echo bluetooth ble centeral //check interface assets/js/bletooth.js
call ionic cordova plugin add cordova-plugin-ble-central
call npm install @ionic-native/ble

 
@echo launch navigator
@echo warning : for now we stick with launch navigator 3 since 5 has issue
REM  call ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator --variable GOOGLE_API_KEY_FOR_ANDROID="AIzaSyC-XbzwGMyAVCnspof0cqiO4iLfKmeEYVA"
call ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator@3
call npm install @ionic-native/launch-navigator

 @echo themeablebrowser

call ionic cordova plugin add cordova-plugin-themeablebrowser
call npm install @ionic-native/themeable-browser

@echo in app browser
call ionic cordova plugin add cordova-plugin-inappbrowser
call npm install @ionic-native/in-app-browser

@echo globalization

call ionic cordova plugin add cordova-plugin-globalization
call npm install @ionic-native/globalization


@echo android permissions plugin
call ionic cordova plugin add cordova-plugin-android-permissions
call npm install @ionic-native/android-permissions

@echo sms reader  https://www.npmjs.com/package/cordova-plugin-sms-receive
call npm i cordova-plugin-sms-receive
call cordova plugin add cordova-plugin-sms-receive

@echo device information
call ionic cordova plugin add cordova-plugin-device
call npm install @ionic-native/device

@echo local notifications
call ionic cordova plugin add cordova-plugin-local-notification
call npm install @ionic-native/local-notifications

@echo call phone number
call ionic cordova plugin add call-number
call npm install @ionic-native/call-number

@echo badge
call ionic cordova plugin add cordova-plugin-badge
call npm install @ionic-native/badge



@echo biometric features 
call ionic cordova plugin add cordova-plugin-fingerprint-aio --variable FACEID_USAGE_DESCRIPTION="User Authentication"
call npm install @ionic-native/fingerprint-aio

@echo install diagnostic 
call ionic cordova plugin add cordova.plugins.diagnostic
call npm install @ionic-native/diagnostic

@echo install background-geolocation
call ionic cordova plugin add cordova-plugin-mauron85-background-geolocation@alpha --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0"
call npm install @ionic-native/background-geolocation


@echo install barcode plugin
call ionic cordova plugin add phonegap-plugin-barcodescanner
call npm install @ionic-native/barcode-scanner

@echo install camera plugin
call ionic cordova plugin add cordova-plugin-camera
call npm install @ionic-native/camera

@echo install keyboard plugin
call ionic cordova plugin add cordova-plugin-ionic-keyboard
call npm install @ionic-native/keyboard

@echo install opentok required permissions
call ionic cordova plugin add cordova-opentok-android-permissions

@echo install health plugin
call ionic cordova plugin add cordova-plugin-health --variable HEALTH_READ_PERMISSION="App needs read access to read heart rate"  --variable HEALTH_WRITE_PERMISSION="App needs write access for heart rate" --variable GMS_VERSION="16.0.1"
call npm install @ionic-native/health

@echo install App Availability Plugin
call ionic cordova plugin add cordova-plugin-appavailability 
call npm install @ionic-native/app-availability

@echo install rate plugin
call ionic cordova plugin add cordova-plugin-apprate
call npm install @ionic-native/app-rate

@echo reinitializing git repository
@echo git init
@echo git remote add  origin https://enas_yaghi@hmg.git.cloudforge.com/patientappionic.git
@echo git push -f origin master


@echo update project from package.js change if necessary 
@echo to install all dependencies in package.json

@echo npm cache clean --force
@echo exact version -> npm install --save --save-exact react
@echo latest versions based on package.json rules  -> npm install

@echo to build or serve for (( production ))
@echo export NODE_OPTIONS=--max-old-space-size=4096
@echo ionic cordova build android  --release --aot --minifyjs --optimizejs --minifycss  
@echo ionic cordova build ios --release --aot --minifyjs --optimizejs --minifycss  
