2016-08-17 04:09:34 -03:00
import { initAngular1 } from './ng1' ;
2015-12-01 13:33:08 -06:00
2015-11-29 16:30:15 -06:00
const DEVICE_READY_TIMEOUT = 2000 ;
2015-12-01 13:33:08 -06:00
declare var window ;
2016-08-17 04:09:34 -03:00
import { ActionSheet } from './plugins/actionsheet' ;
import { AdMob } from './plugins/admob' ;
2016-07-23 07:13:35 -04:00
import { AndroidFingerprintAuth } from './plugins/android-fingerprint-auth' ;
2016-08-17 04:09:34 -03:00
import { AppAvailability } from './plugins/appavailability' ;
import { AppRate } from './plugins/apprate' ;
import { AppVersion } from './plugins/appversion' ;
import { Badge } from './plugins/badge' ;
import { BackgroundGeolocation } from './plugins/background-geolocation' ;
import { BackgroundMode } from './plugins/backgroundmode' ;
import { BarcodeScanner } from './plugins/barcodescanner' ;
import { Base64ToGallery } from './plugins/base64togallery' ;
import { BatteryStatus } from './plugins/batterystatus' ;
import { Brightness } from './plugins/brightness' ;
import { BLE } from './plugins/ble' ;
import { BluetoothSerial } from './plugins/bluetoothserial' ;
import { Calendar } from './plugins/calendar' ;
2016-08-27 02:02:07 -04:00
import { CallNumber } from './plugins/call-number' ;
2016-08-17 04:09:34 -03:00
import { Camera } from './plugins/camera' ;
import { CameraPreview } from './plugins/camera-preview' ;
import { CardIO } from './plugins/card-io' ;
import { Clipboard } from './plugins/clipboard' ;
2016-08-26 11:06:26 -05:00
import { CodePush } from './plugins/code-push' ;
2016-08-17 04:09:34 -03:00
import { Contacts } from './plugins/contacts' ;
import { Crop } from './plugins/crop' ;
import { DatePicker } from './plugins/datepicker' ;
import { DBMeter } from './plugins/dbmeter' ;
import { Deeplinks } from './plugins/deeplinks' ;
import { Device } from './plugins/device' ;
import { DeviceAccounts } from './plugins/deviceaccounts' ;
import { DeviceMotion } from './plugins/devicemotion' ;
import { DeviceOrientation } from './plugins/deviceorientation' ;
import { Diagnostic } from './plugins/diagnostic' ;
import { Dialogs } from './plugins/dialogs' ;
import { EmailComposer } from './plugins/emailcomposer' ;
2016-08-26 07:53:18 -04:00
import { EstimoteBeacons } from './plugins/estimote-beacons' ;
2016-08-17 04:09:34 -03:00
import { Facebook } from './plugins/facebook' ;
import { File } from './plugins/file' ;
import { Transfer } from './plugins/filetransfer' ;
import { Flashlight } from './plugins/flashlight' ;
2016-08-26 08:18:43 -04:00
import { Geofence } from './plugins/geofence' ;
2016-08-17 04:09:34 -03:00
import { Geolocation } from './plugins/geolocation' ;
import { Globalization } from './plugins/globalization' ;
import { GooglePlus } from './plugins/google-plus' ;
import { GoogleMap } from './plugins/googlemaps' ;
import { GoogleAnalytics } from './plugins/googleanalytics' ;
import { Hotspot } from './plugins/hotspot' ;
import { Httpd } from './plugins/httpd' ;
import { IBeacon } from './plugins/ibeacon' ;
import { ImagePicker } from './plugins/imagepicker' ;
import { ImageResizer } from './plugins/imageresizer' ;
import { InAppBrowser } from './plugins/inappbrowser' ;
2016-08-26 08:18:43 -04:00
import { InAppPurchase } from './plugins/inapppurchase' ;
2016-08-17 04:09:34 -03:00
import { Insomnia } from './plugins/insomnia' ;
2016-08-19 14:08:05 +01:00
import { Instagram } from './plugins/instagram' ;
2016-08-26 10:16:20 +01:00
import { IsDebug } from './plugins/is-debug' ;
2016-08-17 04:09:34 -03:00
import { Keyboard } from './plugins/keyboard' ;
import { LaunchNavigator } from './plugins/launchnavigator' ;
import { LocalNotifications } from './plugins/localnotifications' ;
import { MediaCapture } from './plugins/media-capture' ;
import { NativeAudio } from './plugins/native-audio' ;
2016-08-27 02:02:13 -04:00
import { NativePageTransitions } from './plugins/native-page-transitions' ;
2016-08-17 04:09:34 -03:00
import { NativeStorage } from './plugins/nativestorage' ;
2016-08-27 02:02:30 -04:00
import { Market } from './plugins/market' ;
2016-08-17 04:09:34 -03:00
import { MediaPlugin } from './plugins/media' ;
2016-08-27 02:05:35 -04:00
import { Mixpanel } from './plugins/mixpanel' ;
2016-08-17 04:09:34 -03:00
import { Network } from './plugins/network' ;
2016-08-27 02:03:06 -04:00
import { NFC } from './plugins/nfc' ;
2016-08-17 04:09:34 -03:00
import { OneSignal } from './plugins/onesignal' ;
2016-08-11 07:28:52 -04:00
import { PhotoViewer } from './plugins/photo-viewer' ;
2016-08-17 04:09:34 -03:00
import { ScreenOrientation } from './plugins/screen-orientation' ;
2016-08-27 02:04:11 -04:00
import { PayPal } from './plugins/pay-pal' ;
2016-08-17 04:09:34 -03:00
import { PinDialog } from './plugins/pin-dialog' ;
2016-08-27 02:02:23 -04:00
import { PowerManagement } from './plugins/power-management' ;
2016-08-17 04:09:34 -03:00
import { Printer } from './plugins/printer' ;
import { Push } from './plugins/push' ;
import { SafariViewController } from './plugins/safari-view-controller' ;
import { Screenshot } from './plugins/screenshot' ;
import { SecureStorage } from './plugins/securestorage' ;
import { Shake } from './plugins/shake' ;
import { Sim } from './plugins/sim' ;
import { SMS } from './plugins/sms' ;
import { SocialSharing } from './plugins/socialsharing' ;
import { SpinnerDialog } from './plugins/spinnerdialog' ;
import { Splashscreen } from './plugins/splashscreen' ;
import { SQLite } from './plugins/sqlite' ;
import { StatusBar } from './plugins/statusbar' ;
2016-08-27 02:01:59 -04:00
import { StreamingMedia } from './plugins/streaming-media' ;
2016-08-17 04:09:34 -03:00
import { ThreeDeeTouch } from './plugins/3dtouch' ;
import { Toast } from './plugins/toast' ;
import { TouchID } from './plugins/touchid' ;
import { TextToSpeech } from './plugins/text-to-speech' ;
import { TwitterConnect } from './plugins/twitter-connect' ;
import { Vibration } from './plugins/vibration' ;
2016-08-19 12:05:11 +01:00
import { VideoEditor } from './plugins/video-editor' ;
2016-08-17 04:09:34 -03:00
import { VideoPlayer } from './plugins/video-player' ;
import { WebIntent } from './plugins/webintent' ;
import { Zip } from './plugins/zip' ;
2016-06-09 21:47:27 -04:00
export * from './plugins/3dtouch' ;
2016-06-11 00:45:05 -04:00
export * from './plugins/background-geolocation' ;
export * from './plugins/backgroundmode' ;
export * from './plugins/batterystatus' ;
export * from './plugins/calendar' ;
export * from './plugins/camera' ;
export * from './plugins/card-io' ;
2016-08-26 11:06:26 -05:00
export * from './plugins/code-push' ;
2016-06-10 01:10:50 -04:00
export * from './plugins/contacts' ;
2016-06-11 00:45:05 -04:00
export * from './plugins/datepicker' ;
export * from './plugins/device' ;
export * from './plugins/devicemotion' ;
export * from './plugins/deviceorientation' ;
2016-08-26 07:54:52 -04:00
export * from './plugins/facebook' ;
2016-08-11 07:21:02 -04:00
export * from './plugins/file' ;
2016-07-11 22:53:35 +02:00
export * from './plugins/filetransfer' ;
2016-08-06 16:20:38 +09:00
export * from './plugins/geolocation' ;
2016-06-11 00:45:05 -04:00
export * from './plugins/googlemaps' ;
export * from './plugins/httpd' ;
2016-07-11 15:52:51 -05:00
export * from './plugins/ibeacon' ;
2016-06-11 00:45:05 -04:00
export * from './plugins/imagepicker' ;
2016-07-28 18:46:48 +02:00
export * from './plugins/imageresizer' ;
2016-06-11 00:45:05 -04:00
export * from './plugins/inappbrowser' ;
export * from './plugins/launchnavigator' ;
export * from './plugins/localnotifications' ;
2016-08-27 02:03:06 -04:00
export * from './plugins/nfc' ;
2016-06-11 00:45:05 -04:00
export * from './plugins/media' ;
2016-07-17 02:07:59 -04:00
export * from './plugins/media-capture' ;
2016-08-27 02:05:35 -04:00
export * from './plugins/mixpanel' ;
2016-08-27 02:04:11 -04:00
export * from './plugins/pay-pal' ;
2016-08-27 02:02:13 -04:00
export * from './plugins/native-page-transitions' ;
2016-06-15 11:39:01 -04:00
export * from './plugins/printer' ;
2016-06-11 00:45:05 -04:00
export * from './plugins/push' ;
export * from './plugins/safari-view-controller' ;
export * from './plugins/sms' ;
export * from './plugins/spinnerdialog' ;
2016-08-27 02:01:59 -04:00
export * from './plugins/streaming-media' ;
2016-06-11 00:45:05 -04:00
export * from './plugins/toast' ;
2016-07-23 07:01:02 -04:00
export * from './plugins/twitter-connect' ;
2016-08-19 12:05:11 +01:00
export * from './plugins/video-editor' ;
2016-08-04 23:57:44 +02:00
export * from './plugins/video-player' ;
2015-12-01 18:47:24 -06:00
export {
2016-08-26 11:06:26 -05:00
ActionSheet ,
AdMob ,
AndroidFingerprintAuth ,
AppAvailability ,
AppRate ,
AppVersion ,
Badge ,
BarcodeScanner ,
Base64ToGallery ,
BatteryStatus ,
Brightness ,
BLE ,
BluetoothSerial ,
2016-08-27 02:02:07 -04:00
CallNumber ,
2016-08-26 11:06:26 -05:00
CameraPreview ,
Clipboard ,
CodePush ,
Crop ,
DBMeter ,
Deeplinks ,
DeviceAccounts ,
Dialogs ,
Diagnostic ,
EmailComposer ,
EstimoteBeacons ,
File ,
Flashlight ,
Geofence ,
Globalization ,
GooglePlus ,
GoogleAnalytics ,
Hotspot ,
InAppPurchase ,
Insomnia ,
Instagram ,
Keyboard ,
NativeAudio ,
NativeStorage ,
Network ,
2016-08-27 02:02:30 -04:00
Market ,
2016-08-26 11:06:26 -05:00
OneSignal ,
PhotoViewer ,
ScreenOrientation ,
PinDialog ,
2016-08-27 02:02:23 -04:00
PowerManagement ,
2016-08-26 11:06:26 -05:00
Screenshot ,
SecureStorage ,
Shake ,
SocialSharing ,
Sim ,
Splashscreen ,
SQLite ,
StatusBar ,
TouchID ,
Transfer ,
TextToSpeech ,
Vibration ,
WebIntent ,
Zip
2015-12-01 18:47:24 -06:00
}
2016-03-10 10:29:03 -06:00
export * from './plugins/plugin' ;
2015-12-01 13:33:08 -06:00
// Window export to use outside of a module loading system
window [ 'IonicNative' ] = {
ActionSheet : ActionSheet ,
2016-04-29 17:17:30 -04:00
AdMob : AdMob ,
2016-07-23 07:13:35 -04:00
AndroidFingerprintAuth : AndroidFingerprintAuth ,
2016-03-12 18:04:30 -05:00
AppAvailability : AppAvailability ,
2016-03-04 15:42:21 -06:00
AppRate : AppRate ,
AppVersion : AppVersion ,
Badge : Badge ,
2016-05-15 03:15:51 +02:00
BackgroundGeolocation : BackgroundGeolocation ,
2016-07-11 17:22:45 -04:00
BackgroundMode : BackgroundMode ,
2016-03-12 18:04:30 -05:00
BarcodeScanner : BarcodeScanner ,
2016-03-13 16:08:15 -04:00
Base64ToGallery : Base64ToGallery ,
2016-03-12 18:04:30 -05:00
BatteryStatus : BatteryStatus ,
2016-06-11 23:16:41 +02:00
Brightness : Brightness ,
2015-12-01 13:33:08 -06:00
BLE : BLE ,
2016-04-29 15:13:07 -04:00
BluetoothSerial : BluetoothSerial ,
2015-12-01 13:33:08 -06:00
Calendar : Calendar ,
2016-08-27 02:02:07 -04:00
CallNumber : CallNumber ,
2016-03-12 18:04:30 -05:00
Camera : Camera ,
2016-07-17 10:50:18 +02:00
CameraPreview : CameraPreview ,
2016-06-09 10:18:53 -04:00
CardIO : CardIO ,
2016-03-04 15:42:21 -06:00
Clipboard : Clipboard ,
2016-08-26 11:06:26 -05:00
CodePush : CodePush ,
2015-12-01 18:47:24 -06:00
Contacts : Contacts ,
2016-07-28 12:45:37 -04:00
Crop : Crop ,
2016-03-04 15:42:21 -06:00
DatePicker : DatePicker ,
2016-03-13 16:08:15 -04:00
DBMeter : DBMeter ,
2016-06-09 15:37:40 -05:00
Deeplinks : Deeplinks ,
2015-12-01 13:33:08 -06:00
Device : Device ,
2016-04-29 13:09:13 -07:00
DeviceAccounts : DeviceAccounts ,
2016-03-12 18:04:30 -05:00
DeviceMotion : DeviceMotion ,
DeviceOrientation : DeviceOrientation ,
Dialogs : Dialogs ,
2016-03-28 20:24:05 -04:00
Diagnostic : Diagnostic ,
2016-04-05 21:55:24 +10:00
EmailComposer : EmailComposer ,
2016-07-27 10:07:33 +02:00
EstimoteBeacons : EstimoteBeacons ,
2015-12-01 13:33:08 -06:00
Facebook : Facebook ,
2016-03-18 23:27:20 +01:00
File : File ,
2016-03-12 18:04:30 -05:00
Flashlight : Flashlight ,
2016-08-26 05:06:36 -07:00
Geofence : Geofence ,
2015-12-01 13:33:08 -06:00
Geolocation : Geolocation ,
2016-03-13 04:08:39 -04:00
Globalization : Globalization ,
2016-06-09 10:27:07 -04:00
GooglePlus : GooglePlus ,
2016-08-26 11:06:26 -05:00
GoogleMap : GoogleMap ,
2016-04-16 17:13:40 +02:00
GoogleAnalytics : GoogleAnalytics ,
2016-03-13 17:25:26 -04:00
Hotspot : Hotspot ,
2016-06-11 00:33:02 -04:00
Httpd : Httpd ,
2016-07-11 15:52:51 -05:00
IBeacon : IBeacon ,
2016-03-12 18:04:30 -05:00
ImagePicker : ImagePicker ,
2016-07-28 18:46:48 +02:00
ImageResizer : ImageResizer ,
2016-03-25 17:43:11 -04:00
InAppBrowser : InAppBrowser ,
2016-08-26 08:18:43 -04:00
InAppPurchase : InAppPurchase ,
2016-08-19 14:08:05 +01:00
Instagram : Instagram ,
2016-08-26 10:16:20 +01:00
IsDebug : IsDebug ,
2016-03-13 16:08:15 -04:00
Keyboard : Keyboard ,
2016-03-12 18:04:30 -05:00
LaunchNavigator : LaunchNavigator ,
LocalNotifications : LocalNotifications ,
2016-08-27 02:02:30 -04:00
Market : Market ,
2016-07-17 02:07:59 -04:00
MediaCapture : MediaCapture ,
2016-04-27 09:54:14 -04:00
MediaPlugin : MediaPlugin ,
2016-08-27 02:05:35 -04:00
Mixpanel : Mixpanel ,
2016-08-15 03:58:20 -04:00
NativeAudio : NativeAudio ,
2016-08-27 02:02:13 -04:00
NativePageTransitions : NativePageTransitions ,
2016-07-17 02:32:19 -04:00
NativeStorage : NativeStorage ,
2016-03-27 20:56:16 -05:00
Network : Network ,
2016-08-27 02:04:11 -04:00
PayPal : PayPal ,
2016-08-27 02:03:06 -04:00
NFC : NFC ,
2016-06-15 11:39:01 -04:00
Printer : Printer ,
2015-12-01 18:47:24 -06:00
Push : Push ,
2016-07-07 19:19:00 +02:00
OneSignal : OneSignal ,
2016-08-11 07:28:52 -04:00
PhotoViewer : PhotoViewer ,
2016-07-31 20:32:34 +02:00
ScreenOrientation : ScreenOrientation ,
2016-07-15 00:44:03 -04:00
PinDialog : PinDialog ,
2016-08-27 02:02:23 -04:00
PowerManagement : PowerManagement ,
2016-06-09 10:18:53 -04:00
SafariViewController : SafariViewController ,
2016-04-28 22:06:21 -07:00
Screenshot : Screenshot ,
2016-07-23 05:45:53 -05:00
SecureStorage : SecureStorage ,
2016-08-15 03:58:34 -04:00
Shake : Shake ,
2016-07-17 12:56:41 +02:00
Sim : Sim ,
2016-03-12 18:04:30 -05:00
SMS : SMS ,
2016-03-25 20:13:07 -04:00
SocialSharing : SocialSharing ,
2016-03-24 14:09:52 -04:00
SpinnerDialog : SpinnerDialog ,
2016-03-13 16:08:15 -04:00
Splashscreen : Splashscreen ,
2016-05-16 08:34:01 +02:00
SQLite : SQLite ,
2015-12-01 13:33:08 -06:00
StatusBar : StatusBar ,
2016-08-27 02:01:59 -04:00
StreamingMedia : StreamingMedia ,
2016-06-09 21:47:27 -04:00
ThreeDeeTouch : ThreeDeeTouch ,
2015-12-01 19:06:38 -06:00
Toast : Toast ,
2016-03-13 17:25:26 -04:00
TouchID : TouchID ,
2016-05-01 21:56:55 -07:00
Transfer : Transfer ,
2016-08-15 23:29:51 +10:00
TextToSpeech : TextToSpeech ,
2016-07-20 05:55:20 -04:00
TwitterConnect : TwitterConnect ,
2016-08-19 12:05:11 +01:00
VideoEditor : VideoEditor ,
2016-08-04 23:57:44 +02:00
VideoPlayer : VideoPlayer ,
2016-04-04 00:11:13 -04:00
Vibration : Vibration ,
2016-08-15 05:10:43 -04:00
WebIntent : WebIntent ,
Zip : Zip
2016-03-06 15:27:26 -05:00
} ;
2015-12-01 13:33:08 -06:00
2016-06-09 11:24:38 -05:00
initAngular1 ( window [ 'IonicNative' ] ) ;
2015-11-29 17:20:11 -06:00
// To help developers using cordova, we listen for the device ready event and
// log an error if it didn't fire in a reasonable amount of time. Generally,
// when this happens, developers should remove and reinstall plugins, since
// an inconsistent plugin is often the culprit.
2015-11-30 13:27:25 -06:00
let before = + new Date ;
2015-11-29 16:30:15 -06:00
let didFireReady = false ;
2015-11-30 13:27:25 -06:00
document . addEventListener ( 'deviceready' , function ( ) {
2016-03-06 15:27:26 -05:00
console . log ( 'DEVICE READY FIRED AFTER' , ( + new Date - before ) , 'ms' ) ;
2015-11-29 16:30:15 -06:00
didFireReady = true ;
2016-03-06 15:27:26 -05:00
} ) ;
2015-11-29 16:30:15 -06:00
setTimeout ( function ( ) {
2016-04-29 23:56:49 -04:00
if ( ! didFireReady && window . cordova ) {
2015-11-29 16:30:15 -06:00
console . warn ( 'Native: deviceready did not fire within ' + DEVICE_READY_TIMEOUT + 'ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.' ) ;
}
} , DEVICE_READY_TIMEOUT ) ;