diff --git a/.gitignore b/.gitignore
index 0944d5f..95477b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,36 +1,39 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
+*.userosscache
*.sln.docstates
-*.userprefs
-
-# ignore Xamarin.Android Resource.Designer.cs files
-**/*.Droid/**/[Rr]esource.[Dd]esigner.cs
-**/*.Android/**/[Rr]esource.[Dd]esigner.cs
-**/Android/**/[Rr]esource.[Dd]esigner.cs
-**/Droid/**/[Rr]esource.[Dd]esigner.cs
-# Xamarin Components
-Components/
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
+[Rr]eleases/
x64/
-build/
+x86/
bld/
[Bb]in/
[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
-#NUNIT
+# NUNIT
*.VisualState.xml
TestResult.xml
@@ -39,6 +42,12 @@ TestResult.xml
[Rr]eleasePS/
dlldata.c
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+**/Properties/launchSettings.json
+
*_i.c
*_p.c
*_i.h
@@ -71,14 +80,18 @@ _Chutzpah*
ipch/
*.aps
*.ncb
+*.opendb
*.opensdf
*.sdf
*.cachefile
+*.VC.db
+*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
+*.sap
# TFS 2012 Local Workspace
$tf/
@@ -91,7 +104,7 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
-# JustCode is a .NET coding addin-in
+# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
@@ -100,10 +113,14 @@ _TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
# NCrunch
-*.ncrunch*
_NCrunch_*
.*crunch*.local.xml
+nCrunchTemp_*
# MightyMoose
*.mm.*
@@ -131,47 +148,69 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
-
-# NuGet Packages Directory
-packages/
-*.nuget.targets
-*.lock.json
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
*.nuget.props
+*.nuget.targets
-## TODO: If the tool you use requires repositories.config uncomment the next line
-#!packages/repositories.config
-
-# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
-# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)
-!packages/build/
-
-# Windows Azure Build Output
+# Microsoft Azure Build Output
csx/
*.build.csdef
-# Windows Store app package directory
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
# Others
-sql/
-*.Cache
ClientBin/
-[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
+*.jfm
*.pfx
*.publishsettings
-node_modules/
-.DS_Store
-*.bak
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
# RIA/Silverlight projects
Generated_Code/
-# Backup & report files from converting an old project file to a newer
-# Visual Studio version. Backup files are not needed, because we have git ;-)
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
@@ -180,6 +219,7 @@ UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
+*.ndf
# Business Intelligence projects
*.rdl.data
@@ -189,6 +229,65 @@ UpgradeLog*.htm
# Microsoft Fakes
FakesAssemblies/
-.vs/NL.HNOGames.Domoticz/v15/**
-*.ide
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Typescript v1 declaration files
+typings/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush
+.cr/
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+*.apk
+.vs/NL.HNOGames.Domoticz/DesignTimeBuild/.dtbcache
+*.ide-shm
+*.ide-wal
.vs/NL.HNOGames.Domoticz/DesignTimeBuild/.dtbcache
diff --git a/.vs/NL.HNOGames.Domoticz/DesignTimeBuild/.dtbcache b/.vs/NL.HNOGames.Domoticz/DesignTimeBuild/.dtbcache
deleted file mode 100644
index 40c4595..0000000
Binary files a/.vs/NL.HNOGames.Domoticz/DesignTimeBuild/.dtbcache and /dev/null differ
diff --git a/.vs/NL.HNOGames.Domoticz/v15/sqlite3/storage.ide b/.vs/NL.HNOGames.Domoticz/v15/sqlite3/storage.ide
deleted file mode 100644
index f6f4b16..0000000
Binary files a/.vs/NL.HNOGames.Domoticz/v15/sqlite3/storage.ide and /dev/null differ
diff --git a/NL.HNOGames.Domoticz.sln b/NL.HNOGames.Domoticz.sln
index 011a8d4..7c36224 100644
--- a/NL.HNOGames.Domoticz.sln
+++ b/NL.HNOGames.Domoticz.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.10
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29920.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NL.HNOGames.Domoticz", "NL.HNOGames.Domoticz\NL.HNOGames.Domoticz\NL.HNOGames.Domoticz.csproj", "{C13C8119-A8A5-4DC5-A7DD-A0C9733BDCEB}"
EndProject
@@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NL.HNOGames.Domoticz.Androi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NL.HNOGames.Domoticz.iOS", "NL.HNOGames.Domoticz\NL.HNOGames.Domoticz.iOS\NL.HNOGames.Domoticz.iOS.csproj", "{1406A3F3-481E-45B3-AA2B-70F664F145F8}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NL.HNOGames.OOTT.iOS", "NL.HNOGames.Domoticz\NL.HNOGames.OOTT.iOS\NL.HNOGames.OOTT.iOS.csproj", "{F7207160-EA66-4B72-9F6A-46FAED160C4F}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -128,6 +126,7 @@ Global
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Debug|ARM.ActiveCfg = Debug|iPhone
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Debug|iPhone.ActiveCfg = Debug|iPhone
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Debug|iPhone.Build.0 = Debug|iPhone
+ {1406A3F3-481E-45B3-AA2B-70F664F145F8}.Debug|iPhone.Deploy.0 = Debug|iPhone
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Debug|x64.ActiveCfg = Debug|iPhone
@@ -147,28 +146,6 @@ Global
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Release|x64.ActiveCfg = Release|iPhone
{1406A3F3-481E-45B3-AA2B-70F664F145F8}.Release|x86.ActiveCfg = Release|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Debug|Any CPU.ActiveCfg = Debug|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Debug|Any CPU.Build.0 = Debug|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Debug|ARM.ActiveCfg = Debug|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Debug|iPhone.ActiveCfg = Debug|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Debug|x64.ActiveCfg = Debug|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Debug|x86.ActiveCfg = Debug|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.OOTT|Any CPU.ActiveCfg = OOTT|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.OOTT|ARM.ActiveCfg = OOTT|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.OOTT|iPhone.ActiveCfg = OOTT|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.OOTT|iPhone.Build.0 = OOTT|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.OOTT|iPhoneSimulator.ActiveCfg = OOTT|iPhoneSimulator
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.OOTT|iPhoneSimulator.Build.0 = OOTT|iPhoneSimulator
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.OOTT|x64.ActiveCfg = OOTT|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.OOTT|x86.ActiveCfg = OOTT|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Release|Any CPU.ActiveCfg = Release|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Release|Any CPU.Build.0 = Release|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Release|ARM.ActiveCfg = Release|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Release|iPhone.ActiveCfg = Release|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Release|x64.ActiveCfg = Release|iPhone
- {F7207160-EA66-4B72-9F6A-46FAED160C4F}.Release|x86.ActiveCfg = Release|iPhone
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/CloseApplication.cs b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/CloseApplication.cs
index e863ca5..e690d62 100644
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/CloseApplication.cs
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/CloseApplication.cs
@@ -1,17 +1,25 @@
using NL.HNOGames.Domoticz.Droid.Helpers;
using NL.HNOGames.Domoticz.Helpers;
+
[assembly: Xamarin.Forms.Dependency(typeof(CloseApplication))]
namespace NL.HNOGames.Domoticz.Droid.Helpers
{
- public class CloseApplication : ICloseApplication
- {
- ///
- /// Close application
- ///
- public void Close()
- {
- Android.OS.Process.KillProcess(Android.OS.Process.MyPid());
- }
- }
-}
\ No newline at end of file
+ ///
+ /// Defines the
+ ///
+ public class CloseApplication : ICloseApplication
+ {
+ #region Public
+
+ ///
+ /// Close application
+ ///
+ public void Close()
+ {
+ Android.OS.Process.KillProcess(Android.OS.Process.MyPid());
+ }
+
+ #endregion
+ }
+}
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/CustomFingerprintDialogFragment.cs b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/CustomFingerprintDialogFragment.cs
deleted file mode 100644
index 3addcf0..0000000
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/CustomFingerprintDialogFragment.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Android.Graphics;
-using Android.OS;
-using Android.Views;
-using Android.Widget;
-using Plugin.Fingerprint.Dialog;
-
-namespace NL.HNOGames.Domoticz.Droid.Helpers
-{
- ///
- /// Custom finger print dialog
- ///
- public class CustomFingerprintDialogFragment : FingerprintDialogFragment
- {
- ///
- /// On Create view
- ///
- public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
- {
- base.DefaultColor = Color.ParseColor("#0A203D");
- var view = base.OnCreateView(inflater, container, savedInstanceState);
- if (view != null)
- {
- var image = view.FindViewById(Resource.Id.fingerprint_imgFingerprint);
- if (image != null)
- image.LayoutParameters = new LinearLayout.LayoutParams(100, 100) { Gravity = GravityFlags.CenterHorizontal, BottomMargin = 20 };
- }
- return view;
- }
- }
-}
\ No newline at end of file
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/HTTPClientHandlerCreationService.cs b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/HTTPClientHandlerCreationService.cs
new file mode 100644
index 0000000..508df93
--- /dev/null
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/HTTPClientHandlerCreationService.cs
@@ -0,0 +1,76 @@
+using Android.Net;
+using Javax.Net.Ssl;
+using NL.HNOGames.Domoticz.Droid.Helpers;
+using NL.HNOGames.Domoticz.Helpers;
+using System.Net.Http;
+using Xamarin.Android.Net;
+
+[assembly: Xamarin.Forms.Dependency(typeof(HTTPClientHandlerCreationService))]
+namespace NL.HNOGames.Domoticz.Droid.Helpers
+{
+ ///
+ /// Defines the
+ ///
+ public class HTTPClientHandlerCreationService : IHTTPClientHandlerCreationService
+ {
+ #region Public
+
+ ///
+ /// The GetInsecureHandler
+ ///
+ /// The
+ public HttpClientHandler GetInsecureHandler()
+ {
+ return new IgnoreSSLClientHandler();
+ }
+
+ #endregion
+ }
+
+ ///
+ /// Defines the
+ ///
+ internal class IgnoreSSLClientHandler : AndroidClientHandler
+ {
+ ///
+ /// The ConfigureCustomSSLSocketFactory
+ ///
+ /// The connection
+ /// The
+ protected override SSLSocketFactory ConfigureCustomSSLSocketFactory(HttpsURLConnection connection)
+ {
+ return SSLCertificateSocketFactory.GetInsecure(10000, null);
+ }
+
+ ///
+ /// The GetSSLHostnameVerifier
+ ///
+ /// The connection
+ /// The
+ protected override IHostnameVerifier GetSSLHostnameVerifier(HttpsURLConnection connection)
+ {
+ return new IgnoreSSLHostnameVerifier();
+ }
+ }
+
+ ///
+ /// Defines the
+ ///
+ internal class IgnoreSSLHostnameVerifier : Java.Lang.Object, IHostnameVerifier
+ {
+ #region Public
+
+ ///
+ /// The Verify
+ ///
+ /// The hostname
+ /// The session
+ /// The
+ public bool Verify(string hostname, ISSLSession session)
+ {
+ return true;
+ }
+
+ #endregion
+ }
+}
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/Settings.cs b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/Settings.cs
deleted file mode 100644
index 28b9224..0000000
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/Settings.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-// Helpers/Settings.cs This file was automatically added when you installed the Settings Plugin. If you are not using a PCL then comment this file back in to use it.
-using Plugin.Settings;
-using Plugin.Settings.Abstractions;
-
-namespace NL.HNOGames.Domoticz.Droid.Helpers
-{
- ///
- /// This is the Settings static class that can be used in your Core solution or in any
- /// of your client applications. All settings are laid out the same exact way with getters
- /// and setters.
- ///
- public static class Settings
- {
- private static ISettings AppSettings
- {
- get
- {
- return CrossSettings.Current;
- }
- }
-
- #region Setting Constants
-
- private const string SettingsKey = "settings_key";
- private static readonly string SettingsDefault = string.Empty;
-
- #endregion
-
-
- public static string GeneralSettings
- {
- get
- {
- return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault);
- }
- set
- {
- AppSettings.AddOrUpdateValue(SettingsKey, value);
- }
- }
-
- }
-}*/
\ No newline at end of file
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/TranslateExtension.txt b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/TranslateExtension.txt
new file mode 100644
index 0000000..71f56c4
--- /dev/null
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Helpers/TranslateExtension.txt
@@ -0,0 +1,44 @@
+using System;
+using System.ComponentModel;
+using System.Reflection;
+using System.Resources;
+using Plugin.Multilingual;
+using Xamarin.Forms;
+using Xamarin.Forms.Xaml;
+
+//This class is specifically for a Xamarin Forms application usage
+namespace NL.HNOGames.Domoticz.Droid.Helpers
+{
+ [ContentProperty("Text")]
+ public class TranslateExtension : IMarkupExtension
+ {
+ const string ResourceId = "NL.HNOGames.Domoticz.Droid.AppResources";
+
+ static readonly Lazy resmgr = new Lazy(() => new ResourceManager(ResourceId, typeof(TranslateExtension).GetTypeInfo().Assembly));
+
+ public string Text { get; set; }
+
+ public object ProvideValue(IServiceProvider serviceProvider)
+ {
+ if (Text == null)
+ return "";
+
+ var ci = CrossMultilingual.Current.CurrentCultureInfo;
+
+ var translation = resmgr.Value.GetString(Text, ci);
+
+ if (translation == null)
+ {
+
+ #if DEBUG
+ throw new ArgumentException(
+ String.Format("Key '{0}' was not found in resources '{1}' for culture '{2}'.", Text, ResourceId, ci.Name),
+ "Text");
+ #else
+ translation = Text; // returns the key, which GETS DISPLAYED TO THE USER
+ #endif
+ }
+ return translation;
+ }
+ }
+}
\ No newline at end of file
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/MainActivity.cs b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/MainActivity.cs
index b2f8553..ed628ee 100644
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/MainActivity.cs
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/MainActivity.cs
@@ -2,76 +2,76 @@
using Android.App;
using Android.Content.PM;
using Android.OS;
-using FFImageLoading.Forms.Droid;
-using System;
-using ZXing.Mobile;
+using Plugin.FirebasePushNotification;
using Plugin.Fingerprint;
using Plugin.InAppBilling;
using Plugin.CurrentActivity;
using Android.Content;
-using System.Net;
using NL.HNOGames.Domoticz.Droid.Helpers;
using Plugin.Permissions;
using Android.Runtime;
-
-#if NETFX_CORE
-[assembly: Xamarin.Forms.Platform.WinRT.ExportRenderer(typeof(Xamarin.RangeSlider.Forms.RangeSlider), typeof(Xamarin.RangeSlider.Forms.RangeSliderRenderer))]
-#else
-[assembly: Xamarin.Forms.ExportRenderer(typeof(Xamarin.RangeSlider.Forms.RangeSlider), typeof(Xamarin.RangeSlider.Forms.RangeSliderRenderer))]
-#endif
+using Firebase;
namespace NL.HNOGames.Domoticz.Droid
{
- [Activity(Label = "@string/app_name", Icon = "@mipmap/ic_launcher", RoundIcon = "@mipmap/ic_launcher_round", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
- public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
- {
- protected override void OnCreate(Bundle bundle)
- {
- System.Net.ServicePointManager.ServerCertificateValidationCallback +=
- (sender, cert, chain, sslPolicyErrors) =>
- {
- System.Diagnostics.Debug.WriteLine(cert.GetSerialNumberString());
- System.Diagnostics.Debug.WriteLine(cert.Issuer);
- System.Diagnostics.Debug.WriteLine(cert.Subject);
- return true;
- };
-
- CachedImageRenderer.Init(true);
- UserDialogs.Init(this);
- Rg.Plugins.Popup.Popup.Init(this, bundle);
-
- CrossCurrentActivity.Current.Init(this, bundle);
- CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
- CrossFingerprint.SetDialogFragmentType();
+ [Activity(Label = "@string/app_name", Icon = "@mipmap/ic_launcher", RoundIcon = "@mipmap/ic_launcher_round", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
+ public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
+ {
+ protected override void OnCreate(Bundle savedInstanceState)
+ {
+ System.Net.ServicePointManager.ServerCertificateValidationCallback +=
+ (sender, cert, chain, sslPolicyErrors) =>
+ {
+ System.Diagnostics.Debug.WriteLine(cert.GetSerialNumberString());
+ System.Diagnostics.Debug.WriteLine(cert.Issuer);
+ System.Diagnostics.Debug.WriteLine(cert.Subject);
+ return true;
+ };
- OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();
- ZXing.Net.Mobile.Forms.Android.Platform.Init();
- MobileBarcodeScanner.Initialize(Application);
+ FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
+ UserDialogs.Init(this);
+ Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
+ Xamarin.Essentials.Platform.Init(this, savedInstanceState);
- TabLayoutResource = Resource.Layout.Tabbar;
- ToolbarResource = Resource.Layout.Toolbar;
+ CrossCurrentActivity.Current.Init(this, savedInstanceState);
+ CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
+ Plugin.InputKit.Platforms.Droid.Config.Init(this, savedInstanceState);
- base.OnCreate(bundle);
+ FirebasePushNotificationManager.ProcessIntent(this, Intent);
+ OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();
+ ZXing.Net.Mobile.Forms.Android.Platform.Init();
+ XamEffects.Droid.Effects.Init();
- global::Xamarin.Forms.Forms.Init(this, bundle);
+ TabLayoutResource = Resource.Layout.Tabbar;
+ ToolbarResource = Resource.Layout.Toolbar;
- LoadApplication(new App(null));
- }
+ base.OnCreate(savedInstanceState);
+ global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
+ global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState);
- public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)
- {
- PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
- global::ZXing.Net.Mobile.Forms.Android.PermissionsHandler.OnRequestPermissionsResult(requestCode, permissions, grantResults);
+ LoadApplication(new App());
+ FirebaseApp.InitializeApp(this);
+ }
- base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
- }
+ public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)
+ {
+ PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
+ Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
+ global::ZXing.Net.Mobile.Android.PermissionsHandler.OnRequestPermissionsResult(requestCode, permissions, grantResults);
+ base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
+ }
+ protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
+ {
+ base.OnActivityResult(requestCode, resultCode, data);
+ InAppBillingImplementation.HandleActivityResult(requestCode, resultCode, data);
+ }
- protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
- {
- base.OnActivityResult(requestCode, resultCode, data);
- InAppBillingImplementation.HandleActivityResult(requestCode, resultCode, data);
- }
- }
+ protected override void OnNewIntent(Intent intent)
+ {
+ base.OnNewIntent(intent);
+ FirebasePushNotificationManager.ProcessIntent(this, intent);
+ }
+ }
}
\ No newline at end of file
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/MainApplication.cs b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/MainApplication.cs
index d4ebe5f..1cbc1c0 100644
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/MainApplication.cs
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/MainApplication.cs
@@ -1,75 +1,92 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
+using Firebase;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
-using Android.Views;
-using Android.Widget;
-using PushNotification.Plugin;
-using NL.HNOGames.Domoticz.Helpers;
using Plugin.CurrentActivity;
namespace NL.HNOGames.Domoticz.Droid
{
- //You can specify additional application information in this attribute
+ //You can specify additional application information in this attribute
#if DEBUG
- [Application(Debuggable = true)]
+ [Application(Debuggable = true)]
#else
[Application(Debuggable = false)]
#endif
- public class MainApplication : Application
- {
- public static Context AppContext;
+ public class MainApplication : Application, Application.IActivityLifecycleCallbacks
+ {
+ public static Context AppContext;
+
+ public MainApplication(IntPtr handle, JniHandleOwnership transer)
+ : base(handle, transer)
+ {}
+
+ public override void OnCreate()
+ {
+ base.OnCreate();
+ RegisterActivityLifecycleCallbacks(this);
+
+ //FirebaseApp.InitializeApp(this);
+ AppContext = ApplicationContext;
+ CrossCurrentActivity.Current.Init(this);
+
+// //Set the default notification channel for your app when running Android Oreo
+// if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O)
+// {
+// FirebasePushNotificationManager.DefaultNotificationChannelId = "Default";
+// FirebasePushNotificationManager.DefaultNotificationChannelName = "General";
+// }
+
+// //If debug you should reset the token each time.
+//#if DEBUG
+// FirebasePushNotificationManager.Initialize(this, true);
+//#else
+// FirebasePushNotificationManager.Initialize(this,false);
+//#endif
+
+ //CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =>
+ //{
+ // System.Diagnostics.Debug.WriteLine("NOTIFICATION RECEIVED", p.Data);
+ //};
+ }
- public MainApplication(IntPtr handle, JniHandleOwnership transer)
- : base(handle, transer)
- {
- }
+ public override void OnTerminate()
+ {
+ base.OnTerminate();
+ UnregisterActivityLifecycleCallbacks(this);
+ }
- public override void OnCreate()
- {
- base.OnCreate();
- AppContext = this.ApplicationContext;
- CrossCurrentActivity.Current.Init(this);
+ public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
+ {
+ CrossCurrentActivity.Current.Activity = activity;
+ }
- //RegisterActivityLifecycleCallbacks(this);
- CrossPushNotification.Initialize("705545900899");
- CrossPushNotification.Current.Register();
+ public void OnActivityDestroyed(Activity activity)
+ {
+ }
- StartPushService();
- }
+ public void OnActivityPaused(Activity activity)
+ {
+ }
- public override void OnTerminate()
- {
- base.OnTerminate();
- //UnregisterActivityLifecycleCallbacks(this);
- }
+ public void OnActivityResumed(Activity activity)
+ {
+ CrossCurrentActivity.Current.Activity = activity;
+ }
- public static void StartPushService()
- {
- AppContext.StartService(new Intent(AppContext, typeof(PushNotificationService)));
+ public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
+ {
+ }
- if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Kitkat)
- {
- PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext, typeof(PushNotificationService)), 0);
- AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(Context.AlarmService);
- alarm.Cancel(pintent);
- }
- }
+ public void OnActivityStarted(Activity activity)
+ {
+ CrossCurrentActivity.Current.Activity = activity;
+ }
- public static void StopPushService()
- {
- AppContext.StopService(new Intent(AppContext, typeof(PushNotificationService)));
- if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Kitkat)
- {
- PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext, typeof(PushNotificationService)), 0);
- AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(Context.AlarmService);
- alarm.Cancel(pintent);
- }
- }
- }
+ public void OnActivityStopped(Activity activity)
+ {
+ }
+ }
}
\ No newline at end of file
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/NL.HNOGames.Domoticz.Android.csproj b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/NL.HNOGames.Domoticz.Android.csproj
index 87d59d1..289445e 100644
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/NL.HNOGames.Domoticz.Android.csproj
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/NL.HNOGames.Domoticz.Android.csproj
@@ -1,7 +1,5 @@
-
-
Debug
AnyCPU
@@ -39,7 +37,7 @@
false
- 1G
+ 2G
btls
@@ -81,357 +79,22 @@
MinimumRecommendedRules.ruleset
-
- ..\..\packages\Acr.Support.2.1.0\lib\MonoAndroid10\Acr.Support.Android.dll
-
-
- ..\..\packages\Acr.UserDialogs.6.5.1\lib\MonoAndroid10\Acr.UserDialogs.dll
-
-
- ..\..\packages\Acr.UserDialogs.6.5.1\lib\MonoAndroid10\Acr.UserDialogs.Interface.dll
-
-
- ..\..\packages\AndHUD.1.2.0\lib\MonoAndroid\AndHUD.dll
-
-
- ..\..\packages\Xam.Plugins.Forms.DeviceOrientation.1.0.1\lib\MonoAndroid10\DeviceOrientation.Forms.Plugin.Abstractions.dll
-
-
- ..\..\packages\Xam.Plugins.Forms.DeviceOrientation.1.0.1\lib\MonoAndroid10\DeviceOrientation.Forms.Plugin.Android.dll
-
-
- ..\..\packages\DLToolkit.Forms.Controls.FlowListView.2.0.11\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+netstandard1.0\DLToolkit.Forms.Controls.FlowListView.dll
-
-
- ..\..\packages\FastAndroidCamera.2.0.0\lib\MonoAndroid403\FastAndroidCamera.dll
-
-
- ..\..\packages\Xamarin.FFImageLoading.2.4.3.840\lib\MonoAndroid10\FFImageLoading.dll
-
-
- ..\..\packages\Xamarin.FFImageLoading.Forms.2.4.3.840\lib\MonoAndroid10\FFImageLoading.Forms.dll
-
-
- ..\..\packages\Xamarin.FFImageLoading.Forms.2.4.3.840\lib\MonoAndroid10\FFImageLoading.Forms.Platform.dll
-
-
- ..\..\packages\Xamarin.FFImageLoading.2.4.3.840\lib\MonoAndroid10\FFImageLoading.Platform.dll
-
-
- ..\..\packages\Xamarin.FFImageLoading.Transformations.2.4.3.840\lib\MonoAndroid10\FFImageLoading.Transformations.dll
-
-
- ..\..\packages\Xamarin.Forms.3.2.0.871581\lib\MonoAndroid10\FormsViewGroup.dll
-
-
- ..\..\packages\FrazzApps.Xamarin.Forms.AppRater.1.2.0\lib\MonoAndroid\FrazzApps.Xamarin.AppRater.dll
-
-
- ..\..\packages\FrazzApps.Xamarin.Forms.AppRater.1.2.0\lib\MonoAndroid\FrazzApps.Xamarin.AppRater.Android.dll
-
-
- ..\..\packages\Humanizer.Core.2.5.1\lib\netstandard2.0\Humanizer.dll
-
-
- ..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\ModernHttpClient.dll
-
-
- ..\..\packages\Newtonsoft.Json.11.0.2\lib\netstandard2.0\Newtonsoft.Json.dll
- True
-
-
- ..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\OkHttp.dll
-
-
- ..\..\packages\OxyPlot.Core.2015.1.708-alpha\lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1+Xamarin.iOS10\OxyPlot.dll
-
-
- ..\..\packages\OxyPlot.Xamarin.Android.1.1.0-unstable0011\lib\MonoAndroid10\OxyPlot.Xamarin.Android.dll
-
-
- ..\..\packages\OxyPlot.Xamarin.Forms.1.1.0-unstable0011\lib\MonoAndroid10\OxyPlot.Xamarin.Forms.dll
-
-
- ..\..\packages\OxyPlot.Xamarin.Forms.1.1.0-unstable0011\lib\MonoAndroid10\OxyPlot.Xamarin.Forms.Platform.Android.dll
-
-
- ..\..\packages\PCLStorage.1.0.2\lib\monoandroid\PCLStorage.dll
-
-
- ..\..\packages\PCLStorage.1.0.2\lib\monoandroid\PCLStorage.Abstractions.dll
-
-
- ..\..\packages\Xam.Plugin.Connectivity.3.2.0\lib\MonoAndroid10\Plugin.Connectivity.dll
-
-
- ..\..\packages\Xam.Plugin.Connectivity.3.2.0\lib\MonoAndroid10\Plugin.Connectivity.Abstractions.dll
-
-
- ..\..\packages\Plugin.CurrentActivity.2.1.0.4\lib\monoandroid44\Plugin.CurrentActivity.dll
-
-
- ..\..\packages\Xam.Plugin.DeviceInfo.4.0.0.13\lib\monoandroid71\Plugin.DeviceInfo.dll
-
-
- ..\..\packages\Plugin.DeviceOrientation.1.0.7\lib\MonoAndroid10\Plugin.DeviceOrientation.dll
-
-
- ..\..\packages\Plugin.DeviceOrientation.1.0.7\lib\MonoAndroid10\Plugin.DeviceOrientation.Abstractions.dll
-
-
- ..\..\packages\Plugin.Fingerprint.1.4.7\lib\MonoAndroid\Plugin.Fingerprint.dll
-
-
- ..\..\packages\Plugin.Fingerprint.1.4.7\lib\MonoAndroid\Plugin.Fingerprint.Abstractions.dll
-
-
- ..\..\packages\Plugin.Fingerprint.1.4.7\lib\MonoAndroid\Plugin.Fingerprint.Android.Samsung.dll
-
-
- ..\..\packages\Plugin.InAppBilling.2.0.0\lib\MonoAndroid10\Plugin.InAppBilling.dll
-
-
- ..\..\packages\Plugin.InAppBilling.2.0.0\lib\MonoAndroid10\Plugin.InAppBilling.Abstractions.dll
-
-
- ..\..\packages\Plugin.InAppBilling.2.0.0\lib\MonoAndroid10\Plugin.InAppBilling.VendingLibrary.dll
-
-
- ..\..\packages\Xam.Plugins.Notifier.3.0.1\lib\MonoAndroid10\Plugin.LocalNotifications.dll
-
-
- ..\..\packages\Xam.Plugins.Notifier.3.0.1\lib\MonoAndroid10\Plugin.LocalNotifications.Abstractions.dll
-
-
- ..\..\packages\Plugin.Multilingual.1.0.2\lib\MonoAndroid10\Plugin.Multilingual.dll
-
-
- ..\..\packages\Plugin.Multilingual.1.0.2\lib\MonoAndroid10\Plugin.Multilingual.Abstractions.dll
-
-
- ..\..\packages\Plugin.Permissions.2.2.1\lib\MonoAndroid10\Plugin.Permissions.dll
-
-
- ..\..\packages\Plugin.Permissions.2.2.1\lib\MonoAndroid10\Plugin.Permissions.Abstractions.dll
-
-
- ..\..\packages\Xam.Plugins.Settings.3.1.1\lib\MonoAndroid10\Plugin.Settings.dll
-
-
- ..\..\packages\Xam.Plugins.Settings.3.1.1\lib\MonoAndroid10\Plugin.Settings.Abstractions.dll
-
-
- ..\..\packages\Plugin.Share.7.1.1\lib\MonoAndroid10\Plugin.Share.dll
-
-
- ..\..\packages\Plugin.Share.7.1.1\lib\MonoAndroid10\Plugin.Share.Abstractions.dll
-
-
- ..\..\packages\Plugin.SpeechRecognition.1.0.0-beta3\lib\MonoAndroid10\Plugin.SpeechRecognition.dll
-
-
- ..\..\packages\Plugin.SpeechRecognition.1.0.0-beta3\lib\MonoAndroid10\Plugin.SpeechRecognition.Abstractions.dll
-
-
- ..\..\packages\Xam.Plugins.TextToSpeech.4.0.0.7\lib\monoandroid71\Plugin.TextToSpeech.dll
-
-
- ..\..\packages\Xam.Plugin.PushNotification.1.2.5-beta\lib\MonoAndroid\PushNotification.Plugin.dll
-
-
- ..\..\packages\Xam.Plugin.PushNotification.1.2.5-beta\lib\MonoAndroid\PushNotification.Plugin.Abstractions.dll
-
-
- ..\..\packages\Rg.Plugins.Popup.1.1.4.168\lib\MonoAndroid\Rg.Plugins.Popup.dll
-
-
- ..\..\packages\Rg.Plugins.Popup.1.1.4.168\lib\MonoAndroid\Rg.Plugins.Popup.Droid.dll
-
-
- ..\..\packages\SlideOverKit.2.1.6.2\lib\MonoAndroid10\SlideOverKit.dll
-
-
- ..\..\packages\SlideOverKit.2.1.6.2\lib\MonoAndroid10\SlideOverKit.Droid.dll
-
-
- ..\..\packages\Splat.2.0.0\lib\MonoAndroid403\Splat.dll
-
-
- ..\..\packages\System.Reactive.4.1.1\lib\netstandard2.0\System.Reactive.dll
-
-
- ..\..\packages\System.Reactive.Core.4.1.1\lib\netstandard2.0\System.Reactive.Core.dll
-
-
- ..\..\packages\System.Reactive.Interfaces.4.1.1\lib\netstandard2.0\System.Reactive.Interfaces.dll
-
-
- ..\..\packages\System.Reactive.Linq.4.1.1\lib\netstandard2.0\System.Reactive.Linq.dll
-
-
- ..\..\packages\System.Reactive.PlatformServices.4.1.1\lib\netstandard2.0\System.Reactive.PlatformServices.dll
-
+
+
-
- ..\..\packages\System.Threading.Tasks.Extensions.4.5.0\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
-
+
-
- ..\..\packages\Xam.Plugin.SimpleColorPicker.1.0.3\lib\netstandard2.0\Xam.Plugin.SimpleColorPicker.dll
-
-
- ..\..\packages\Xamarin.Android.Arch.Core.Common.26.1.0\lib\MonoAndroid80\Xamarin.Android.Arch.Core.Common.dll
-
-
- ..\..\packages\Xamarin.Android.Arch.Lifecycle.Common.26.1.0\lib\MonoAndroid80\Xamarin.Android.Arch.Lifecycle.Common.dll
-
-
- ..\..\packages\Xamarin.Android.Arch.Lifecycle.Runtime.26.1.0\lib\MonoAndroid80\Xamarin.Android.Arch.Lifecycle.Runtime.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Animated.Vector.Drawable.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Annotations.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Annotations.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Compat.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Compat.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Core.UI.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Core.UI.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Core.Utils.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Core.Utils.dll
-
-
- ..\..\packages\Xamarin.Android.Support.CustomTabs.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.CustomTabs.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Design.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Design.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Exif.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Exif.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Fragment.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Fragment.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Media.Compat.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Media.Compat.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Transition.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Transition.dll
-
-
- ..\..\packages\Xamarin.Android.Support.v4.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.v4.dll
-
-
- ..\..\packages\Xamarin.Android.Support.v7.AppCompat.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.v7.AppCompat.dll
-
-
- ..\..\packages\Xamarin.Android.Support.v7.CardView.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.v7.CardView.dll
-
-
- ..\..\packages\Xamarin.Android.Support.v7.MediaRouter.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.v7.MediaRouter.dll
-
-
- ..\..\packages\Xamarin.Android.Support.v7.Palette.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.v7.Palette.dll
-
-
- ..\..\packages\Xamarin.Android.Support.v7.RecyclerView.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.v7.RecyclerView.dll
-
-
- ..\..\packages\Xamarin.Android.Support.Vector.Drawable.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Vector.Drawable.dll
-
-
- ..\..\packages\Xamarin.Forms.3.2.0.871581\lib\MonoAndroid10\Xamarin.Forms.Core.dll
-
-
- ..\..\packages\Xamarin.Forms.3.2.0.871581\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
-
-
- ..\..\packages\Xamarin.Forms.3.2.0.871581\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
-
-
- ..\..\packages\Xamarin.Forms.3.2.0.871581\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Ads.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Ads.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Ads.Lite.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Ads.Lite.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Base.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Base.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Basement.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Basement.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Gass.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Gass.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Gcm.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Gcm.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Iid.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Iid.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Maps.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Maps.dll
- True
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Places.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Places.dll
-
-
- ..\..\packages\Xamarin.GooglePlayServices.Tasks.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Tasks.dll
-
-
- ..\..\packages\Xamarin.RangeSlider.0.8.0\lib\MonoAndroid10\Xamarin.RangeSlider.Common.dll
-
-
- ..\..\packages\Xamarin.RangeSlider.0.8.0\lib\MonoAndroid10\Xamarin.RangeSlider.Droid.dll
-
-
- ..\..\packages\Xamarin.Forms.RangeSlider.0.8.0\lib\MonoAndroid10\Xamarin.RangeSlider.Forms.dll
-
-
- ..\..\packages\Xamarin.Forms.RangeSlider.0.8.0\lib\MonoAndroid10\Xamarin.RangeSlider.Forms.Droid.dll
-
-
- ..\..\packages\XLabs.Cryptography.2.0.5782\lib\portable-net45+netcore45+wp8+MonoAndroid1+MonoTouch1\XLabs.Cryptography.dll
-
-
- ..\..\packages\ZXing.Net.Mobile.2.4.1\lib\MonoAndroid71\ZXing.Net.Mobile.Core.dll
- True
-
-
- ..\..\packages\ZXing.Net.Mobile.Forms.2.4.1\lib\MonoAndroid71\ZXing.Net.Mobile.Forms.dll
- True
-
-
- ..\..\packages\ZXing.Net.Mobile.Forms.2.4.1\lib\MonoAndroid71\ZXing.Net.Mobile.Forms.Android.dll
- True
-
-
- ..\..\packages\ZXing.Net.Mobile.2.4.1\lib\MonoAndroid71\zxing.portable.dll
- True
-
-
- ..\..\packages\ZXing.Net.Mobile.2.4.1\lib\MonoAndroid71\ZXingNetMobile.dll
- True
-
-
-
+
@@ -439,14 +102,13 @@
+
-
- Designer
-
+
Designer
@@ -2420,7 +2082,6 @@
-
@@ -2445,6 +2106,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2452,84 +2132,2001 @@
NL.HNOGames.Domoticz
+
+
+ 7.1.0.442
+
+
+ 1.4.2
+
+
+ 2.0.11
+
+
+ 1.2.0
+
+
+ 2.7.9
+
+
+ 4.7.0
+
+
+ 3.1.0
+
+
+ 4.3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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Properties/AndroidManifest.xml b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Properties/AndroidManifest.xml
index 8e0e680..278011a 100644
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Properties/AndroidManifest.xml
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Properties/AndroidManifest.xml
@@ -1,21 +1,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/PushNotificationStarted.txt b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/PushNotificationStarted.txt
new file mode 100644
index 0000000..90fa31c
--- /dev/null
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/PushNotificationStarted.txt
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Android.App;
+using Android.Content;
+using Android.Runtime;
+using PushNotification.Plugin;
+
+namespace NL.HNOGames.Domoticz.Droid
+{
+ //This is a starting point application class so that push notifications can be handle even when push is closed.
+
+ [Application]
+ public class PushNotificationAppStarter : Application
+ {
+ public static Context AppContext;
+
+ public PushNotificationAppStarter(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
+ {
+
+ }
+
+ public override void OnCreate()
+ {
+ base.OnCreate();
+
+ AppContext = this.ApplicationContext;
+
+ //TODO: Initialize CrossPushNotification Plugin
+ //TODO: Replace string parameter with your Android SENDER ID
+ //TODO: Specify the listener class implementing IPushNotificationListener interface in the Initialize generic
+ //CrossPushNotification.Initialize("");
+
+ StartPushService();
+ }
+
+ public static void StartPushService()
+ {
+ AppContext.StartService(new Intent(AppContext, typeof(PushNotificationService)));
+
+ if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Kitkat)
+ {
+
+ PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext, typeof(PushNotificationService)), 0);
+ AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(Context.AlarmService);
+ alarm.Cancel(pintent);
+ }
+ }
+
+ public static void StopPushService()
+ {
+ AppContext.StopService(new Intent(AppContext, typeof(PushNotificationService)));
+ if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Kitkat)
+ {
+ PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext, typeof(PushNotificationService)), 0);
+ AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(Context.AlarmService);
+ alarm.Cancel(pintent);
+ }
+ }
+
+ }
+}
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Renderer/AdMobRenderer.cs b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Renderer/AdMobRenderer.cs
index 89ee8bb..9a1adad 100644
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Renderer/AdMobRenderer.cs
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Renderer/AdMobRenderer.cs
@@ -1,39 +1,52 @@
using Android.Content;
using NL.HNOGames.Domoticz.Controls;
-using Xamarin.Forms.Platform.Android;
-using Xamarin.Forms;
using NL.HNOGames.Domoticz.Droid.Renderer;
+using Xamarin.Forms;
+using Xamarin.Forms.Platform.Android;
+
[assembly: ExportRenderer(typeof(AdMobView), typeof(AdMobRenderer))]
namespace NL.HNOGames.Domoticz.Droid.Renderer
{
- public class AdMobRenderer : ViewRenderer
- {
- ///
- /// Constructor
- ///
- ///
- public AdMobRenderer(Context context)
+ ///
+ /// Defines the
+ ///
+ public class AdMobRenderer : ViewRenderer
+ {
+ #region Constructor & Destructor
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public AdMobRenderer(Context context)
: base(context)
- { }
+ {
+ }
+
+ #endregion
- protected override void OnElementChanged(ElementChangedEventArgs e)
- {
- base.OnElementChanged(e);
+ ///
+ /// The OnElementChanged
+ ///
+ /// The e
+ protected override void OnElementChanged(ElementChangedEventArgs e)
+ {
+ base.OnElementChanged(e);
- if (Control != null) return;
- var ad = new Android.Gms.Ads.AdView(Forms.Context)
- {
- AdSize = Android.Gms.Ads.AdSize.Banner,
- AdUnitId = "ca-app-pub-2210179934394995/1566859863"
- };
+ if (Control != null) return;
+ var ad = new Android.Gms.Ads.AdView(Forms.Context)
+ {
+ AdSize = Android.Gms.Ads.AdSize.Banner,
+ AdUnitId = "ca-app-pub-2210179934394995/1566859863"
+ };
- var requestbuilder = new Android.Gms.Ads.AdRequest.Builder();
+ var requestbuilder = new Android.Gms.Ads.AdRequest.Builder();
#if DEBUG
- requestbuilder.AddTestDevice("83DBECBB403C3E924CAA8B529F7E848E");
+ requestbuilder.AddTestDevice("83DBECBB403C3E924CAA8B529F7E848E");
#endif
- ad.LoadAd(requestbuilder.Build());
- SetNativeControl(ad);
- }
- }
-}
\ No newline at end of file
+ ad.LoadAd(requestbuilder.Build());
+ SetNativeControl(ad);
+ }
+ }
+}
diff --git a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Renderer/CustomMultiLineLabelRenderer.cs b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Renderer/CustomMultiLineLabelRenderer.cs
index ed8f644..01a524c 100644
--- a/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Renderer/CustomMultiLineLabelRenderer.cs
+++ b/NL.HNOGames.Domoticz/NL.HNOGames.Domoticz.Android/Renderer/CustomMultiLineLabelRenderer.cs
@@ -1,30 +1,42 @@
-using Xamarin.Forms.Platform.Android;
-using Xamarin.Forms;
+using Android.Content;
using NL.HNOGames.Domoticz.Controls;
-using Android.Content;
+using Xamarin.Forms;
+using Xamarin.Forms.Platform.Android;
namespace NL.HNOGames.Domoticz.Droid.Renderer
{
- public class CustomMultiLineLabelRenderer : LabelRenderer
- {
- ///
- /// Constructor
- ///
- ///
- public CustomMultiLineLabelRenderer(Context context)
+ ///
+ /// Defines the
+ ///
+ public class CustomMultiLineLabelRenderer : LabelRenderer
+ {
+ #region Constructor & Destructor
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public CustomMultiLineLabelRenderer(Context context)
: base(context)
- { }
+ {
+ }
+
+ #endregion
- protected override void OnElementChanged(ElementChangedEventArgs