2015-12-02 03:33:08 +08:00
import { initAngular1 } from './ng1' ;
initAngular1 ( ) ;
2015-11-30 06:30:15 +08:00
const DEVICE_READY_TIMEOUT = 2000 ;
2015-12-02 03:33:08 +08:00
declare var window ;
import { ActionSheet } from './plugins/actionsheet' ;
2016-03-13 07:04:30 +08:00
import { AppAvailability } from './plugins/appavailability' ;
2016-03-05 05:42:21 +08:00
import { AppRate } from './plugins/apprate' ;
import { AppVersion } from './plugins/appversion' ;
import { Badge } from './plugins/badge' ;
2016-03-13 07:04:30 +08:00
import { BarcodeScanner } from './plugins/barcodescanner' ;
2016-03-14 04:08:15 +08:00
import { Base64ToGallery } from './plugins/base64togallery' ;
2016-03-13 07:04:30 +08:00
import { BatteryStatus } from './plugins/batterystatus' ;
2015-12-02 03:33:08 +08:00
import { BLE } from './plugins/ble' ;
import { Calendar } from './plugins/calendar' ;
2016-03-13 07:04:30 +08:00
import { Camera } from './plugins/camera' ;
2016-03-05 00:33:36 +08:00
import { Clipboard } from './plugins/clipboard' ;
2015-12-02 08:47:24 +08:00
import { Contacts } from './plugins/contacts' ;
2016-03-05 05:42:21 +08:00
import { DatePicker } from './plugins/datepicker' ;
2016-03-14 04:08:15 +08:00
import { DBMeter } from './plugins/dbmeter' ;
2015-12-02 03:33:08 +08:00
import { Device } from './plugins/device' ;
2016-03-13 07:04:30 +08:00
import { DeviceMotion } from './plugins/devicemotion' ;
import { DeviceOrientation } from './plugins/deviceorientation' ;
2016-03-29 08:24:05 +08:00
import { Diagnostic } from './plugins/diagnostic' ;
2016-03-13 07:04:30 +08:00
import { Dialogs } from './plugins/dialogs' ;
2016-04-05 19:55:24 +08:00
import { EmailComposer } from './plugins/emailcomposer' ;
2015-12-02 03:33:08 +08:00
import { Facebook } from './plugins/facebook' ;
2016-03-19 06:27:20 +08:00
import { File } from './plugins/file' ;
2016-03-13 07:04:30 +08:00
import { Flashlight } from './plugins/flashlight' ;
2015-12-02 03:33:08 +08:00
import { Geolocation } from './plugins/geolocation' ;
2016-03-13 16:08:39 +08:00
import { Globalization } from './plugins/globalization' ;
2016-04-16 23:13:40 +08:00
import { GoogleAnalytics } from './plugins/googleanalytics' ;
2016-03-14 05:25:26 +08:00
import { Hotspot } from './plugins/hotspot' ;
2016-03-13 07:04:30 +08:00
import { ImagePicker } from './plugins/imagepicker' ;
2016-03-26 05:43:11 +08:00
import { InAppBrowser } from './plugins/inappbrowser' ;
2016-03-14 04:08:15 +08:00
import { Keyboard } from './plugins/keyboard' ;
2016-03-13 07:04:30 +08:00
import { LaunchNavigator } from './plugins/launchnavigator' ;
import { LocalNotifications } from './plugins/localnotifications' ;
2016-03-28 09:56:16 +08:00
import { Network , Connection } from './plugins/network' ;
2015-12-02 08:47:24 +08:00
import { Push } from './plugins/push' ;
2016-04-29 13:06:21 +08:00
import { Screenshot } from './plugins/screenshot' ;
2016-03-13 07:04:30 +08:00
import { SMS } from './plugins/sms' ;
2016-03-26 08:13:07 +08:00
import { SocialSharing } from './plugins/socialsharing' ;
2016-03-25 02:09:52 +08:00
import { SpinnerDialog } from './plugins/spinnerdialog' ;
2016-03-14 04:08:15 +08:00
import { Splashscreen } from './plugins/splashscreen' ;
2015-12-02 03:33:08 +08:00
import { StatusBar } from './plugins/statusbar' ;
import { Toast } from './plugins/toast' ;
2015-12-02 09:06:38 +08:00
import { TouchID } from './plugins/touchid' ;
2016-03-14 05:25:26 +08:00
import { Vibration } from './plugins/vibration' ;
2016-04-04 12:11:13 +08:00
import { WebIntent } from './plugins/webintent' ;
2015-12-02 03:33:08 +08:00
2015-12-02 08:47:24 +08:00
export {
ActionSheet ,
2016-03-13 07:04:30 +08:00
AppAvailability ,
2016-03-05 05:42:21 +08:00
AppRate ,
AppVersion ,
Badge ,
2016-03-13 07:04:30 +08:00
BarcodeScanner ,
2016-03-14 04:08:15 +08:00
Base64ToGallery ,
2016-03-13 07:04:30 +08:00
BatteryStatus ,
2015-12-02 08:47:24 +08:00
BLE ,
Calendar ,
2016-03-13 07:04:30 +08:00
Camera ,
2016-03-05 00:33:36 +08:00
Clipboard ,
2016-03-28 09:56:16 +08:00
Connection ,
2015-12-02 08:47:24 +08:00
Contacts ,
2016-03-05 05:42:21 +08:00
DatePicker ,
2016-03-14 04:08:15 +08:00
DBMeter ,
2015-12-02 08:47:24 +08:00
Device ,
2016-03-13 07:04:30 +08:00
DeviceMotion ,
DeviceOrientation ,
Dialogs ,
2016-03-29 08:24:05 +08:00
Diagnostic ,
2016-04-05 19:55:24 +08:00
EmailComposer ,
2015-12-02 08:47:24 +08:00
Facebook ,
2016-03-19 06:27:20 +08:00
File ,
2016-03-13 07:04:30 +08:00
Flashlight ,
2015-12-02 08:47:24 +08:00
Geolocation ,
2016-03-13 16:08:39 +08:00
Globalization ,
2016-04-16 23:13:40 +08:00
GoogleAnalytics ,
2016-03-14 05:25:26 +08:00
Hotspot ,
2016-03-13 07:04:30 +08:00
ImagePicker ,
2016-03-26 05:43:11 +08:00
InAppBrowser ,
2016-03-14 04:08:15 +08:00
Keyboard ,
2016-03-13 07:04:30 +08:00
LaunchNavigator ,
LocalNotifications ,
2016-03-28 09:56:16 +08:00
Network ,
2015-12-02 08:47:24 +08:00
Push ,
2016-04-29 13:06:21 +08:00
Screenshot ,
2016-03-13 07:04:30 +08:00
SMS ,
2016-03-26 08:13:07 +08:00
SocialSharing ,
2016-03-25 02:09:52 +08:00
SpinnerDialog ,
2016-03-14 04:08:15 +08:00
Splashscreen ,
2015-12-02 08:47:24 +08:00
StatusBar ,
2015-12-02 09:06:38 +08:00
Toast ,
2016-03-14 05:25:26 +08:00
TouchID ,
2016-04-04 12:11:13 +08:00
Vibration ,
WebIntent
2015-12-02 08:47:24 +08:00
}
2016-03-11 00:29:03 +08:00
export * from './plugins/plugin' ;
2015-12-02 03:33:08 +08:00
// Window export to use outside of a module loading system
window [ 'IonicNative' ] = {
ActionSheet : ActionSheet ,
2016-03-13 07:04:30 +08:00
AppAvailability : AppAvailability ,
2016-03-05 05:42:21 +08:00
AppRate : AppRate ,
AppVersion : AppVersion ,
Badge : Badge ,
2016-03-13 07:04:30 +08:00
BarcodeScanner : BarcodeScanner ,
2016-03-14 04:08:15 +08:00
Base64ToGallery : Base64ToGallery ,
2016-03-13 07:04:30 +08:00
BatteryStatus : BatteryStatus ,
2015-12-02 03:33:08 +08:00
BLE : BLE ,
Calendar : Calendar ,
2016-03-13 07:04:30 +08:00
Camera : Camera ,
2016-03-05 05:42:21 +08:00
Clipboard : Clipboard ,
2016-03-28 09:56:16 +08:00
Connection : Connection ,
2015-12-02 08:47:24 +08:00
Contacts : Contacts ,
2016-03-05 05:42:21 +08:00
DatePicker : DatePicker ,
2016-03-14 04:08:15 +08:00
DBMeter : DBMeter ,
2015-12-02 03:33:08 +08:00
Device : Device ,
2016-03-13 07:04:30 +08:00
DeviceMotion : DeviceMotion ,
DeviceOrientation : DeviceOrientation ,
Dialogs : Dialogs ,
2016-03-29 08:24:05 +08:00
Diagnostic : Diagnostic ,
2016-04-05 19:55:24 +08:00
EmailComposer : EmailComposer ,
2015-12-02 03:33:08 +08:00
Facebook : Facebook ,
2016-03-19 06:27:20 +08:00
File : File ,
2016-03-13 07:04:30 +08:00
Flashlight : Flashlight ,
2015-12-02 03:33:08 +08:00
Geolocation : Geolocation ,
2016-03-13 16:08:39 +08:00
Globalization : Globalization ,
2016-04-16 23:13:40 +08:00
GoogleAnalytics : GoogleAnalytics ,
2016-03-14 05:25:26 +08:00
Hotspot : Hotspot ,
2016-03-13 07:04:30 +08:00
ImagePicker : ImagePicker ,
2016-03-26 05:43:11 +08:00
InAppBrowser : InAppBrowser ,
2016-03-14 04:08:15 +08:00
Keyboard : Keyboard ,
2016-03-13 07:04:30 +08:00
LaunchNavigator : LaunchNavigator ,
LocalNotifications : LocalNotifications ,
2016-03-28 09:56:16 +08:00
Network : Network ,
2015-12-02 08:47:24 +08:00
Push : Push ,
2016-04-29 13:06:21 +08:00
Screenshot : Screenshot ,
2016-03-13 07:04:30 +08:00
SMS : SMS ,
2016-03-26 08:13:07 +08:00
SocialSharing : SocialSharing ,
2016-03-25 02:09:52 +08:00
SpinnerDialog : SpinnerDialog ,
2016-03-14 04:08:15 +08:00
Splashscreen : Splashscreen ,
2015-12-02 03:33:08 +08:00
StatusBar : StatusBar ,
2015-12-02 09:06:38 +08:00
Toast : Toast ,
2016-03-14 05:25:26 +08:00
TouchID : TouchID ,
2016-04-04 12:11:13 +08:00
Vibration : Vibration ,
WebIntent : WebIntent
2016-03-07 04:27:26 +08:00
} ;
2015-12-02 03:33:08 +08:00
2015-11-30 07:20:11 +08: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-12-01 03:27:25 +08:00
let before = + new Date ;
2015-11-30 06:30:15 +08:00
let didFireReady = false ;
2015-12-01 03:27:25 +08:00
document . addEventListener ( 'deviceready' , function ( ) {
2016-03-07 04:27:26 +08:00
console . log ( 'DEVICE READY FIRED AFTER' , ( + new Date - before ) , 'ms' ) ;
2015-11-30 06:30:15 +08:00
didFireReady = true ;
2016-03-07 04:27:26 +08:00
} ) ;
2015-11-30 06:30:15 +08: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 ) ;