├── .eslintrc ├── .gitignore ├── build ├── favicon.ico └── manifest.json ├── config.xml ├── hooks └── README.md ├── package-lock.json ├── package.json ├── platforms └── android │ ├── .gitignore │ ├── CordovaLib │ ├── AndroidManifest.xml │ ├── build.gradle │ ├── cordova.gradle │ ├── project.properties │ └── src │ │ └── org │ │ └── apache │ │ └── cordova │ │ ├── AuthenticationToken.java │ │ ├── BuildHelper.java │ │ ├── CallbackContext.java │ │ ├── CallbackMap.java │ │ ├── Config.java │ │ ├── ConfigXmlParser.java │ │ ├── CordovaActivity.java │ │ ├── CordovaArgs.java │ │ ├── CordovaBridge.java │ │ ├── CordovaClientCertRequest.java │ │ ├── CordovaDialogsHelper.java │ │ ├── CordovaHttpAuthHandler.java │ │ ├── CordovaInterface.java │ │ ├── CordovaInterfaceImpl.java │ │ ├── CordovaPlugin.java │ │ ├── CordovaPreferences.java │ │ ├── CordovaResourceApi.java │ │ ├── CordovaWebView.java │ │ ├── CordovaWebViewEngine.java │ │ ├── CordovaWebViewImpl.java │ │ ├── CoreAndroid.java │ │ ├── ExposedJsApi.java │ │ ├── ICordovaClientCertRequest.java │ │ ├── ICordovaCookieManager.java │ │ ├── ICordovaHttpAuthHandler.java │ │ ├── LOG.java │ │ ├── NativeToJsMessageQueue.java │ │ ├── PermissionHelper.java │ │ ├── PluginEntry.java │ │ ├── PluginManager.java │ │ ├── PluginResult.java │ │ ├── ResumeCallback.java │ │ ├── Whitelist.java │ │ └── engine │ │ ├── SystemCookieManager.java │ │ ├── SystemExposedJsApi.java │ │ ├── SystemWebChromeClient.java │ │ ├── SystemWebView.java │ │ ├── SystemWebViewClient.java │ │ └── SystemWebViewEngine.java │ ├── android.json │ ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ └── www │ │ │ ├── asset-manifest.json │ │ │ ├── cordova-js-src │ │ │ ├── android │ │ │ │ ├── nativeapiprovider.js │ │ │ │ └── promptbasednativeapi.js │ │ │ ├── exec.js │ │ │ ├── platform.js │ │ │ └── plugin │ │ │ │ └── android │ │ │ │ └── app.js │ │ │ ├── cordova.js │ │ │ ├── cordova_plugins.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ ├── plugins │ │ │ ├── cordova-plugin-badge │ │ │ │ └── www │ │ │ │ │ └── badge.js │ │ │ ├── cordova-plugin-device │ │ │ │ └── www │ │ │ │ │ └── device.js │ │ │ └── cordova-plugin-local-notification │ │ │ │ └── www │ │ │ │ ├── local-notification-core.js │ │ │ │ ├── local-notification-util.js │ │ │ │ └── local-notification.js │ │ │ ├── precache-manifest.7274ceb960f6e4c5b64994547d47f262.js │ │ │ ├── service-worker.js │ │ │ └── static │ │ │ ├── css │ │ │ ├── main.2cce8147.chunk.css │ │ │ └── main.2cce8147.chunk.css.map │ │ │ ├── js │ │ │ ├── 2.b41502e9.chunk.js │ │ │ ├── 2.b41502e9.chunk.js.map │ │ │ ├── main.ef5e34d6.chunk.js │ │ │ ├── main.ef5e34d6.chunk.js.map │ │ │ ├── runtime~main.d653cc00.js │ │ │ └── runtime~main.d653cc00.js.map │ │ │ └── media │ │ │ └── logo.5d5d9eef.svg │ │ ├── java │ │ ├── de │ │ │ └── appplant │ │ │ │ └── cordova │ │ │ │ └── plugin │ │ │ │ ├── badge │ │ │ │ ├── Badge.java │ │ │ │ └── BadgeImpl.java │ │ │ │ ├── localnotification │ │ │ │ ├── ClearReceiver.java │ │ │ │ ├── ClickReceiver.java │ │ │ │ ├── LocalNotification.java │ │ │ │ └── TriggerReceiver.java │ │ │ │ └── notification │ │ │ │ ├── Builder.java │ │ │ │ ├── Manager.java │ │ │ │ ├── Notification.java │ │ │ │ ├── Options.java │ │ │ │ ├── Request.java │ │ │ │ ├── action │ │ │ │ ├── Action.java │ │ │ │ └── ActionGroup.java │ │ │ │ ├── receiver │ │ │ │ ├── AbstractClearReceiver.java │ │ │ │ ├── AbstractClickReceiver.java │ │ │ │ └── AbstractTriggerReceiver.java │ │ │ │ ├── trigger │ │ │ │ ├── DateTrigger.java │ │ │ │ ├── IntervalTrigger.java │ │ │ │ └── MatchTrigger.java │ │ │ │ └── util │ │ │ │ ├── AssetProvider.java │ │ │ │ └── AssetUtil.java │ │ └── org │ │ │ └── apache │ │ │ └── cordova │ │ │ ├── cordovareact │ │ │ └── MainActivity.java │ │ │ ├── device │ │ │ └── Device.java │ │ │ └── whitelist │ │ │ └── WhitelistPlugin.java │ │ └── res │ │ ├── drawable-land-hdpi │ │ └── screen.png │ │ ├── drawable-land-ldpi │ │ └── screen.png │ │ ├── drawable-land-mdpi │ │ └── screen.png │ │ ├── drawable-land-xhdpi │ │ └── screen.png │ │ ├── drawable-land-xxhdpi │ │ └── screen.png │ │ ├── drawable-land-xxxhdpi │ │ └── screen.png │ │ ├── drawable-port-hdpi │ │ └── screen.png │ │ ├── drawable-port-ldpi │ │ └── screen.png │ │ ├── drawable-port-mdpi │ │ └── screen.png │ │ ├── drawable-port-xhdpi │ │ └── screen.png │ │ ├── drawable-port-xxhdpi │ │ └── screen.png │ │ ├── drawable-port-xxxhdpi │ │ └── screen.png │ │ ├── mipmap-hdpi-v26 │ │ ├── ic_launcher.xml │ │ ├── ic_launcher_background.png │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-ldpi-v26 │ │ ├── ic_launcher.xml │ │ ├── ic_launcher_background.png │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-ldpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi-v26 │ │ ├── ic_launcher.xml │ │ ├── ic_launcher_background.png │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi-v26 │ │ ├── ic_launcher.xml │ │ ├── ic_launcher_background.png │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi-v26 │ │ ├── ic_launcher.xml │ │ ├── ic_launcher_background.png │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi-v26 │ │ ├── ic_launcher.xml │ │ ├── ic_launcher_background.png │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values │ │ └── strings.xml │ │ └── xml │ │ ├── config.xml │ │ └── localnotification_provider_paths.xml │ ├── build.gradle │ ├── cordova-plugin-badge │ └── cordovareact-badge.gradle │ ├── cordova-plugin-local-notification │ └── cordovareact-localnotification.gradle │ ├── cordova │ ├── Api.js │ ├── android_sdk_version │ ├── android_sdk_version.bat │ ├── build │ ├── build.bat │ ├── check_reqs │ ├── check_reqs.bat │ ├── clean │ ├── clean.bat │ ├── defaults.xml │ ├── lib │ │ ├── Adb.js │ │ ├── AndroidManifest.js │ │ ├── AndroidProject.js │ │ ├── android_sdk.js │ │ ├── build.js │ │ ├── builders │ │ │ ├── ProjectBuilder.js │ │ │ └── builders.js │ │ ├── check_reqs.js │ │ ├── config │ │ │ └── GradlePropertiesParser.js │ │ ├── device.js │ │ ├── emulator.js │ │ ├── getASPath.bat │ │ ├── install-device │ │ ├── install-device.bat │ │ ├── install-emulator │ │ ├── install-emulator.bat │ │ ├── list-devices │ │ ├── list-devices.bat │ │ ├── list-emulator-images │ │ ├── list-emulator-images.bat │ │ ├── list-started-emulators │ │ ├── list-started-emulators.bat │ │ ├── log.js │ │ ├── plugin-build.gradle │ │ ├── pluginHandlers.js │ │ ├── prepare.js │ │ ├── retry.js │ │ ├── run.js │ │ ├── start-emulator │ │ └── start-emulator.bat │ ├── log │ ├── log.bat │ ├── loggingHelper.js │ ├── run │ ├── run.bat │ ├── version │ └── version.bat │ ├── gradle.properties │ ├── platform_www │ ├── cordova-js-src │ │ ├── android │ │ │ ├── nativeapiprovider.js │ │ │ └── promptbasednativeapi.js │ │ ├── exec.js │ │ ├── platform.js │ │ └── plugin │ │ │ └── android │ │ │ └── app.js │ ├── cordova.js │ ├── cordova_plugins.js │ └── plugins │ │ ├── cordova-plugin-badge │ │ └── www │ │ │ └── badge.js │ │ ├── cordova-plugin-device │ │ └── www │ │ │ └── device.js │ │ └── cordova-plugin-local-notification │ │ └── www │ │ ├── local-notification-core.js │ │ ├── local-notification-util.js │ │ └── local-notification.js │ ├── project.properties │ ├── settings.gradle │ └── wrapper.gradle ├── plugins ├── android.json ├── cordova-plugin-badge │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── images │ │ ├── android.png │ │ ├── ios-permission.png │ │ ├── ios.png │ │ ├── osx-badge.png │ │ ├── osx-circular.png │ │ ├── osx-download.png │ │ └── windows.png │ ├── package.json │ ├── plugin.xml │ ├── src │ │ ├── android │ │ │ ├── Badge.java │ │ │ ├── BadgeImpl.java │ │ │ └── badge.gradle │ │ ├── browser │ │ │ ├── BadgeProxy.js │ │ │ └── favico.min.js │ │ ├── ios │ │ │ ├── APPBadge.h │ │ │ └── APPBadge.m │ │ ├── osx │ │ │ ├── APPBadge.h │ │ │ ├── APPBadge.m │ │ │ ├── DockCircularProgressBar.h │ │ │ ├── DockCircularProgressBar.mm │ │ │ ├── DockDownloadProgressBar.h │ │ │ └── DockDownloadProgressBar.mm │ │ └── windows │ │ │ └── BadgeProxy.js │ ├── tests │ │ ├── plugin.xml │ │ └── tests.js │ └── www │ │ └── badge.js ├── cordova-plugin-device │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── RELEASENOTES.md │ ├── package.json │ ├── plugin.xml │ ├── src │ │ ├── android │ │ │ └── Device.java │ │ ├── browser │ │ │ └── DeviceProxy.js │ │ ├── ios │ │ │ ├── CDVDevice.h │ │ │ └── CDVDevice.m │ │ ├── osx │ │ │ ├── CDVDevice.h │ │ │ └── CDVDevice.m │ │ └── windows │ │ │ └── DeviceProxy.js │ ├── tests │ │ ├── package.json │ │ ├── plugin.xml │ │ └── tests.js │ ├── types │ │ └── index.d.ts │ └── www │ │ └── device.js ├── cordova-plugin-local-notification │ ├── CHANGELOG.md │ ├── ISSUE_TEMPLATE.md │ ├── LICENSE │ ├── README.md │ ├── images │ │ ├── android-actions.png │ │ ├── android-chat.png │ │ ├── android-inbox.png │ │ ├── android-progress.png │ │ ├── android-reply-2.png │ │ ├── android-reply.png │ │ ├── android-stack.png │ │ ├── ios-actions.png │ │ ├── ios-basic.png │ │ ├── ios-permission.png │ │ ├── logo.png │ │ └── windows-actions.png │ ├── package.json │ ├── plugin.xml │ ├── src │ │ ├── android │ │ │ ├── ClearReceiver.java │ │ │ ├── ClickReceiver.java │ │ │ ├── LocalNotification.java │ │ │ ├── RestoreReceiver.java │ │ │ ├── TriggerReceiver.java │ │ │ ├── build │ │ │ │ └── localnotification.gradle │ │ │ ├── notification │ │ │ │ ├── Builder.java │ │ │ │ ├── Manager.java │ │ │ │ ├── Notification.java │ │ │ │ ├── Options.java │ │ │ │ ├── Request.java │ │ │ │ ├── action │ │ │ │ │ ├── Action.java │ │ │ │ │ └── ActionGroup.java │ │ │ │ ├── receiver │ │ │ │ │ ├── AbstractClearReceiver.java │ │ │ │ │ ├── AbstractClickReceiver.java │ │ │ │ │ ├── AbstractRestoreReceiver.java │ │ │ │ │ └── AbstractTriggerReceiver.java │ │ │ │ ├── trigger │ │ │ │ │ ├── DateTrigger.java │ │ │ │ │ ├── IntervalTrigger.java │ │ │ │ │ └── MatchTrigger.java │ │ │ │ └── util │ │ │ │ │ ├── AssetProvider.java │ │ │ │ │ └── AssetUtil.java │ │ │ └── xml │ │ │ │ └── localnotification_provider_paths.xml │ │ ├── ios │ │ │ ├── APPLocalNotification.h │ │ │ ├── APPLocalNotification.m │ │ │ ├── APPNotificationContent.h │ │ │ ├── APPNotificationContent.m │ │ │ ├── APPNotificationOptions.h │ │ │ ├── APPNotificationOptions.m │ │ │ ├── UNNotificationRequest+APPLocalNotification.h │ │ │ ├── UNNotificationRequest+APPLocalNotification.m │ │ │ ├── UNUserNotificationCenter+APPLocalNotification.h │ │ │ └── UNUserNotificationCenter+APPLocalNotification.m │ │ └── windows │ │ │ ├── LocalNotificationProxy.js │ │ │ ├── LocalNotificationProxy │ │ │ ├── LocalNotificationProxy.sln │ │ │ └── LocalNotificationProxy │ │ │ │ ├── LocalNotification │ │ │ │ ├── Builder.cs │ │ │ │ ├── Manager.cs │ │ │ │ ├── Notification.cs │ │ │ │ ├── Options.cs │ │ │ │ ├── Request.cs │ │ │ │ ├── Toast │ │ │ │ │ ├── Button.cs │ │ │ │ │ ├── Every.cs │ │ │ │ │ ├── IAction.cs │ │ │ │ │ ├── Input.cs │ │ │ │ │ ├── ProgressBar.cs │ │ │ │ │ └── Trigger.cs │ │ │ │ └── Trigger │ │ │ │ │ ├── DateTrigger.cs │ │ │ │ │ ├── IntervalTrigger.cs │ │ │ │ │ └── MatchTrigger.cs │ │ │ │ ├── LocalNotificationProxy.cs │ │ │ │ ├── LocalNotificationProxy.csproj │ │ │ │ └── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Microsoft.Toolkit.Uwp.Notifications.Shared │ │ │ ├── Adaptive │ │ │ │ ├── AdaptiveGroup.cs │ │ │ │ ├── AdaptiveHelper.cs │ │ │ │ ├── AdaptiveImage.cs │ │ │ │ ├── AdaptiveImageEnums.cs │ │ │ │ ├── AdaptiveProgressBar.cs │ │ │ │ ├── AdaptiveProgressBarBindableProperty.cs │ │ │ │ ├── AdaptiveProgressBarValue.cs │ │ │ │ ├── AdaptiveSubgroup.cs │ │ │ │ ├── AdaptiveSubgroupEnums.cs │ │ │ │ ├── AdaptiveText.cs │ │ │ │ ├── AdaptiveTextBindableProperty.cs │ │ │ │ ├── AdaptiveTextEnums.cs │ │ │ │ ├── BaseImageHelper.cs │ │ │ │ ├── BaseTextHelper.cs │ │ │ │ ├── BindableValues │ │ │ │ │ ├── BindableProgressBarValue.cs │ │ │ │ │ └── BindableString.cs │ │ │ │ ├── Elements │ │ │ │ │ ├── Element_AdaptiveGroup.cs │ │ │ │ │ ├── Element_AdaptiveImage.cs │ │ │ │ │ ├── Element_AdaptiveImageEnums.cs │ │ │ │ │ ├── Element_AdaptiveProgressBar.cs │ │ │ │ │ ├── Element_AdaptiveSubgroup.cs │ │ │ │ │ └── Element_AdaptiveText.cs │ │ │ │ ├── IAdaptiveChild.cs │ │ │ │ ├── IAdaptiveSubgroupChild.cs │ │ │ │ ├── IBaseImage.cs │ │ │ │ └── IBaseText.cs │ │ │ ├── Badges │ │ │ │ ├── BadgeGlyphContent.cs │ │ │ │ ├── BadgeGlyphValue.cs │ │ │ │ └── BadgeNumericContent.cs │ │ │ ├── Common │ │ │ │ ├── ArgumentValidator.cs │ │ │ │ ├── BaseElement.cs │ │ │ │ ├── EnumStringAttribute.cs │ │ │ │ ├── INotificationContent.cs │ │ │ │ ├── LimitedList{T}.cs │ │ │ │ ├── NotificationContentValidationException.cs │ │ │ │ ├── NotificationXmlAttributeAttribute.cs │ │ │ │ ├── NotificationXmlContentAttribute.cs │ │ │ │ ├── NotificationXmlElementAttribute.cs │ │ │ │ └── XmlWriterHelper.cs │ │ │ ├── GenerateNugetPackage.bat │ │ │ ├── Microsoft.Toolkit.Uwp.Notifications.Shared.projitems │ │ │ ├── Microsoft.Toolkit.Uwp.Notifications.Shared.shproj │ │ │ ├── Tiles │ │ │ │ ├── Elements │ │ │ │ │ ├── Element_Tile.cs │ │ │ │ │ ├── Element_TileBinding.cs │ │ │ │ │ ├── Element_TileVisual.cs │ │ │ │ │ └── TileElementsCommon.cs │ │ │ │ ├── ITileBindingContentAdaptiveChild.cs │ │ │ │ ├── SpecialTemplates │ │ │ │ │ ├── TileBindingContentContact.cs │ │ │ │ │ ├── TileBindingContentIconic.cs │ │ │ │ │ ├── TileBindingContentPeople.cs │ │ │ │ │ └── TileBindingContentPhotos.cs │ │ │ │ ├── TileBackgroundImage.cs │ │ │ │ ├── TileBasicImage.cs │ │ │ │ ├── TileBasicText.cs │ │ │ │ ├── TileBinding.cs │ │ │ │ ├── TileBindingContentAdaptive.cs │ │ │ │ ├── TileBranding.cs │ │ │ │ ├── TileCommon.cs │ │ │ │ ├── TileContent.cs │ │ │ │ ├── TileImages.cs │ │ │ │ ├── TilePeekImage.cs │ │ │ │ ├── TileSizeToAdaptiveTemplateConverter.cs │ │ │ │ ├── TileTemplateNameV3.cs │ │ │ │ ├── TileTextStacking.cs │ │ │ │ └── TileVisual.cs │ │ │ ├── Toasts │ │ │ │ ├── Elements │ │ │ │ │ ├── Element_Toast.cs │ │ │ │ │ ├── Element_ToastAction.cs │ │ │ │ │ ├── Element_ToastActions.cs │ │ │ │ │ ├── Element_ToastAudio.cs │ │ │ │ │ ├── Element_ToastBinding.cs │ │ │ │ │ ├── Element_ToastHeader.cs │ │ │ │ │ ├── Element_ToastImage.cs │ │ │ │ │ ├── Element_ToastInput.cs │ │ │ │ │ ├── Element_ToastSelection.cs │ │ │ │ │ ├── Element_ToastText.cs │ │ │ │ │ ├── Element_ToastVisual.cs │ │ │ │ │ └── IElement_ToastActivatable.cs │ │ │ │ ├── IToastActions.cs │ │ │ │ ├── IToastBindingGenericChild.cs │ │ │ │ ├── IToastButton.cs │ │ │ │ ├── IToastInput.cs │ │ │ │ ├── ToastActionsCustom.cs │ │ │ │ ├── ToastActionsSnoozeAndDismiss.cs │ │ │ │ ├── ToastActivationOptions.cs │ │ │ │ ├── ToastAudio.cs │ │ │ │ ├── ToastBindingGeneric.cs │ │ │ │ ├── ToastButton.cs │ │ │ │ ├── ToastButtonDismiss.cs │ │ │ │ ├── ToastButtonSnooze.cs │ │ │ │ ├── ToastCommon.cs │ │ │ │ ├── ToastContent.cs │ │ │ │ ├── ToastContextMenuItem.cs │ │ │ │ ├── ToastGenericAppLogo.cs │ │ │ │ ├── ToastGenericAppLogoEnums.cs │ │ │ │ ├── ToastGenericAttributionText.cs │ │ │ │ ├── ToastGenericHeroImage.cs │ │ │ │ ├── ToastHeader.cs │ │ │ │ ├── ToastSelectionBox.cs │ │ │ │ ├── ToastSelectionBoxItem.cs │ │ │ │ ├── ToastTextBox.cs │ │ │ │ └── ToastVisual.cs │ │ │ └── readme.md │ │ │ ├── Microsoft.Toolkit.Uwp.Notifications.UWP │ │ │ ├── Microsoft.Toolkit.Uwp.Notifications.UWP.csproj │ │ │ ├── Microsoft.Toolkit.Uwp.Notifications.UWP.nuget.props │ │ │ ├── Microsoft.Toolkit.Uwp.Notifications.UWP.nuget.targets │ │ │ ├── Microsoft.Toolkit.Uwp.Notifications.UWP.ruleset │ │ │ ├── Properties │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ └── Microsoft.Toolkit.Uwp.Notifications.rd.xml │ │ │ ├── project.json │ │ │ └── project.lock.json │ │ │ └── lib.UW │ │ │ ├── ARM │ │ │ └── LocalNotificationProxy.winmd │ │ │ ├── x64 │ │ │ └── LocalNotificationProxy.winmd │ │ │ └── x86 │ │ │ └── LocalNotificationProxy.winmd │ └── www │ │ ├── local-notification-core.js │ │ ├── local-notification-util.js │ │ └── local-notification.js ├── cordova-plugin-whitelist │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── RELEASENOTES.md │ ├── package.json │ ├── plugin.xml │ ├── src │ │ └── android │ │ │ └── WhitelistPlugin.java │ └── tests │ │ ├── README.md │ │ ├── package.json │ │ ├── plugin.xml │ │ ├── scripts │ │ └── remove-access.js │ │ ├── src │ │ └── android │ │ │ └── WhitelistAPI.java │ │ ├── tests.js │ │ └── www │ │ └── whitelist.js └── fetch.json ├── public ├── favicon.ico ├── index.html └── manifest.json ├── scripts ├── exec.js ├── postbuild.js └── prebuild.js ├── src ├── App.css ├── App.js ├── App.test.js ├── index.css ├── index.js ├── logo.svg └── serviceWorker.js └── www ├── asset-manifest.json ├── favicon.ico ├── index.html ├── manifest.json ├── precache-manifest.7274ceb960f6e4c5b64994547d47f262.js ├── service-worker.js └── static ├── css ├── main.2cce8147.chunk.css └── main.2cce8147.chunk.css.map ├── js ├── 2.b41502e9.chunk.js ├── 2.b41502e9.chunk.js.map ├── main.ef5e34d6.chunk.js ├── main.ef5e34d6.chunk.js.map ├── runtime~main.d653cc00.js └── runtime~main.d653cc00.js.map └── media └── logo.5d5d9eef.svg /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb", 3 | "env": { 4 | "browser": true 5 | }, 6 | "globals": { 7 | "cordova": true 8 | }, 9 | "rules": { 10 | "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], 11 | "no-console": "off" 12 | } 13 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/build/favicon.ico -------------------------------------------------------------------------------- /build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cordovaReactApp 4 | 5 | 6 | A sample Apache Cordova application that responds to the deviceready event. 7 | 8 | 9 | Apache Cordova Team 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /hooks/README.md: -------------------------------------------------------------------------------- 1 | 21 | # Cordova Hooks 22 | 23 | Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide. 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "org.apache.cordova.cordovareact", 3 | "displayName": "cordovaReactApp", 4 | "version": "1.0.0", 5 | "homepage": "./", 6 | "description": "A sample Apache Cordova application that responds to the deviceready event.", 7 | "main": "index.js", 8 | "scripts": { 9 | "start": "react-scripts start", 10 | "build": "react-scripts build && node scripts/postbuild.js", 11 | "test": "react-scripts test", 12 | "eject": "react-scripts eject" 13 | }, 14 | "keywords": [ 15 | "ecosystem:cordova" 16 | ], 17 | "dependencies": { 18 | "cordova-android": "^8.0.0", 19 | "cordova-plugin-badge": "0.8.8", 20 | "cordova-plugin-device": "2.0.3", 21 | "cordova-plugin-local-notification": "0.9.0-beta.2", 22 | "react": "^16.8.6", 23 | "react-dom": "^16.8.6", 24 | "react-scripts": "^3.0.1", 25 | "rimraf": "^2.6.3" 26 | }, 27 | "devDependencies": { 28 | "cordova-plugin-whitelist": "^1.3.4", 29 | "eslint": "^5.3.0", 30 | "eslint-config-airbnb": "^17.1.1", 31 | "eslint-plugin-import": "^2.18.0", 32 | "eslint-plugin-jsx-a11y": "^6.2.3", 33 | "eslint-plugin-react": "^7.14.2" 34 | }, 35 | "author": "Apache Cordova Team", 36 | "license": "Apache-2.0", 37 | "browserslist": { 38 | "production": [ 39 | ">0.2%", 40 | "not dead", 41 | "not op_mini all" 42 | ], 43 | "development": [ 44 | "last 1 chrome version", 45 | "last 1 firefox version", 46 | "last 1 safari version" 47 | ] 48 | }, 49 | "cordova": { 50 | "plugins": { 51 | "cordova-plugin-whitelist": {}, 52 | "cordova-plugin-local-notification": {} 53 | }, 54 | "platforms": [ 55 | "android" 56 | ] 57 | } 58 | } -------------------------------------------------------------------------------- /platforms/android/.gitignore: -------------------------------------------------------------------------------- 1 | # Non-project-specific build files: 2 | build.xml 3 | local.properties 4 | /gradlew 5 | /gradlew.bat 6 | /gradle 7 | # Ant builds 8 | ant-build 9 | ant-gen 10 | # Eclipse builds 11 | gen 12 | out 13 | # Gradle build artifacts 14 | .gradle 15 | .gradletasknamecache 16 | /build 17 | /CordovaLib/build 18 | /app/build 19 | gradle-app.setting 20 | # Android Studio 21 | .idea 22 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/project.properties: -------------------------------------------------------------------------------- 1 | # This file was originally created by the Android Tools, but is now 2 | # used by cordova-android to manage the project configuration. 3 | 4 | # Indicates whether an apk should be generated for each density. 5 | split.density=false 6 | 7 | # Project target. 8 | target=android-28 9 | apk-configurations= 10 | renderscript.opt.level=O0 11 | android.library=true 12 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/org/apache/cordova/CordovaHttpAuthHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import android.webkit.HttpAuthHandler; 22 | 23 | /** 24 | * Specifies interface for HTTP auth handler object which is used to handle auth requests and 25 | * specifying user credentials. 26 | */ 27 | public class CordovaHttpAuthHandler implements ICordovaHttpAuthHandler { 28 | 29 | private final HttpAuthHandler handler; 30 | 31 | public CordovaHttpAuthHandler(HttpAuthHandler handler) { 32 | this.handler = handler; 33 | } 34 | 35 | /** 36 | * Instructs the WebView to cancel the authentication request. 37 | */ 38 | public void cancel () { 39 | this.handler.cancel(); 40 | } 41 | 42 | /** 43 | * Instructs the WebView to proceed with the authentication with the given credentials. 44 | * 45 | * @param username 46 | * @param password 47 | */ 48 | public void proceed (String username, String password) { 49 | this.handler.proceed(username, password); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/org/apache/cordova/ExposedJsApi.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | import org.json.JSONException; 23 | 24 | /* 25 | * Any exposed Javascript API MUST implement these three things! 26 | */ 27 | public interface ExposedJsApi { 28 | public String exec(int bridgeSecret, String service, String action, String callbackId, String arguments) throws JSONException, IllegalAccessException; 29 | public void setNativeToJsBridgeMode(int bridgeSecret, int value) throws IllegalAccessException; 30 | public String retrieveJsMessages(int bridgeSecret, boolean fromOnlineEvent) throws IllegalAccessException; 31 | } 32 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/org/apache/cordova/ICordovaCookieManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | public interface ICordovaCookieManager { 23 | 24 | public void setCookiesEnabled(boolean accept); 25 | 26 | public void setCookie(final String url, final String value); 27 | 28 | public String getCookie(final String url); 29 | 30 | public void clearCookies(); 31 | 32 | public void flush(); 33 | }; 34 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/org/apache/cordova/ICordovaHttpAuthHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | /** 22 | * Specifies interface for HTTP auth handler object which is used to handle auth requests and 23 | * specifying user credentials. 24 | */ 25 | public interface ICordovaHttpAuthHandler { 26 | /** 27 | * Instructs the WebView to cancel the authentication request. 28 | */ 29 | public void cancel (); 30 | 31 | /** 32 | * Instructs the WebView to proceed with the authentication with the given credentials. 33 | * 34 | * @param username The user name 35 | * @param password The password 36 | */ 37 | public void proceed (String username, String password); 38 | } -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": { 3 | "main.css": "./static/css/main.2cce8147.chunk.css", 4 | "main.js": "./static/js/main.ef5e34d6.chunk.js", 5 | "main.js.map": "./static/js/main.ef5e34d6.chunk.js.map", 6 | "runtime~main.js": "./static/js/runtime~main.d653cc00.js", 7 | "runtime~main.js.map": "./static/js/runtime~main.d653cc00.js.map", 8 | "static/js/2.b41502e9.chunk.js": "./static/js/2.b41502e9.chunk.js", 9 | "static/js/2.b41502e9.chunk.js.map": "./static/js/2.b41502e9.chunk.js.map", 10 | "index.html": "./index.html", 11 | "precache-manifest.7274ceb960f6e4c5b64994547d47f262.js": "./precache-manifest.7274ceb960f6e4c5b64994547d47f262.js", 12 | "service-worker.js": "./service-worker.js", 13 | "static/css/main.2cce8147.chunk.css.map": "./static/css/main.2cce8147.chunk.css.map", 14 | "static/media/logo.svg": "./static/media/logo.5d5d9eef.svg" 15 | } 16 | } -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/cordova-js-src/android/nativeapiprovider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Exports the ExposedJsApi.java object if available, otherwise exports the PromptBasedNativeApi. 22 | */ 23 | 24 | var nativeApi = this._cordovaNative || require('cordova/android/promptbasednativeapi'); 25 | var currentApi = nativeApi; 26 | 27 | module.exports = { 28 | get: function() { return currentApi; }, 29 | setPreferPrompt: function(value) { 30 | currentApi = value ? require('cordova/android/promptbasednativeapi') : nativeApi; 31 | }, 32 | // Used only by tests. 33 | set: function(value) { 34 | currentApi = value; 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/cordova-js-src/android/promptbasednativeapi.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Implements the API of ExposedJsApi.java, but uses prompt() to communicate. 22 | * This is used pre-JellyBean, where addJavascriptInterface() is disabled. 23 | */ 24 | 25 | module.exports = { 26 | exec: function(bridgeSecret, service, action, callbackId, argsJson) { 27 | return prompt(argsJson, 'gap:'+JSON.stringify([bridgeSecret, service, action, callbackId])); 28 | }, 29 | setNativeToJsBridgeMode: function(bridgeSecret, value) { 30 | prompt(value, 'gap_bridge_mode:' + bridgeSecret); 31 | }, 32 | retrieveJsMessages: function(bridgeSecret, fromOnlineEvent) { 33 | return prompt(+fromOnlineEvent, 'gap_poll:' + bridgeSecret); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = [ 3 | { 4 | "id": "cordova-plugin-device.device", 5 | "file": "plugins/cordova-plugin-device/www/device.js", 6 | "pluginId": "cordova-plugin-device", 7 | "clobbers": [ 8 | "device" 9 | ] 10 | }, 11 | { 12 | "id": "cordova-plugin-badge.Badge", 13 | "file": "plugins/cordova-plugin-badge/www/badge.js", 14 | "pluginId": "cordova-plugin-badge", 15 | "clobbers": [ 16 | "cordova.plugins.notification.badge" 17 | ] 18 | }, 19 | { 20 | "id": "cordova-plugin-local-notification.LocalNotification", 21 | "file": "plugins/cordova-plugin-local-notification/www/local-notification.js", 22 | "pluginId": "cordova-plugin-local-notification", 23 | "clobbers": [ 24 | "cordova.plugins.notification.local" 25 | ] 26 | }, 27 | { 28 | "id": "cordova-plugin-local-notification.LocalNotification.Core", 29 | "file": "plugins/cordova-plugin-local-notification/www/local-notification-core.js", 30 | "pluginId": "cordova-plugin-local-notification", 31 | "clobbers": [ 32 | "cordova.plugins.notification.local.core", 33 | "plugin.notification.local.core" 34 | ] 35 | }, 36 | { 37 | "id": "cordova-plugin-local-notification.LocalNotification.Util", 38 | "file": "plugins/cordova-plugin-local-notification/www/local-notification-util.js", 39 | "pluginId": "cordova-plugin-local-notification", 40 | "merges": [ 41 | "cordova.plugins.notification.local.core", 42 | "plugin.notification.local.core" 43 | ] 44 | } 45 | ]; 46 | module.exports.metadata = { 47 | "cordova-plugin-whitelist": "1.3.4", 48 | "cordova-plugin-device": "2.0.3", 49 | "cordova-plugin-badge": "0.8.8", 50 | "cordova-plugin-local-notification": "0.9.0-beta.2" 51 | }; 52 | }); -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/assets/www/favicon.ico -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/precache-manifest.7274ceb960f6e4c5b64994547d47f262.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = (self.__precacheManifest || []).concat([ 2 | { 3 | "revision": "d728aaed7c6c7b1703b693d6cdaae96e", 4 | "url": "./index.html" 5 | }, 6 | { 7 | "revision": "0485c792df730c2d80b8", 8 | "url": "./static/css/main.2cce8147.chunk.css" 9 | }, 10 | { 11 | "revision": "2e0129063922e3bb197a", 12 | "url": "./static/js/2.b41502e9.chunk.js" 13 | }, 14 | { 15 | "revision": "0485c792df730c2d80b8", 16 | "url": "./static/js/main.ef5e34d6.chunk.js" 17 | }, 18 | { 19 | "revision": "8c97409f0ee389fe75da", 20 | "url": "./static/js/runtime~main.d653cc00.js" 21 | }, 22 | { 23 | "revision": "5d5d9eefa31e5e13a6610d9fa7a283bb", 24 | "url": "./static/media/logo.5d5d9eef.svg" 25 | } 26 | ]); -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); 15 | 16 | importScripts( 17 | "./precache-manifest.7274ceb960f6e4c5b64994547d47f262.js" 18 | ); 19 | 20 | self.addEventListener('message', (event) => { 21 | if (event.data && event.data.type === 'SKIP_WAITING') { 22 | self.skipWaiting(); 23 | } 24 | }); 25 | 26 | workbox.core.clientsClaim(); 27 | 28 | /** 29 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 30 | * requests for URLs in the manifest. 31 | * See https://goo.gl/S9QRab 32 | */ 33 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 34 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 35 | 36 | workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("./index.html"), { 37 | 38 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 39 | }); 40 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/static/css/main.2cce8147.chunk.css: -------------------------------------------------------------------------------- 1 | body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{text-align:center}.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite;height:40vmin;pointer-events:none}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} 2 | /*# sourceMappingURL=main.2cce8147.chunk.css.map */ -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/static/css/main.2cce8147.chunk.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.css","App.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mIAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,uEAEF,CCZA,KACE,iBACF,CAEA,UACE,mDAA4C,CAA5C,2CAA4C,CAC5C,aAAc,CACd,mBACF,CAEA,YACE,wBAAyB,CACzB,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BAA6B,CAC7B,UACF,CAEA,UACE,aACF,CAEA,iCACE,GACE,8BAAuB,CAAvB,sBACF,CACA,GACE,+BAAyB,CAAzB,uBACF,CACF,CAPA,yBACE,GACE,8BAAuB,CAAvB,sBACF,CACA,GACE,+BAAyB,CAAzB,uBACF,CACF","file":"main.2cce8147.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\",\n \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\n monospace;\n}\n",".App {\n text-align: center;\n}\n\n.App-logo {\n animation: App-logo-spin infinite 20s linear;\n height: 40vmin;\n pointer-events: none;\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n"]} -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/static/js/main.ef5e34d6.chunk.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,function(e,n,t){e.exports=t.p+"static/media/logo.5d5d9eef.svg"},function(e,n,t){e.exports=t(12)},,,,,,function(e,n,t){},function(e,n,t){},function(e,n,t){"use strict";t.r(n);var o=t(0),a=t.n(o),r=t(2),c=t.n(r),i=(t(10),t(3)),l=t.n(i);t(11);var s=function(){return a.a.createElement("div",{className:"App"},a.a.createElement("header",{className:"App-header"},a.a.createElement("img",{src:l.a,className:"App-logo",alt:"logo"}),a.a.createElement("p",null,"Edit ",a.a.createElement("code",null,"src/App.js")," and save to reload."),a.a.createElement("a",{className:"App-link",href:"https://reactjs.org",target:"_blank",rel:"noopener noreferrer"},"Learn React")))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var d=function(){c.a.render(a.a.createElement(s,null),document.getElementById("root"))};window.cordova?document.addEventListener("deviceready",function(){d(),window.cordova.plugins.notification.local.schedule({title:"Sample notification",text:"It works",foreground:!0})},!1):d(),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()})}],[[4,1,2]]]); 2 | //# sourceMappingURL=main.ef5e34d6.chunk.js.map -------------------------------------------------------------------------------- /platforms/android/app/src/main/assets/www/static/js/runtime~main.d653cc00.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c in config.xml 39 | loadUrl(launchUrl); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-land-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-land-hdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-land-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-land-ldpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-land-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-land-mdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-land-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-land-xhdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-land-xxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-land-xxhdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-land-xxxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-land-xxxhdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-port-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-port-hdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-port-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-port-ldpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-port-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-port-mdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-port-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-port-xhdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-port-xxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-port-xxhdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/drawable-port-xxxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/drawable-port-xxxhdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher_background.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher_foreground.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-ldpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-ldpi-v26/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-ldpi-v26/ic_launcher_background.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-ldpi-v26/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-ldpi-v26/ic_launcher_foreground.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher_background.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher_foreground.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_background.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_foreground.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher_background.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher_foreground.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_background.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_foreground.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cordovaReactApp 4 | @string/app_name 5 | @string/launcher_name 6 | 7 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/xml/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | cordovaReactApp 17 | 18 | 19 | A sample Apache Cordova application that responds to the deviceready event. 20 | 21 | 22 | Apache Cordova Team 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /platforms/android/app/src/main/res/xml/localnotification_provider_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /platforms/android/build.gradle: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | */ 18 | 19 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 20 | 21 | buildscript { 22 | repositories { 23 | google() 24 | jcenter() 25 | } 26 | 27 | dependencies { 28 | // NOTE: Do not place your application dependencies here; they belong 29 | // in the individual module build.gradle files 30 | 31 | classpath 'com.android.tools.build:gradle:3.3.0' 32 | } 33 | } 34 | 35 | allprojects { 36 | repositories { 37 | google() 38 | jcenter() 39 | } 40 | 41 | //This replaces project.properties w.r.t. build settings 42 | project.ext { 43 | defaultBuildToolsVersion="28.0.3" //String 44 | defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4 45 | defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default 46 | defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default 47 | } 48 | } 49 | 50 | task clean(type: Delete) { 51 | delete rootProject.buildDir 52 | } 53 | -------------------------------------------------------------------------------- /platforms/android/cordova-plugin-badge/cordovareact-badge.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file contains Original Code and/or Modifications of Original Code 3 | * as defined in and that are subject to the Apache License 4 | * Version 2.0 (the 'License'). You may not use this file except in 5 | * compliance with the License. Please obtain a copy of the License at 6 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 7 | * file. 8 | * 9 | * The Original Code and all software distributed under the License are 10 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 11 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 12 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 13 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 14 | * Please see the License for the specific language governing rights and 15 | * limitations under the License. 16 | */ 17 | 18 | repositories { 19 | mavenCentral() 20 | } 21 | 22 | if (!project.ext.has('appShortcutBadgerVersion')) { 23 | ext.appShortcutBadgerVersion = '1.1.22' 24 | } 25 | 26 | if (!project.ext.has('appShortcutBadgerCustom')) { 27 | dependencies { 28 | compile "me.leolin:ShortcutBadger:${appShortcutBadgerVersion}@aar" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /platforms/android/cordova-plugin-local-notification/cordovareact-localnotification.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file contains Original Code and/or Modifications of Original Code 3 | * as defined in and that are subject to the Apache License 4 | * Version 2.0 (the 'License'). You may not use this file except in 5 | * compliance with the License. Please obtain a copy of the License at 6 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 7 | * file. 8 | * 9 | * The Original Code and all software distributed under the License are 10 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 11 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 12 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 13 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 14 | * Please see the License for the specific language governing rights and 15 | * limitations under the License. 16 | */ 17 | 18 | repositories { 19 | mavenCentral() 20 | jcenter() 21 | maven { 22 | url "https://maven.google.com" 23 | } 24 | } 25 | 26 | if (!project.ext.has('appShortcutBadgerVersion')) { 27 | ext.appShortcutBadgerVersion = '1.1.19' 28 | } 29 | 30 | dependencies { 31 | compile "me.leolin:ShortcutBadger:${appShortcutBadgerVersion}@aar" 32 | } 33 | -------------------------------------------------------------------------------- /platforms/android/cordova/android_sdk_version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var android_sdk = require('./lib/android_sdk'); 23 | 24 | android_sdk.print_newest_available_sdk_target().done(null, function (err) { 25 | console.error(err); 26 | process.exit(2); 27 | }); 28 | -------------------------------------------------------------------------------- /platforms/android/cordova/android_sdk_version.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0android_sdk_version" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'android_sdk_version' script in 'bin' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /platforms/android/cordova/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var args = process.argv; 23 | var Api = require('./Api'); 24 | var nopt = require('nopt'); 25 | var path = require('path'); 26 | 27 | // Support basic help commands 28 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[2]) >= 0) { 29 | require('./lib/build').help(); 30 | } 31 | 32 | // Do some basic argument parsing 33 | var buildOpts = nopt({ 34 | 'verbose': Boolean, 35 | 'silent': Boolean, 36 | 'debug': Boolean, 37 | 'release': Boolean, 38 | 'nobuild': Boolean, 39 | 'buildConfig': path 40 | }, { 'd': '--verbose' }); 41 | 42 | // Make buildOptions compatible with PlatformApi build method spec 43 | buildOpts.argv = buildOpts.argv.original; 44 | 45 | require('./loggingHelper').adjustLoggerLevel(buildOpts); 46 | 47 | new Api().build(buildOpts) 48 | .catch(function (err) { 49 | console.error(err.stack); 50 | process.exit(2); 51 | }); 52 | -------------------------------------------------------------------------------- /platforms/android/cordova/build.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0build" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'build' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/check_reqs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var check_reqs = require('./lib/check_reqs'); 23 | 24 | check_reqs.run().done( 25 | function success () { 26 | console.log('Looks like your environment fully supports cordova-android development!'); 27 | }, 28 | function fail (err) { 29 | console.log(err); 30 | process.exit(2); 31 | } 32 | ); 33 | -------------------------------------------------------------------------------- /platforms/android/cordova/check_reqs.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0check_reqs" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'check_reqs' script in 'bin' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /platforms/android/cordova/clean: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var Api = require('./Api'); 23 | var path = require('path'); 24 | var nopt = require('nopt'); 25 | 26 | // Support basic help commands 27 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) { 28 | console.log('Usage: ' + path.relative(process.cwd(), process.argv[1])); 29 | console.log('Cleans the project directory.'); 30 | process.exit(0); 31 | } 32 | 33 | // Do some basic argument parsing 34 | var opts = nopt({ 35 | 'verbose': Boolean, 36 | 'silent': Boolean 37 | }, { 'd': '--verbose' }); 38 | 39 | // Make buildOptions compatible with PlatformApi clean method spec 40 | opts.argv = opts.argv.original; 41 | 42 | // Skip cleaning prepared files when not invoking via cordova CLI. 43 | opts.noPrepare = true; 44 | 45 | require('./loggingHelper').adjustLoggerLevel(opts); 46 | 47 | new Api().clean(opts) 48 | .catch(function (err) { 49 | console.error(err.stack); 50 | process.exit(2); 51 | }); 52 | -------------------------------------------------------------------------------- /platforms/android/cordova/clean.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0clean" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'clean' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/builders/builders.js: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | const CordovaError = require('cordova-common').CordovaError; 21 | 22 | /** 23 | * Helper method that instantiates and returns a builder for specified build type. 24 | * 25 | * @return {Builder} A builder instance for specified build type. 26 | */ 27 | module.exports.getBuilder = function () { 28 | try { 29 | const Builder = require('./ProjectBuilder'); 30 | return new Builder(); 31 | } catch (err) { 32 | throw new CordovaError('Failed to instantiate ProjectBuilder builder: ' + err); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/getASPath.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | for /f "tokens=2*" %%a in ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Android Studio" /v Path') do set "ASPath=%%~b" 3 | ECHO %ASPath% -------------------------------------------------------------------------------- /platforms/android/cordova/lib/install-device: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var device = require('./device'); 23 | var args = process.argv; 24 | 25 | if (args.length > 2) { 26 | var install_target; 27 | if (args[2].substring(0, 9) === '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | device.install(install_target).catch(function (err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | } else { 34 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 35 | process.exit(2); 36 | } 37 | } else { 38 | device.install().catch(function (err) { 39 | console.error('ERROR: ' + err); 40 | process.exit(2); 41 | }); 42 | } 43 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/install-device.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0install-device" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'install-device' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/lib/install-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulator = require('./emulator'); 23 | var args = process.argv; 24 | 25 | var install_target; 26 | if (args.length > 2) { 27 | if (args[2].substring(0, 9) === '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | } else { 30 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 31 | process.exit(2); 32 | } 33 | } 34 | 35 | emulator.install(install_target).catch(function (err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/install-emulator.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0install-emulator" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'install-emulator' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-devices: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var devices = require('./device'); 23 | 24 | // Usage support for when args are given 25 | require('./check_reqs').check_android().then(function () { 26 | devices.list().then(function (device_list) { 27 | device_list && device_list.forEach(function (dev) { 28 | console.log(dev); 29 | }); 30 | }, function (err) { 31 | console.error('ERROR: ' + err); 32 | process.exit(2); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-devices.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-devices" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-devices' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-emulator-images: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulators = require('./emulator'); 23 | 24 | // Usage support for when args are given 25 | require('./check_reqs').check_android().then(function () { 26 | emulators.list_images().then(function (emulator_list) { 27 | emulator_list && emulator_list.forEach(function (emu) { 28 | console.log(emu.name); 29 | }); 30 | }, function (err) { 31 | console.error('ERROR: ' + err); 32 | process.exit(2); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-emulator-images.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-emulator-images" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-emulator-images' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-started-emulators: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulators = require('./emulator'); 23 | 24 | // Usage support for when args are given 25 | require('./check_reqs').check_android().then(function () { 26 | emulators.list_started().then(function (emulator_list) { 27 | emulator_list && emulator_list.forEach(function (emu) { 28 | console.log(emu); 29 | }); 30 | }, function (err) { 31 | console.error('ERROR: ' + err); 32 | process.exit(2); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-started-emulators.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-started-emulators" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-started-emulators' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/lib/start-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulator = require('./emulator'); 23 | var args = process.argv; 24 | 25 | var install_target; 26 | if (args.length > 2) { 27 | if (args[2].substring(0, 9) === '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | } else { 30 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 31 | process.exit(2); 32 | } 33 | } 34 | 35 | emulator.start(install_target).catch(function (err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/start-emulator.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0start-emulator" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/log: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var log = require('./lib/log'); 23 | var reqs = require('./lib/check_reqs'); 24 | var args = process.argv; 25 | 26 | // Usage support for when args are given 27 | if (args.length > 2) { 28 | log.help(); 29 | } else { 30 | reqs.run().done(function () { 31 | return log.run(); 32 | }, function (err) { 33 | console.error('ERROR: ' + err); 34 | process.exit(2); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /platforms/android/cordova/log.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0log" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'log' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/loggingHelper.js: -------------------------------------------------------------------------------- 1 | var CordovaLogger = require('cordova-common').CordovaLogger; 2 | 3 | module.exports = { 4 | adjustLoggerLevel: function (opts) { 5 | if (opts instanceof Array) { 6 | opts.silent = opts.indexOf('--silent') !== -1; 7 | opts.verbose = opts.indexOf('--verbose') !== -1; 8 | } 9 | 10 | if (opts.silent) { 11 | CordovaLogger.get().setLevel('error'); 12 | } 13 | 14 | if (opts.verbose) { 15 | CordovaLogger.get().setLevel('verbose'); 16 | } 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /platforms/android/cordova/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var Api = require('./Api'); 23 | var nopt = require('nopt'); 24 | var path = require('path'); 25 | 26 | // Support basic help commands 27 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) { 28 | require('./lib/run').help(); 29 | } 30 | 31 | // Do some basic argument parsing 32 | var runOpts = nopt({ 33 | 'verbose': Boolean, 34 | 'silent': Boolean, 35 | 'debug': Boolean, 36 | 'release': Boolean, 37 | 'nobuild': Boolean, 38 | 'buildConfig': path, 39 | 'archs': String, 40 | 'device': Boolean, 41 | 'emulator': Boolean, 42 | 'target': String 43 | }, { 'd': '--verbose' }); 44 | 45 | // Make runOptions compatible with PlatformApi run method spec 46 | runOpts.argv = runOpts.argv.remain; 47 | 48 | require('./loggingHelper').adjustLoggerLevel(runOpts); 49 | 50 | new Api().run(runOpts) 51 | .catch(function (err) { 52 | console.error(err, err.stack); 53 | process.exit(2); 54 | }); 55 | -------------------------------------------------------------------------------- /platforms/android/cordova/run.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0run" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'run' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | // Coho updates this line: 23 | var VERSION = "8.0.0"; 24 | 25 | module.exports.version = VERSION; 26 | 27 | if (!module.parent) { 28 | console.log(VERSION); 29 | } 30 | -------------------------------------------------------------------------------- /platforms/android/cordova/version.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0version" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'version' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /platforms/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.daemon=true 2 | org.gradle.jvmargs=-Xmx2048m 3 | android.useDeprecatedNdk=true -------------------------------------------------------------------------------- /platforms/android/platform_www/cordova-js-src/android/nativeapiprovider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Exports the ExposedJsApi.java object if available, otherwise exports the PromptBasedNativeApi. 22 | */ 23 | 24 | var nativeApi = this._cordovaNative || require('cordova/android/promptbasednativeapi'); 25 | var currentApi = nativeApi; 26 | 27 | module.exports = { 28 | get: function() { return currentApi; }, 29 | setPreferPrompt: function(value) { 30 | currentApi = value ? require('cordova/android/promptbasednativeapi') : nativeApi; 31 | }, 32 | // Used only by tests. 33 | set: function(value) { 34 | currentApi = value; 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /platforms/android/platform_www/cordova-js-src/android/promptbasednativeapi.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Implements the API of ExposedJsApi.java, but uses prompt() to communicate. 22 | * This is used pre-JellyBean, where addJavascriptInterface() is disabled. 23 | */ 24 | 25 | module.exports = { 26 | exec: function(bridgeSecret, service, action, callbackId, argsJson) { 27 | return prompt(argsJson, 'gap:'+JSON.stringify([bridgeSecret, service, action, callbackId])); 28 | }, 29 | setNativeToJsBridgeMode: function(bridgeSecret, value) { 30 | prompt(value, 'gap_bridge_mode:' + bridgeSecret); 31 | }, 32 | retrieveJsMessages: function(bridgeSecret, fromOnlineEvent) { 33 | return prompt(+fromOnlineEvent, 'gap_poll:' + bridgeSecret); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /platforms/android/platform_www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = [ 3 | { 4 | "id": "cordova-plugin-device.device", 5 | "file": "plugins/cordova-plugin-device/www/device.js", 6 | "pluginId": "cordova-plugin-device", 7 | "clobbers": [ 8 | "device" 9 | ] 10 | }, 11 | { 12 | "id": "cordova-plugin-badge.Badge", 13 | "file": "plugins/cordova-plugin-badge/www/badge.js", 14 | "pluginId": "cordova-plugin-badge", 15 | "clobbers": [ 16 | "cordova.plugins.notification.badge" 17 | ] 18 | }, 19 | { 20 | "id": "cordova-plugin-local-notification.LocalNotification", 21 | "file": "plugins/cordova-plugin-local-notification/www/local-notification.js", 22 | "pluginId": "cordova-plugin-local-notification", 23 | "clobbers": [ 24 | "cordova.plugins.notification.local" 25 | ] 26 | }, 27 | { 28 | "id": "cordova-plugin-local-notification.LocalNotification.Core", 29 | "file": "plugins/cordova-plugin-local-notification/www/local-notification-core.js", 30 | "pluginId": "cordova-plugin-local-notification", 31 | "clobbers": [ 32 | "cordova.plugins.notification.local.core", 33 | "plugin.notification.local.core" 34 | ] 35 | }, 36 | { 37 | "id": "cordova-plugin-local-notification.LocalNotification.Util", 38 | "file": "plugins/cordova-plugin-local-notification/www/local-notification-util.js", 39 | "pluginId": "cordova-plugin-local-notification", 40 | "merges": [ 41 | "cordova.plugins.notification.local.core", 42 | "plugin.notification.local.core" 43 | ] 44 | } 45 | ]; 46 | module.exports.metadata = { 47 | "cordova-plugin-whitelist": "1.3.4", 48 | "cordova-plugin-device": "2.0.3", 49 | "cordova-plugin-badge": "0.8.8", 50 | "cordova-plugin-local-notification": "0.9.0-beta.2" 51 | }; 52 | }); -------------------------------------------------------------------------------- /platforms/android/project.properties: -------------------------------------------------------------------------------- 1 | # This file was originally created by the Android Tools, but is now 2 | # used by cordova-android to manage the state of the various third party 3 | # libraries used in your application 4 | 5 | # This is the Library Module that contains the Cordova Library, this is not 6 | # required when using an AAR 7 | 8 | # This is the application project. This is only required for Android Studio Gradle projects 9 | 10 | # Project target. 11 | target=android-28 12 | android.library.reference.1=CordovaLib 13 | android.library.reference.2=app 14 | cordova.gradle.include.1=cordova-plugin-badge/cordovareact-badge.gradle 15 | cordova.system.library.1=com.android.support:support-v4:26.+ 16 | cordova.gradle.include.2=cordova-plugin-local-notification/cordovareact-localnotification.gradle -------------------------------------------------------------------------------- /platforms/android/settings.gradle: -------------------------------------------------------------------------------- 1 | // GENERATED FILE - DO NOT EDIT 2 | include ":" 3 | include ":CordovaLib" 4 | include ":app" 5 | -------------------------------------------------------------------------------- /platforms/android/wrapper.gradle: -------------------------------------------------------------------------------- 1 | //This file is intentionally just a comment 2 | -------------------------------------------------------------------------------- /plugins/android.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": {} 8 | }, 9 | "installed_plugins": { 10 | "cordova-plugin-whitelist": { 11 | "PACKAGE_NAME": "org.apache.cordova.cordovareact" 12 | }, 13 | "cordova-plugin-local-notification": { 14 | "PACKAGE_NAME": "org.apache.cordova.cordovareact" 15 | } 16 | }, 17 | "dependent_plugins": { 18 | "cordova-plugin-device": { 19 | "PACKAGE_NAME": "org.apache.cordova.cordovareact" 20 | }, 21 | "cordova-plugin-badge": { 22 | "PACKAGE_NAME": "org.apache.cordova.cordovareact" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/images/android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-badge/images/android.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/images/ios-permission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-badge/images/ios-permission.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/images/ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-badge/images/ios.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/images/osx-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-badge/images/osx-badge.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/images/osx-circular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-badge/images/osx-circular.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/images/osx-download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-badge/images/osx-download.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/images/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-badge/images/windows.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/src/android/badge.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file contains Original Code and/or Modifications of Original Code 3 | * as defined in and that are subject to the Apache License 4 | * Version 2.0 (the 'License'). You may not use this file except in 5 | * compliance with the License. Please obtain a copy of the License at 6 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 7 | * file. 8 | * 9 | * The Original Code and all software distributed under the License are 10 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 11 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 12 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 13 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 14 | * Please see the License for the specific language governing rights and 15 | * limitations under the License. 16 | */ 17 | 18 | repositories { 19 | mavenCentral() 20 | } 21 | 22 | if (!project.ext.has('appShortcutBadgerVersion')) { 23 | ext.appShortcutBadgerVersion = '1.1.22' 24 | } 25 | 26 | if (!project.ext.has('appShortcutBadgerCustom')) { 27 | dependencies { 28 | compile "me.leolin:ShortcutBadger:${appShortcutBadgerVersion}@aar" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/src/ios/APPBadge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file contains Original Code and/or Modifications of Original Code 3 | * as defined in and that are subject to the Apache License 4 | * Version 2.0 (the 'License'). You may not use this file except in 5 | * compliance with the License. Please obtain a copy of the License at 6 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 7 | * file. 8 | * 9 | * The Original Code and all software distributed under the License are 10 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 11 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 12 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 13 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 14 | * Please see the License for the specific language governing rights and 15 | * limitations under the License. 16 | */ 17 | 18 | #import 19 | 20 | @interface APPBadge : CDVPlugin 21 | 22 | // Load the badge config 23 | - (void) load:(CDVInvokedUrlCommand *)command; 24 | // Save the badge config 25 | - (void) save:(CDVInvokedUrlCommand *)command; 26 | // Clear the badge number 27 | - (void) clear:(CDVInvokedUrlCommand *)command; 28 | // Set the badge number 29 | - (void) set:(CDVInvokedUrlCommand *)command; 30 | // Get the badge number 31 | - (void) get:(CDVInvokedUrlCommand *)command; 32 | // Check permission to show badges 33 | - (void) check:(CDVInvokedUrlCommand *)command; 34 | // Request permission to show badges 35 | - (void) request:(CDVInvokedUrlCommand *)command; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/src/osx/APPBadge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file contains Original Code and/or Modifications of Original Code 3 | * as defined in and that are subject to the Apache License 4 | * Version 2.0 (the 'License'). You may not use this file except in 5 | * compliance with the License. Please obtain a copy of the License at 6 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 7 | * file. 8 | * 9 | * The Original Code and all software distributed under the License are 10 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 11 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 12 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 13 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 14 | * Please see the License for the specific language governing rights and 15 | * limitations under the License. 16 | */ 17 | 18 | #import 19 | 20 | @interface APPBadge : CDVPlugin 21 | 22 | // Load the badge config 23 | - (void) load:(CDVInvokedUrlCommand *)command; 24 | // Save the badge config 25 | - (void) save:(CDVInvokedUrlCommand *)command; 26 | // Clear the badge number 27 | - (void) clear:(CDVInvokedUrlCommand *)command; 28 | // Set the badge number 29 | - (void) set:(CDVInvokedUrlCommand *)command; 30 | // Get the badge number 31 | - (void) get:(CDVInvokedUrlCommand *)command; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/src/osx/DockCircularProgressBar.h: -------------------------------------------------------------------------------- 1 | // Borrow from src/chrome/browser/ui/cocoa/dock_icon.h 2 | 3 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style license that can be 5 | // found in the LICENSE file. 6 | 7 | #import 8 | 9 | @interface DockCircularProgressBar : NSObject 10 | 11 | + (DockCircularProgressBar*)sharedDockCircularProgressBar; 12 | 13 | - (void)updateProgressBar; 14 | 15 | - (void)hideProgressBar; 16 | 17 | // Indicates whether the progress indicator should be in an indeterminate state 18 | // or not. 19 | - (void)setIndeterminate:(BOOL)indeterminate; 20 | 21 | // Indicates the amount of progress made of the download. Ranges from [0..1]. 22 | - (void)setProgress:(float)progress; 23 | 24 | // Indicates whether the progress number should be showed in circular process bar. 25 | - (void)setShowPercent:(BOOL)show_percent; 26 | 27 | - (void)clear; 28 | 29 | @property (readonly, getter=getProgress) double doubleValue; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/src/osx/DockDownloadProgressBar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface DockDownloadProgressBar : NSProgressIndicator 4 | 5 | + (DockDownloadProgressBar*)sharedDockDownloadProgressBar; 6 | 7 | - (void)setProgress:(float)progress; 8 | 9 | - (void)updateProgressBar; 10 | 11 | - (void)hideProgressBar; 12 | 13 | - (void)clear; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-badge/tests/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | 26 | 30 | 31 | Cordova Badge Plugin Tests 32 | Apache 2.0 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-device/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | # Contributing to Apache Cordova 23 | 24 | Anyone can contribute to Cordova. And we need your contributions. 25 | 26 | There are multiple ways to contribute: report bugs, improve the docs, and 27 | contribute code. 28 | 29 | For instructions on this, start with the 30 | [contribution overview](http://cordova.apache.org/contribute/). 31 | 32 | The details are explained there, but the important items are: 33 | - Sign and submit an Apache ICLA (Contributor License Agreement). 34 | - Have a Jira issue open that corresponds to your contribution. 35 | - Run the tests so your patch doesn't break existing functionality. 36 | 37 | We look forward to your contributions! 38 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-device/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Cordova 2 | Copyright 2012 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-device/src/ios/CDVDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface CDVDevice : CDVPlugin 24 | {} 25 | 26 | + (NSString*)cordovaVersion; 27 | 28 | - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-device/src/osx/CDVDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface CDVDevice : CDVPlugin 23 | 24 | + (NSString*) cordovaVersion; 25 | 26 | - (void) getDeviceInfo:(CDVInvokedUrlCommand*)command; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-device/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-plugin-device-tests", 3 | "version": "2.0.3", 4 | "description": "", 5 | "cordova": { 6 | "id": "cordova-plugin-device-tests", 7 | "platforms": [] 8 | }, 9 | "keywords": [ 10 | "ecosystem:cordova" 11 | ], 12 | "author": "", 13 | "license": "Apache 2.0" 14 | } 15 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-device/tests/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 26 | Cordova Device Plugin Tests 27 | Apache 2.0 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-device/types/index.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for cordova-plugin-device 2.0 2 | // Project: https://github.com/apache/cordova-plugin-device 3 | // Definitions by: Microsoft Open Technologies Inc 4 | // Tim Brust 5 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 6 | 7 | /** 8 | * This plugin defines a global device object, which describes the device's hardware and software. 9 | * Although the object is in the global scope, it is not available until after the deviceready event. 10 | */ 11 | interface Device { 12 | /** Get the version of Cordova running on the device. */ 13 | cordova: string; 14 | /** Indicates that Cordova initialize successfully. */ 15 | available: boolean; 16 | /** 17 | * The device.model returns the name of the device's model or product. The value is set 18 | * by the device manufacturer and may be different across versions of the same product. 19 | */ 20 | model: string; 21 | /** Get the device's operating system name. */ 22 | platform: string; 23 | /** Get the device's Universally Unique Identifier (UUID). */ 24 | uuid: string; 25 | /** Get the operating system version. */ 26 | version: string; 27 | /** Get the device's manufacturer. */ 28 | manufacturer: string; 29 | /** Whether the device is running on a simulator. */ 30 | isVirtual: boolean; 31 | /** Get the device hardware serial number. */ 32 | serial: string; 33 | } 34 | 35 | declare var device: Device; -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!** 2 | 3 | Provide a general summary of the issue. 4 | 5 | ## Your Environment 6 | 7 | * Plugin version: 8 | * Platform: 9 | * OS version: 10 | * Device manufacturer / model: 11 | * Cordova version (```cordova -v```): 12 | * Cordova platform version (```cordova platform ls```): 13 | * Plugin config 14 | * Ionic Version (if using Ionic) 15 | 16 | ## Expected Behavior 17 | 18 | _Tell us what should happen_ 19 | 20 | ## Actual Behavior 21 | 22 | _Tell us what happens instead_ 23 | 24 | ## Steps to Reproduce 25 | 26 | _Reproduce this issue; include code to reproduce, if relevant_ 27 | 28 | 1. ... 29 | 2. ... 30 | 3. ... 31 | 4. .... 32 | 33 | ## Context 34 | 35 | _What were you trying to do?_ 36 | 37 | ## Debug logs 38 | 39 | _Include iOS / Android logs_ 40 | 41 | * ios XCode logs 42 | * Android: $ adb logcat 43 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/android-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/android-actions.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/android-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/android-chat.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/android-inbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/android-inbox.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/android-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/android-progress.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/android-reply-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/android-reply-2.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/android-reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/android-reply.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/android-stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/android-stack.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/ios-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/ios-actions.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/ios-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/ios-basic.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/ios-permission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/ios-permission.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/logo.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/images/windows-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/images/windows-actions.png -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/android/build/localnotification.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file contains Original Code and/or Modifications of Original Code 3 | * as defined in and that are subject to the Apache License 4 | * Version 2.0 (the 'License'). You may not use this file except in 5 | * compliance with the License. Please obtain a copy of the License at 6 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 7 | * file. 8 | * 9 | * The Original Code and all software distributed under the License are 10 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 11 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 12 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 13 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 14 | * Please see the License for the specific language governing rights and 15 | * limitations under the License. 16 | */ 17 | 18 | repositories { 19 | mavenCentral() 20 | jcenter() 21 | maven { 22 | url "https://maven.google.com" 23 | } 24 | } 25 | 26 | if (!project.ext.has('appShortcutBadgerVersion')) { 27 | ext.appShortcutBadgerVersion = '1.1.19' 28 | } 29 | 30 | dependencies { 31 | compile "me.leolin:ShortcutBadger:${appShortcutBadgerVersion}@aar" 32 | } 33 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/android/notification/util/AssetProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package de.appplant.cordova.plugin.notification.util; 21 | 22 | import android.support.v4.content.FileProvider; 23 | 24 | public class AssetProvider extends FileProvider { 25 | // Nothing to do here 26 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/android/xml/localnotification_provider_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/ios/APPNotificationContent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Apache 2.0 License 3 | * 4 | * Copyright (c) Sebastian Katzer 2017 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apache License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | */ 21 | 22 | #import "APPNotificationOptions.h" 23 | 24 | @import UserNotifications; 25 | 26 | @interface APPNotificationContent : UNMutableNotificationContent 27 | 28 | - (id) initWithOptions:(NSDictionary*)dict; 29 | - (APPNotificationOptions*) options; 30 | - (UNNotificationRequest*) request; 31 | - (UNNotificationCategory*) category; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/ios/UNNotificationRequest+APPLocalNotification.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Apache 2.0 License 3 | * 4 | * Copyright (c) Sebastian Katzer 2017 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apache License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | */ 21 | 22 | #import "APPNotificationOptions.h" 23 | 24 | @import UserNotifications; 25 | 26 | @interface UNNotificationRequest (APPLocalNotification) 27 | 28 | // The options provided by the plug-in 29 | - (APPNotificationOptions*) options; 30 | // If the notification was updated 31 | - (BOOL) wasUpdated; 32 | // Encode the user info dict to JSON 33 | - (NSString*) encodeToJSON; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Toast/Button.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Apache 2.0 License 3 | * 4 | * Copyright (c) Sebastian Katzer 2017 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apache License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | */ 21 | 22 | namespace LocalNotificationProxy.LocalNotification.Toast 23 | { 24 | public sealed class Button : IAction 25 | { 26 | /// 27 | /// Gets or sets the ID. 28 | /// 29 | public string ID { get; set; } 30 | 31 | /// 32 | /// Gets or sets the title. 33 | /// 34 | public string Title { get; set; } 35 | 36 | /// 37 | /// Gets or sets a value indicating whether to launch the app. 38 | /// 39 | public bool Launch { get; set; } = true; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Toast/IAction.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Apache 2.0 License 3 | * 4 | * Copyright (c) Sebastian Katzer 2017 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apache License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://opensource.org/licenses/Apache-2.0/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | */ 21 | 22 | namespace LocalNotificationProxy.LocalNotification.Toast 23 | { 24 | public interface IAction 25 | { 26 | /// 27 | /// Gets or sets the ID. 28 | /// 29 | string ID { get; set; } 30 | 31 | /// 32 | /// Gets or sets the title. 33 | /// 34 | string Title { get; set; } 35 | 36 | /// 37 | /// Gets or sets a value indicating whether to launch the app. 38 | /// 39 | bool Launch { get; set; } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/LocalNotificationProxy/LocalNotificationProxy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("LocalNotificationProxy")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LocalNotificationProxy")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveHelper.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive 16 | { 17 | internal static class AdaptiveHelper 18 | { 19 | internal static object ConvertToElement(object obj) 20 | { 21 | if (obj is AdaptiveText) 22 | { 23 | return (obj as AdaptiveText).ConvertToElement(); 24 | } 25 | 26 | if (obj is AdaptiveImage) 27 | { 28 | return (obj as AdaptiveImage).ConvertToElement(); 29 | } 30 | 31 | if (obj is AdaptiveGroup) 32 | { 33 | return (obj as AdaptiveGroup).ConvertToElement(); 34 | } 35 | 36 | if (obj is AdaptiveSubgroup) 37 | { 38 | return (obj as AdaptiveSubgroup).ConvertToElement(); 39 | } 40 | 41 | if (obj is AdaptiveProgressBar) 42 | { 43 | return (obj as AdaptiveProgressBar).ConvertToElement(); 44 | } 45 | 46 | throw new NotImplementedException("Unknown object: " + obj.GetType()); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveSubgroupEnums.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// TextStacking specifies the vertical alignment of content. 17 | /// 18 | public enum AdaptiveSubgroupTextStacking 19 | { 20 | /// 21 | /// Renderer automatically selects the default vertical alignment. 22 | /// 23 | Default, 24 | 25 | /// 26 | /// Vertical align to the top. 27 | /// 28 | [EnumString("top")] 29 | Top, 30 | 31 | /// 32 | /// Vertical align to the center. 33 | /// 34 | [EnumString("center")] 35 | Center, 36 | 37 | /// 38 | /// Vertical align to the bottom. 39 | /// 40 | [EnumString("bottom")] 41 | Bottom 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveTextBindableProperty.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | // Note that this code is only compiled for WinRT. It is not compiled in any of the other projects. 16 | #if WINRT 17 | /// 18 | /// An enumeration of the properties that support data binding on . 19 | /// 20 | public enum AdaptiveTextBindableProperty 21 | { 22 | /// 23 | /// The text to display. Added in Creators Update only for toast top-level elements. 24 | /// 25 | Text 26 | } 27 | #endif 28 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BaseImageHelper.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements; 15 | 16 | namespace Microsoft.Toolkit.Uwp.Notifications 17 | { 18 | internal static class BaseImageHelper 19 | { 20 | internal static void SetSource(ref string destination, string value) 21 | { 22 | if (value == null) 23 | { 24 | throw new ArgumentNullException(nameof(value)); 25 | } 26 | 27 | destination = value; 28 | } 29 | 30 | internal static Element_AdaptiveImage CreateBaseElement(IBaseImage curr) 31 | { 32 | if (curr.Source == null) 33 | { 34 | throw new NullReferenceException("Source property is required."); 35 | } 36 | 37 | return new Element_AdaptiveImage() 38 | { 39 | Src = curr.Source, 40 | Alt = curr.AlternateText, 41 | AddImageQuery = curr.AddImageQuery 42 | }; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BaseTextHelper.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications 16 | { 17 | internal class BaseTextHelper 18 | { 19 | internal static Element_AdaptiveText CreateBaseElement(IBaseText curr) 20 | { 21 | return new Element_AdaptiveText() 22 | { 23 | Text = curr.Text, 24 | Lang = curr.Language 25 | }; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveGroup.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System.Collections.Generic; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements 16 | { 17 | [NotificationXmlElement("group")] 18 | internal sealed class Element_AdaptiveGroup : IElement_TileBindingChild, IElement_ToastBindingChild, IElementWithDescendants 19 | { 20 | public IList Children { get; private set; } = new List(); 21 | 22 | public IEnumerable Descendants() 23 | { 24 | foreach (Element_AdaptiveSubgroup subgroup in Children) 25 | { 26 | // Return the subgroup 27 | yield return subgroup; 28 | 29 | // And also return its descendants 30 | foreach (object descendant in subgroup.Descendants()) 31 | { 32 | yield return descendant; 33 | } 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveImageEnums.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements 14 | { 15 | internal enum AdaptiveImagePlacement 16 | { 17 | [EnumString("inline")] 18 | Inline, 19 | 20 | [EnumString("background")] 21 | Background, 22 | 23 | [EnumString("peek")] 24 | Peek, 25 | 26 | [EnumString("hero")] 27 | Hero, 28 | 29 | [EnumString("appLogoOverride")] 30 | AppLogoOverride 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveProgressBar.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements 14 | { 15 | [NotificationXmlElement("progress")] 16 | internal sealed class Element_AdaptiveProgressBar : IElement_ToastBindingChild 17 | { 18 | [NotificationXmlAttribute("value")] 19 | public string Value { get; set; } 20 | 21 | [NotificationXmlAttribute("title")] 22 | public string Title { get; set; } 23 | 24 | [NotificationXmlAttribute("valueStringOverride")] 25 | public string ValueStringOverride { get; set; } 26 | 27 | [NotificationXmlAttribute("status")] 28 | public string Status { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IAdaptiveChild.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// Elements that can be direct children of adaptive content, including (, , and ). 17 | /// 18 | public interface IAdaptiveChild 19 | { 20 | // Blank interface simply for compile-enforcing the child types in the list. 21 | } 22 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IAdaptiveSubgroupChild.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// Elements that can be direct children of an , including ( and ). 17 | /// 18 | public interface IAdaptiveSubgroupChild 19 | { 20 | // Blank interface simply for compile-enforcing the child types in the list. 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IBaseText.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// Defines the basic properties of a text element. 17 | /// 18 | public interface IBaseText 19 | { 20 | /// 21 | /// The text to display. 22 | /// 23 | string Text { get; set; } 24 | 25 | /// 26 | /// The target locale of the XML payload, specified as a BCP-47 language tags such as "en-US" or "fr-FR". The locale specified here overrides any other specified locale, such as that in binding or visual. If this value is a literal string, this attribute defaults to the user's UI language. If this value is a string reference, this attribute defaults to the locale chosen by Windows Runtime in resolving the string. 27 | /// 28 | string Language { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/ArgumentValidator.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications 16 | { 17 | internal static class ArgumentValidator 18 | { 19 | public static void SetProperty(ref T property, T value, string propertyName, ArgumentValidatorOptions options) 20 | { 21 | if (options.HasFlag(ArgumentValidatorOptions.NotNull)) 22 | { 23 | if (value == null) 24 | { 25 | throw new ArgumentNullException(propertyName); 26 | } 27 | } 28 | 29 | property = value; 30 | } 31 | } 32 | 33 | [Flags] 34 | internal enum ArgumentValidatorOptions 35 | { 36 | NotNull 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/EnumStringAttribute.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications 16 | { 17 | internal sealed class EnumStringAttribute : Attribute 18 | { 19 | public string String { get; } 20 | 21 | public EnumStringAttribute(string s) 22 | { 23 | if (s == null) 24 | { 25 | throw new ArgumentNullException(nameof(s)); 26 | } 27 | 28 | String = s; 29 | } 30 | 31 | public override string ToString() 32 | { 33 | return String; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/INotificationContent.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | #if WINDOWS_UWP 14 | using Windows.Data.Xml.Dom; 15 | #endif 16 | 17 | namespace Microsoft.Toolkit.Uwp.Notifications 18 | { 19 | /// 20 | /// Base notification content interface to retrieve notification Xml as a string. 21 | /// 22 | public interface INotificationContent 23 | { 24 | /// 25 | /// Retrieves the notification Xml content as a string. 26 | /// 27 | /// The notification Xml content as a string. 28 | string GetContent(); 29 | 30 | #if WINDOWS_UWP 31 | /// 32 | /// Retrieves the notification Xml content as a WinRT Xml document. 33 | /// 34 | /// The notification Xml content as a WinRT Xml document. 35 | XmlDocument GetXml(); 36 | #endif 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationContentValidationException.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | #if WINDOWS_UWP 15 | 16 | #endif 17 | 18 | namespace Microsoft.Toolkit.Uwp.Notifications 19 | { 20 | /// 21 | /// Exception returned when invalid notification content is provided. 22 | /// 23 | internal sealed class NotificationContentValidationException : Exception 24 | { 25 | public NotificationContentValidationException(string message) 26 | : base(message) 27 | { 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlAttributeAttribute.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | #if WINDOWS_UWP 15 | 16 | #endif 17 | 18 | namespace Microsoft.Toolkit.Uwp.Notifications 19 | { 20 | internal sealed class NotificationXmlAttributeAttribute : Attribute 21 | { 22 | public string Name { get; private set; } 23 | 24 | public object DefaultValue { get; private set; } 25 | 26 | public NotificationXmlAttributeAttribute(string name, object defaultValue = null) 27 | { 28 | Name = name; 29 | DefaultValue = defaultValue; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlContentAttribute.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | #if WINDOWS_UWP 15 | 16 | #endif 17 | 18 | namespace Microsoft.Toolkit.Uwp.Notifications 19 | { 20 | /// 21 | /// This attribute should be specified at most one time on an Element class. The property's value will be written as a string in the element's body. 22 | /// 23 | internal sealed class NotificationXmlContentAttribute : Attribute 24 | { 25 | } 26 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlElementAttribute.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | #if WINDOWS_UWP 15 | 16 | #endif 17 | 18 | namespace Microsoft.Toolkit.Uwp.Notifications 19 | { 20 | internal sealed class NotificationXmlElementAttribute : Attribute 21 | { 22 | public string Name { get; private set; } 23 | 24 | public NotificationXmlElementAttribute(string name) 25 | { 26 | if (string.IsNullOrWhiteSpace(name)) 27 | { 28 | throw new ArgumentNullException("name cannot be null or whitespace"); 29 | } 30 | 31 | Name = name; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Microsoft.Toolkit.Uwp.Notifications.Shared.shproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 8bacd7a9-b205-4adf-bda9-763b30a66576 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/Element_Tile.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | [NotificationXmlElement("tile")] 16 | internal sealed class Element_Tile : BaseElement 17 | { 18 | public Element_TileVisual Visual { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/TileElementsCommon.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | internal enum TilePresentation 16 | { 17 | [EnumString("people")] 18 | People, 19 | 20 | [EnumString("photos")] 21 | Photos, 22 | 23 | [EnumString("contact")] 24 | Contact 25 | } 26 | 27 | internal enum TileImagePlacement 28 | { 29 | [EnumString("inline")] 30 | Inline, 31 | 32 | [EnumString("background")] 33 | Background, 34 | 35 | [EnumString("peek")] 36 | Peek 37 | } 38 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/ITileBindingContentAdaptiveChild.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// Elements that can be direct children of , including (, , and ). 17 | /// 18 | public interface ITileBindingContentAdaptiveChild 19 | { 20 | // Blank interface simply for compile-enforcing the child types in the list. 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentPeople.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System.Collections.Generic; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications 16 | { 17 | /// 18 | /// New in 1511: Supported on Medium, Wide, and Large (Desktop and Mobile). 19 | /// Previously for RTM: Phone-only. Supported on Medium and Wide. 20 | /// 21 | public sealed class TileBindingContentPeople : ITileBindingContent 22 | { 23 | /// 24 | /// Images that will roll around as circles. 25 | /// 26 | public IList Images { get; private set; } = new List(); 27 | 28 | internal TileTemplateNameV3 GetTemplateName(TileSize size) 29 | { 30 | return TileSizeToAdaptiveTemplateConverter.Convert(size); 31 | } 32 | 33 | internal void PopulateElement(Element_TileBinding binding, TileSize size) 34 | { 35 | binding.Presentation = TilePresentation.People; 36 | 37 | foreach (var img in Images) 38 | { 39 | binding.Children.Add(img.ConvertToElement()); 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileCommon.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | internal enum TileSize 16 | { 17 | Small, 18 | Medium, 19 | Wide, 20 | Large 21 | } 22 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileSizeToAdaptiveTemplateConverter.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications 16 | { 17 | internal static class TileSizeToAdaptiveTemplateConverter 18 | { 19 | public static TileTemplateNameV3 Convert(TileSize size) 20 | { 21 | switch (size) 22 | { 23 | case TileSize.Small: 24 | return TileTemplateNameV3.TileSmall; 25 | 26 | case TileSize.Medium: 27 | return TileTemplateNameV3.TileMedium; 28 | 29 | case TileSize.Wide: 30 | return TileTemplateNameV3.TileWide; 31 | 32 | case TileSize.Large: 33 | return TileTemplateNameV3.TileLarge; 34 | 35 | default: 36 | throw new NotImplementedException(); 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileTextStacking.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// TextStacking specifies the vertical alignment of content. 17 | /// 18 | public enum TileTextStacking 19 | { 20 | /// 21 | /// Vertical align to the top. 22 | /// 23 | [EnumString("top")] 24 | Top, 25 | 26 | /// 27 | /// Vertical align to the center. 28 | /// 29 | [EnumString("center")] 30 | Center, 31 | 32 | /// 33 | /// Vertical align to the bottom. 34 | /// 35 | [EnumString("bottom")] 36 | Bottom 37 | } 38 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/Elements/Element_ToastActions.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System.Collections.Generic; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications 16 | { 17 | [NotificationXmlElement("actions")] 18 | internal sealed class Element_ToastActions 19 | { 20 | internal const ToastSystemCommand DEFAULT_SYSTEM_COMMAND = ToastSystemCommand.None; 21 | 22 | [NotificationXmlAttribute("hint-systemCommands", DEFAULT_SYSTEM_COMMAND)] 23 | public ToastSystemCommand SystemCommands { get; set; } = ToastSystemCommand.None; 24 | 25 | public IList Children { get; private set; } = new List(); 26 | } 27 | 28 | internal interface IElement_ToastActionsChild 29 | { 30 | } 31 | 32 | internal enum ToastSystemCommand 33 | { 34 | None, 35 | SnoozeAndDismiss 36 | } 37 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/Elements/Element_ToastAudio.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications 16 | { 17 | [NotificationXmlElement("audio")] 18 | internal sealed class Element_ToastAudio 19 | { 20 | internal const bool DEFAULT_LOOP = false; 21 | internal const bool DEFAULT_SILENT = false; 22 | 23 | /// 24 | /// The media file to play in place of the default sound. This can either be a ms-winsoundevent value, or a custom ms-appx:/// or ms-appdata:/// file, or null for the default sound. 25 | /// 26 | [NotificationXmlAttribute("src")] 27 | public Uri Src { get; set; } 28 | 29 | [NotificationXmlAttribute("loop", DEFAULT_LOOP)] 30 | public bool Loop { get; set; } = DEFAULT_LOOP; 31 | 32 | /// 33 | /// True to mute the sound; false to allow the Toast notification sound to play. 34 | /// 35 | [NotificationXmlAttribute("silent", DEFAULT_SILENT)] 36 | public bool Silent { get; set; } = DEFAULT_SILENT; 37 | } 38 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/Elements/Element_ToastSelection.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | [NotificationXmlElement("selection")] 16 | internal sealed class Element_ToastSelection : IElement_ToastInputChild 17 | { 18 | /// 19 | /// The id attribute is required and it is for apps to retrieve back the user selected input after the app is activated. 20 | /// 21 | [NotificationXmlAttribute("id")] 22 | public string Id { get; set; } 23 | 24 | /// 25 | /// The text to display for this selection element. 26 | /// 27 | [NotificationXmlAttribute("content")] 28 | public string Content { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/Elements/Element_ToastText.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | [NotificationXmlElement("text")] 16 | internal sealed class Element_ToastText : IElement_ToastBindingChild 17 | { 18 | internal const ToastTextPlacement DEFAULT_PLACEMENT = ToastTextPlacement.Inline; 19 | 20 | [NotificationXmlContent] 21 | public string Text { get; set; } 22 | 23 | [NotificationXmlAttribute("lang")] 24 | public string Lang { get; set; } 25 | 26 | [NotificationXmlAttribute("placement", DEFAULT_PLACEMENT)] 27 | public ToastTextPlacement Placement { get; set; } = DEFAULT_PLACEMENT; 28 | } 29 | 30 | internal enum ToastTextPlacement 31 | { 32 | Inline, 33 | 34 | [EnumString("attribution")] 35 | Attribution 36 | } 37 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/Elements/Element_ToastVisual.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System; 14 | using System.Collections.Generic; 15 | 16 | namespace Microsoft.Toolkit.Uwp.Notifications 17 | { 18 | [NotificationXmlElement("visual")] 19 | internal sealed class Element_ToastVisual 20 | { 21 | internal const bool DEFAULT_ADD_IMAGE_QUERY = false; 22 | 23 | [NotificationXmlAttribute("addImageQuery")] 24 | public bool? AddImageQuery { get; set; } 25 | 26 | [NotificationXmlAttribute("baseUri")] 27 | public Uri BaseUri { get; set; } 28 | 29 | [NotificationXmlAttribute("lang")] 30 | public string Language { get; set; } 31 | 32 | [NotificationXmlAttribute("version")] 33 | public int? Version { get; set; } 34 | 35 | public IList Bindings { get; private set; } = new List(); 36 | } 37 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/Elements/IElement_ToastActivatable.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | internal interface IElement_ToastActivatable 16 | { 17 | Element_ToastActivationType ActivationType { get; set; } 18 | 19 | string ProtocolActivationTargetApplicationPfn { get; set; } 20 | 21 | ToastAfterActivationBehavior AfterActivationBehavior { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/IToastActions.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | using System.Collections.Generic; 14 | 15 | namespace Microsoft.Toolkit.Uwp.Notifications 16 | { 17 | /// 18 | /// Actions to display on a Toast notification. One of or . 19 | /// 20 | public interface IToastActions 21 | { 22 | /// 23 | /// New in Anniversary Update: Custom context menu items, providing additional actions when the user right clicks the Toast notification. 24 | /// 25 | IList ContextMenuItems { get; } 26 | } 27 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/IToastBindingGenericChild.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// Elements that can be direct children of , including (, , and ). 17 | /// 18 | public interface IToastBindingGenericChild 19 | { 20 | // Blank interface simply for compile-enforcing the child types in the list. 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/IToastButton.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// One of , , or . 17 | /// 18 | public interface IToastButton 19 | { 20 | } 21 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/IToastInput.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// An input element on a Toast notification. One of or . 17 | /// 18 | public interface IToastInput 19 | { 20 | } 21 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Toasts/ToastGenericAppLogoEnums.cs: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // This code is licensed under the MIT License (MIT). 4 | // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 6 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 8 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 9 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 10 | // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. 11 | // ****************************************************************** 12 | 13 | namespace Microsoft.Toolkit.Uwp.Notifications 14 | { 15 | /// 16 | /// Specify the desired cropping of the image. 17 | /// 18 | public enum ToastGenericAppLogoCrop 19 | { 20 | /// 21 | /// Cropping uses the default behavior of the renderer. 22 | /// 23 | Default, 24 | 25 | /// 26 | /// Image is not cropped. 27 | /// 28 | [EnumString("none")] 29 | None, 30 | 31 | /// 32 | /// Image is cropped to a circle shape. 33 | /// 34 | [EnumString("circle")] 35 | Circle 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/readme.md: -------------------------------------------------------------------------------- 1 | This readme has moved to the parent Notifications folder. 2 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.UWP/Microsoft.Toolkit.Uwp.Notifications.UWP.nuget.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.UWP/Properties/Microsoft.Toolkit.Uwp.Notifications.rd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/Microsoft.Toolkit.Uwp.Notifications.UWP/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "6.0.5", 4 | "StyleCop.Analyzers": "1.0.2" 5 | }, 6 | "frameworks": { 7 | "uap10.0.10240": {} 8 | }, 9 | "runtimes": { 10 | "win10-arm": {}, 11 | "win10-arm-aot": {}, 12 | "win10-x86": {}, 13 | "win10-x86-aot": {}, 14 | "win10-x64": {}, 15 | "win10-x64-aot": {} 16 | } 17 | } -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/lib.UW/ARM/LocalNotificationProxy.winmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/src/windows/lib.UW/ARM/LocalNotificationProxy.winmd -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/lib.UW/x64/LocalNotificationProxy.winmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/src/windows/lib.UW/x64/LocalNotificationProxy.winmd -------------------------------------------------------------------------------- /plugins/cordova-plugin-local-notification/src/windows/lib.UW/x86/LocalNotificationProxy.winmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/plugins/cordova-plugin-local-notification/src/windows/lib.UW/x86/LocalNotificationProxy.winmd -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | # Contributing to Apache Cordova 23 | 24 | Anyone can contribute to Cordova. And we need your contributions. 25 | 26 | There are multiple ways to contribute: report bugs, improve the docs, and 27 | contribute code. 28 | 29 | For instructions on this, start with the 30 | [contribution overview](http://cordova.apache.org/contribute/). 31 | 32 | The details are explained there, but the important items are: 33 | - Sign and submit an Apache ICLA (Contributor License Agreement). 34 | - Have a Jira issue open that corresponds to your contribution. 35 | - Run the tests so your patch doesn't break existing functionality. 36 | 37 | We look forward to your contributions! 38 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Cordova 2 | Copyright 2012 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 24 | Whitelist 25 | Cordova Network Whitelist Plugin 26 | Apache 2.0 27 | cordova,whitelist,policy 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-plugin-whitelist-tests", 3 | "version": "1.3.4", 4 | "description": "", 5 | "cordova": { 6 | "id": "cordova-plugin-whitelist-tests", 7 | "platforms": [] 8 | }, 9 | "keywords": [ 10 | "ecosystem:cordova" 11 | ], 12 | "author": "", 13 | "license": "Apache 2.0" 14 | } 15 | 16 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/tests/scripts/remove-access.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | var rootdir = ""; 4 | var file = path.join(rootdir, "platforms/android/app/src/main/res/xml/config.xml"); 5 | 6 | fs.readFile( file, "utf8", function( err, data ) 7 | { 8 | if (err) 9 | return console.log( err ); 10 | 11 | var result = data; 12 | result = result.replace( "", "" ); 13 | 14 | fs.writeFile( file, result, "utf8", function( err ) 15 | { 16 | if (err) 17 | return console.log( err ); 18 | } ); 19 | } ); -------------------------------------------------------------------------------- /plugins/cordova-plugin-whitelist/tests/www/whitelist.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | var argscheck = require('cordova/argscheck'), 23 | exec = require('cordova/exec'); 24 | 25 | module.exports = { 26 | match: function(url, patterns, callback) { 27 | //argscheck.checkArgs('fF', 'Whitelist.match', arguments); 28 | exec(callback, callback, "WhitelistAPI", "URLMatchesPatterns", [url, patterns]); 29 | }, 30 | test: function(url, callback) { 31 | //argscheck.checkArgs('fF', 'Whitelist.test', arguments); 32 | exec(callback, callback, "WhitelistAPI", "URLIsAllowed", [url]); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /plugins/fetch.json: -------------------------------------------------------------------------------- 1 | { 2 | "cordova-plugin-whitelist": { 3 | "source": { 4 | "type": "registry", 5 | "id": "cordova-plugin-whitelist@1" 6 | }, 7 | "is_top_level": true, 8 | "variables": {} 9 | }, 10 | "cordova-plugin-local-notification": { 11 | "source": { 12 | "type": "registry", 13 | "id": "cordova-plugin-local-notification" 14 | }, 15 | "is_top_level": true, 16 | "variables": {} 17 | }, 18 | "cordova-plugin-device": { 19 | "source": { 20 | "type": "registry", 21 | "id": "cordova-plugin-device" 22 | }, 23 | "is_top_level": false, 24 | "variables": {} 25 | }, 26 | "cordova-plugin-badge": { 27 | "source": { 28 | "type": "registry", 29 | "id": "cordova-plugin-badge@>=0.8.5" 30 | }, 31 | "is_top_level": false, 32 | "variables": {} 33 | } 34 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/public/favicon.ico -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /scripts/exec.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const rimraf = require('rimraf'); 3 | 4 | function renameOutputFolder(buildFolderPath, outputFolderPath) { 5 | return new Promise((resolve, reject) => { 6 | fs.rename(buildFolderPath, outputFolderPath, (err) => { 7 | if (err) { 8 | reject(err); 9 | } else { 10 | resolve('Successfully built!'); 11 | } 12 | }); 13 | }); 14 | } 15 | 16 | function exec(buildFolderPath, outputFolderPath) { 17 | return new Promise((resolve, reject) => { 18 | if (fs.existsSync(buildFolderPath)) { 19 | if (fs.existsSync(outputFolderPath)) { 20 | rimraf(outputFolderPath, (err) => { 21 | if (err) { 22 | reject(err); 23 | return; 24 | } 25 | renameOutputFolder(buildFolderPath, outputFolderPath) 26 | .then(val => resolve(val)) 27 | .catch(e => reject(e)); 28 | }); 29 | } else { 30 | renameOutputFolder(buildFolderPath, outputFolderPath) 31 | .then(val => resolve(val)) 32 | .catch(e => reject(e)); 33 | } 34 | } else { 35 | reject(new Error('build folder does not exist')); 36 | } 37 | }); 38 | } 39 | 40 | module.exports.exec = exec; 41 | -------------------------------------------------------------------------------- /scripts/postbuild.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const exec = require('./exec'); 3 | 4 | exec.exec(path.resolve(__dirname, '../build/'), path.join(__dirname, '../www/')) 5 | .then(e => console.log(e)) 6 | .catch(err => console.log(err)); 7 | -------------------------------------------------------------------------------- /scripts/prebuild.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const { exec } = require('child_process'); 3 | const ex = require('./exec'); 4 | 5 | module.exports = () => { 6 | const projectPath = path.resolve(process.cwd(), './node_modules/.bin/react-scripts'); 7 | return new Promise((resolve, reject) => { 8 | exec(`${projectPath} build`, 9 | (error) => { 10 | if (error) { 11 | console.error(error); 12 | reject(error); 13 | return; 14 | } 15 | ex.exec(path.resolve(__dirname, '../build/'), path.join(__dirname, '../www/')) 16 | .then((s) => { 17 | console.log(s); 18 | resolve(s); 19 | }) 20 | .catch((e) => { 21 | console.error(e); 22 | reject(e); 23 | }); 24 | }); 25 | }); 26 | }; 27 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | function App() { 6 | return ( 7 |
8 |
9 | logo 10 |

11 | Edit src/App.js and save to reload. 12 |

13 | 19 | Learn React 20 | 21 |
22 |
23 | ); 24 | } 25 | 26 | export default App; 27 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | const renderReactDom = () => { 8 | ReactDOM.render(, document.getElementById('root')); 9 | }; 10 | 11 | if (window.cordova) { 12 | document.addEventListener('deviceready', () => { 13 | renderReactDom(); 14 | }, false); 15 | } else { 16 | renderReactDom(); 17 | } 18 | 19 | // If you want your app to work offline and load faster, you can change 20 | // unregister() to register() below. Note this comes with some pitfalls. 21 | // Learn more about service workers: https://bit.ly/CRA-PWA 22 | serviceWorker.unregister(); 23 | -------------------------------------------------------------------------------- /www/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": { 3 | "main.css": "./static/css/main.2cce8147.chunk.css", 4 | "main.js": "./static/js/main.ef5e34d6.chunk.js", 5 | "main.js.map": "./static/js/main.ef5e34d6.chunk.js.map", 6 | "runtime~main.js": "./static/js/runtime~main.d653cc00.js", 7 | "runtime~main.js.map": "./static/js/runtime~main.d653cc00.js.map", 8 | "static/js/2.b41502e9.chunk.js": "./static/js/2.b41502e9.chunk.js", 9 | "static/js/2.b41502e9.chunk.js.map": "./static/js/2.b41502e9.chunk.js.map", 10 | "index.html": "./index.html", 11 | "precache-manifest.7274ceb960f6e4c5b64994547d47f262.js": "./precache-manifest.7274ceb960f6e4c5b64994547d47f262.js", 12 | "service-worker.js": "./service-worker.js", 13 | "static/css/main.2cce8147.chunk.css.map": "./static/css/main.2cce8147.chunk.css.map", 14 | "static/media/logo.svg": "./static/media/logo.5d5d9eef.svg" 15 | } 16 | } -------------------------------------------------------------------------------- /www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pshubham95/cordova-react-example/56ef18c593a4bf6983adf245ca7f61c3688dbdea/www/favicon.ico -------------------------------------------------------------------------------- /www/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /www/precache-manifest.7274ceb960f6e4c5b64994547d47f262.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = (self.__precacheManifest || []).concat([ 2 | { 3 | "revision": "d728aaed7c6c7b1703b693d6cdaae96e", 4 | "url": "./index.html" 5 | }, 6 | { 7 | "revision": "0485c792df730c2d80b8", 8 | "url": "./static/css/main.2cce8147.chunk.css" 9 | }, 10 | { 11 | "revision": "2e0129063922e3bb197a", 12 | "url": "./static/js/2.b41502e9.chunk.js" 13 | }, 14 | { 15 | "revision": "0485c792df730c2d80b8", 16 | "url": "./static/js/main.ef5e34d6.chunk.js" 17 | }, 18 | { 19 | "revision": "8c97409f0ee389fe75da", 20 | "url": "./static/js/runtime~main.d653cc00.js" 21 | }, 22 | { 23 | "revision": "5d5d9eefa31e5e13a6610d9fa7a283bb", 24 | "url": "./static/media/logo.5d5d9eef.svg" 25 | } 26 | ]); -------------------------------------------------------------------------------- /www/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); 15 | 16 | importScripts( 17 | "./precache-manifest.7274ceb960f6e4c5b64994547d47f262.js" 18 | ); 19 | 20 | self.addEventListener('message', (event) => { 21 | if (event.data && event.data.type === 'SKIP_WAITING') { 22 | self.skipWaiting(); 23 | } 24 | }); 25 | 26 | workbox.core.clientsClaim(); 27 | 28 | /** 29 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 30 | * requests for URLs in the manifest. 31 | * See https://goo.gl/S9QRab 32 | */ 33 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 34 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 35 | 36 | workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("./index.html"), { 37 | 38 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 39 | }); 40 | -------------------------------------------------------------------------------- /www/static/css/main.2cce8147.chunk.css: -------------------------------------------------------------------------------- 1 | body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{text-align:center}.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite;height:40vmin;pointer-events:none}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} 2 | /*# sourceMappingURL=main.2cce8147.chunk.css.map */ -------------------------------------------------------------------------------- /www/static/css/main.2cce8147.chunk.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.css","App.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mIAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,uEAEF,CCZA,KACE,iBACF,CAEA,UACE,mDAA4C,CAA5C,2CAA4C,CAC5C,aAAc,CACd,mBACF,CAEA,YACE,wBAAyB,CACzB,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BAA6B,CAC7B,UACF,CAEA,UACE,aACF,CAEA,iCACE,GACE,8BAAuB,CAAvB,sBACF,CACA,GACE,+BAAyB,CAAzB,uBACF,CACF,CAPA,yBACE,GACE,8BAAuB,CAAvB,sBACF,CACA,GACE,+BAAyB,CAAzB,uBACF,CACF","file":"main.2cce8147.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\",\n \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\n monospace;\n}\n",".App {\n text-align: center;\n}\n\n.App-logo {\n animation: App-logo-spin infinite 20s linear;\n height: 40vmin;\n pointer-events: none;\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n"]} -------------------------------------------------------------------------------- /www/static/js/main.ef5e34d6.chunk.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,function(e,n,t){e.exports=t.p+"static/media/logo.5d5d9eef.svg"},function(e,n,t){e.exports=t(12)},,,,,,function(e,n,t){},function(e,n,t){},function(e,n,t){"use strict";t.r(n);var o=t(0),a=t.n(o),r=t(2),c=t.n(r),i=(t(10),t(3)),l=t.n(i);t(11);var s=function(){return a.a.createElement("div",{className:"App"},a.a.createElement("header",{className:"App-header"},a.a.createElement("img",{src:l.a,className:"App-logo",alt:"logo"}),a.a.createElement("p",null,"Edit ",a.a.createElement("code",null,"src/App.js")," and save to reload."),a.a.createElement("a",{className:"App-link",href:"https://reactjs.org",target:"_blank",rel:"noopener noreferrer"},"Learn React")))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var d=function(){c.a.render(a.a.createElement(s,null),document.getElementById("root"))};window.cordova?document.addEventListener("deviceready",function(){d(),window.cordova.plugins.notification.local.schedule({title:"Sample notification",text:"It works",foreground:!0})},!1):d(),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()})}],[[4,1,2]]]); 2 | //# sourceMappingURL=main.ef5e34d6.chunk.js.map -------------------------------------------------------------------------------- /www/static/js/runtime~main.d653cc00.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c