2015-12-01 13:33:08 -06:00
import { initAngular1 } from './ng1' ;
initAngular1 ( ) ;
2015-11-29 16:30:15 -06:00
const DEVICE_READY_TIMEOUT = 2000 ;
2015-12-01 13:33:08 -06:00
declare var window ;
import { ActionSheet } from './plugins/actionsheet' ;
2016-04-29 17:17:30 -04:00
import { AdMob } from './plugins/admob' ;
2016-03-12 18:04:30 -05:00
import { AppAvailability } from './plugins/appavailability' ;
2016-03-04 15:42:21 -06:00
import { AppRate } from './plugins/apprate' ;
import { AppVersion } from './plugins/appversion' ;
import { Badge } from './plugins/badge' ;
2016-03-12 18:04:30 -05:00
import { BarcodeScanner } from './plugins/barcodescanner' ;
2016-03-13 16:08:15 -04:00
import { Base64ToGallery } from './plugins/base64togallery' ;
2016-03-12 18:04:30 -05:00
import { BatteryStatus } from './plugins/batterystatus' ;
2015-12-01 13:33:08 -06:00
import { BLE } from './plugins/ble' ;
2016-04-29 15:13:07 -04:00
import { BluetoothSerial } from './plugins/bluetoothserial' ;
2015-12-01 13:33:08 -06:00
import { Calendar } from './plugins/calendar' ;
2016-03-12 18:04:30 -05:00
import { Camera } from './plugins/camera' ;
2016-03-04 10:33:36 -06:00
import { Clipboard } from './plugins/clipboard' ;
2015-12-01 18:47:24 -06:00
import { Contacts } from './plugins/contacts' ;
2016-03-04 15:42:21 -06:00
import { DatePicker } from './plugins/datepicker' ;
2016-03-13 16:08:15 -04:00
import { DBMeter } from './plugins/dbmeter' ;
2015-12-01 13:33:08 -06:00
import { Device } from './plugins/device' ;
2016-04-29 13:09:13 -07:00
import { DeviceAccounts } from './plugins/deviceaccounts' ;
2016-03-12 18:04:30 -05:00
import { DeviceMotion } from './plugins/devicemotion' ;
import { DeviceOrientation } from './plugins/deviceorientation' ;
2016-03-28 20:24:05 -04:00
import { Diagnostic } from './plugins/diagnostic' ;
2016-03-12 18:04:30 -05:00
import { Dialogs } from './plugins/dialogs' ;
2016-04-05 21:55:24 +10:00
import { EmailComposer } from './plugins/emailcomposer' ;
2015-12-01 13:33:08 -06:00
import { Facebook } from './plugins/facebook' ;
2016-03-18 23:27:20 +01:00
import { File } from './plugins/file' ;
2016-03-12 18:04:30 -05:00
import { Flashlight } from './plugins/flashlight' ;
2015-12-01 13:33:08 -06:00
import { Geolocation } from './plugins/geolocation' ;
2016-03-13 04:08:39 -04:00
import { Globalization } from './plugins/globalization' ;
2016-03-29 06:50:03 -04:00
import { GoogleMaps } from './plugins/googlemaps' ;
2016-04-16 17:13:40 +02:00
import { GoogleAnalytics } from './plugins/googleanalytics' ;
2016-03-13 17:25:26 -04:00
import { Hotspot } from './plugins/hotspot' ;
2016-03-12 18:04:30 -05:00
import { ImagePicker } from './plugins/imagepicker' ;
2016-03-25 17:43:11 -04:00
import { InAppBrowser } from './plugins/inappbrowser' ;
2016-03-13 16:08:15 -04:00
import { Keyboard } from './plugins/keyboard' ;
2016-03-12 18:04:30 -05:00
import { LaunchNavigator } from './plugins/launchnavigator' ;
import { LocalNotifications } from './plugins/localnotifications' ;
2016-04-27 09:54:14 -04:00
import { MediaPlugin } from './plugins/media' ;
2016-03-27 20:56:16 -05:00
import { Network , Connection } from './plugins/network' ;
2015-12-01 18:47:24 -06:00
import { Push } from './plugins/push' ;
2016-04-28 22:06:21 -07:00
import { Screenshot } from './plugins/screenshot' ;
2016-03-12 18:04:30 -05:00
import { SMS } from './plugins/sms' ;
2016-03-25 20:13:07 -04:00
import { SocialSharing } from './plugins/socialsharing' ;
2016-03-24 14:09:52 -04:00
import { SpinnerDialog } from './plugins/spinnerdialog' ;
2016-03-13 16:08:15 -04:00
import { Splashscreen } from './plugins/splashscreen' ;
2016-03-29 06:50:03 -04:00
import { SQLite } from './plugins/sqlite' ;
2015-12-01 13:33:08 -06:00
import { StatusBar } from './plugins/statusbar' ;
import { Toast } from './plugins/toast' ;
2015-12-01 19:06:38 -06:00
import { TouchID } from './plugins/touchid' ;
2016-03-13 17:25:26 -04:00
import { Vibration } from './plugins/vibration' ;
2016-04-04 00:11:13 -04:00
import { WebIntent } from './plugins/webintent' ;
2015-12-01 13:33:08 -06:00
2015-12-01 18:47:24 -06:00
export {
ActionSheet ,
2016-04-29 17:17:30 -04:00
AdMob ,
2016-03-12 18:04:30 -05:00
AppAvailability ,
2016-03-04 15:42:21 -06:00
AppRate ,
AppVersion ,
Badge ,
2016-03-12 18:04:30 -05:00
BarcodeScanner ,
2016-03-13 16:08:15 -04:00
Base64ToGallery ,
2016-03-12 18:04:30 -05:00
BatteryStatus ,
2015-12-01 18:47:24 -06:00
BLE ,
2016-04-29 15:13:07 -04:00
BluetoothSerial ,
2015-12-01 18:47:24 -06:00
Calendar ,
2016-03-12 18:04:30 -05:00
Camera ,
2016-03-04 10:33:36 -06:00
Clipboard ,
2016-03-27 20:56:16 -05:00
Connection ,
2015-12-01 18:47:24 -06:00
Contacts ,
2016-03-04 15:42:21 -06:00
DatePicker ,
2016-03-13 16:08:15 -04:00
DBMeter ,
2015-12-01 18:47:24 -06:00
Device ,
2016-04-29 13:09:13 -07:00
DeviceAccounts ,
2016-03-12 18:04:30 -05:00
DeviceMotion ,
DeviceOrientation ,
Dialogs ,
2016-03-28 20:24:05 -04:00
Diagnostic ,
2016-04-05 21:55:24 +10:00
EmailComposer ,
2015-12-01 18:47:24 -06:00
Facebook ,
2016-03-18 23:27:20 +01:00
File ,
2016-03-12 18:04:30 -05:00
Flashlight ,
2015-12-01 18:47:24 -06:00
Geolocation ,
2016-03-13 04:08:39 -04:00
Globalization ,
2016-03-29 06:50:03 -04:00
GoogleMaps ,
2016-04-16 17:13:40 +02:00
GoogleAnalytics ,
2016-03-13 17:25:26 -04:00
Hotspot ,
2016-03-12 18:04:30 -05:00
ImagePicker ,
2016-03-25 17:43:11 -04:00
InAppBrowser ,
2016-03-13 16:08:15 -04:00
Keyboard ,
2016-03-12 18:04:30 -05:00
LaunchNavigator ,
LocalNotifications ,
2016-04-27 09:54:14 -04:00
MediaPlugin ,
2016-03-27 20:56:16 -05:00
Network ,
2015-12-01 18:47:24 -06:00
Push ,
2016-04-28 22:06:21 -07:00
Screenshot ,
2016-03-12 18:04:30 -05:00
SMS ,
2016-03-25 20:13:07 -04:00
SocialSharing ,
2016-03-24 14:09:52 -04:00
SpinnerDialog ,
2016-03-13 16:08:15 -04:00
Splashscreen ,
2016-03-29 06:50:03 -04:00
SQLite ,
2015-12-01 18:47:24 -06:00
StatusBar ,
2015-12-01 19:06:38 -06:00
Toast ,
2016-03-13 17:25:26 -04:00
TouchID ,
2016-04-04 00:11:13 -04:00
Vibration ,
WebIntent
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-03-12 18:04:30 -05:00
AppAvailability : AppAvailability ,
2016-03-04 15:42:21 -06:00
AppRate : AppRate ,
AppVersion : AppVersion ,
Badge : Badge ,
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 ,
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-03-12 18:04:30 -05:00
Camera : Camera ,
2016-03-04 15:42:21 -06:00
Clipboard : Clipboard ,
2016-03-27 20:56:16 -05:00
Connection : Connection ,
2015-12-01 18:47:24 -06:00
Contacts : Contacts ,
2016-03-04 15:42:21 -06:00
DatePicker : DatePicker ,
2016-03-13 16:08:15 -04:00
DBMeter : DBMeter ,
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 ,
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 ,
2015-12-01 13:33:08 -06:00
Geolocation : Geolocation ,
2016-03-13 04:08:39 -04:00
Globalization : Globalization ,
2016-03-29 06:50:03 -04:00
GoogleMaps : GoogleMaps ,
2016-04-16 17:13:40 +02:00
GoogleAnalytics : GoogleAnalytics ,
2016-03-13 17:25:26 -04:00
Hotspot : Hotspot ,
2016-03-12 18:04:30 -05:00
ImagePicker : ImagePicker ,
2016-03-25 17:43:11 -04:00
InAppBrowser : InAppBrowser ,
2016-03-13 16:08:15 -04:00
Keyboard : Keyboard ,
2016-03-12 18:04:30 -05:00
LaunchNavigator : LaunchNavigator ,
LocalNotifications : LocalNotifications ,
2016-04-27 09:54:14 -04:00
MediaPlugin : MediaPlugin ,
2016-03-27 20:56:16 -05:00
Network : Network ,
2015-12-01 18:47:24 -06:00
Push : Push ,
2016-04-28 22:06:21 -07:00
Screenshot : Screenshot ,
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-03-29 06:50:03 -04:00
SQLite : SQLite ,
2015-12-01 13:33:08 -06:00
StatusBar : StatusBar ,
2015-12-01 19:06:38 -06:00
Toast : Toast ,
2016-03-13 17:25:26 -04:00
TouchID : TouchID ,
2016-04-04 00:11:13 -04:00
Vibration : Vibration ,
WebIntent : WebIntent
2016-03-06 15:27:26 -05:00
} ;
2015-12-01 13:33:08 -06:00
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 ( ) {
if ( ! didFireReady && window . cordova ) {
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 ) ;