From 3ef3a9aa58754c2ec364c839da625929e2aa0a76 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Mon, 11 Jan 2016 03:51:40 +0200 Subject: [PATCH] Updated the portable sample --- .../MainApplication.cs | 63 +++++++++++ ...icrosoft.Band.Portable.Sample.Droid.csproj | 103 ++++++++++++------ .../packages.config | 21 ++-- .../App.xaml.cs | 2 +- ...icrosoft.Band.Portable.Sample.Phone.csproj | 71 +++++++----- .../packages.config | 12 +- ...rosoft.Band.Portable.Sample.Windows.csproj | 71 +++++++----- .../packages.config | 12 +- .../Microsoft.Band.Portable.Sample.iOS.csproj | 64 ++++++----- .../packages.config | 10 +- .../AddTilePage.xaml | 18 +-- .../ClientPage.xaml | 11 +- .../ColorPickerPage.xaml | 17 +-- .../MainPage.xaml | 11 +- .../Microsoft.Band.Portable.Sample.csproj | 46 ++++---- .../NotificationsPage.xaml | 11 +- .../PersonalizationPage.xaml | 18 +-- .../SensorsPage.xaml | 11 +- .../ThemePickerPage.xaml | 17 +-- .../TilesPage.xaml | 17 +-- .../VibrationsPage.xaml | 11 +- .../ViewModels/AddTileViewModel.cs | 2 +- .../ViewModels/ClientViewModel.cs | 8 +- .../ViewModels/NotificationsViewModel.cs | 2 +- .../ViewModels/PersonalizationViewModel.cs | 2 +- .../packages.config | 8 +- 26 files changed, 399 insertions(+), 240 deletions(-) create mode 100644 Demos/Microsoft.Band.Portable.Sample/Microsoft.Band.Portable.Sample.Droid/MainApplication.cs diff --git a/Demos/Microsoft.Band.Portable.Sample/Microsoft.Band.Portable.Sample.Droid/MainApplication.cs b/Demos/Microsoft.Band.Portable.Sample/Microsoft.Band.Portable.Sample.Droid/MainApplication.cs new file mode 100644 index 0000000..41c38d4 --- /dev/null +++ b/Demos/Microsoft.Band.Portable.Sample/Microsoft.Band.Portable.Sample.Droid/MainApplication.cs @@ -0,0 +1,63 @@ +using System; + +using Android.App; +using Android.OS; +using Android.Runtime; +using Plugin.CurrentActivity; + +namespace Microsoft.Band.Portable.Sample.Droid +{ + //You can specify additional application information in this attribute + [Application] + public class MainApplication : Application, Application.IActivityLifecycleCallbacks + { + public MainApplication(IntPtr handle, JniHandleOwnership transer) + :base(handle, transer) + { + } + + public override void OnCreate() + { + base.OnCreate(); + RegisterActivityLifecycleCallbacks(this); + //A great place to initialize Xamarin.Insights and Dependency Services! + } + + public override void OnTerminate() + { + base.OnTerminate(); + UnregisterActivityLifecycleCallbacks(this); + } + + public void OnActivityCreated(Activity activity, Bundle savedInstanceState) + { + CrossCurrentActivity.Current.Activity = activity; + } + + public void OnActivityDestroyed(Activity activity) + { + } + + public void OnActivityPaused(Activity activity) + { + } + + public void OnActivityResumed(Activity activity) + { + CrossCurrentActivity.Current.Activity = activity; + } + + public void OnActivitySaveInstanceState(Activity activity, Bundle outState) + { + } + + public void OnActivityStarted(Activity activity) + { + CrossCurrentActivity.Current.Activity = activity; + } + + public void OnActivityStopped(Activity activity) + { + } + } +} \ No newline at end of file diff --git a/Demos/Microsoft.Band.Portable.Sample/Microsoft.Band.Portable.Sample.Droid/Microsoft.Band.Portable.Sample.Droid.csproj b/Demos/Microsoft.Band.Portable.Sample/Microsoft.Band.Portable.Sample.Droid/Microsoft.Band.Portable.Sample.Droid.csproj index b5758ee..ef4f657 100644 --- a/Demos/Microsoft.Band.Portable.Sample/Microsoft.Band.Portable.Sample.Droid/Microsoft.Band.Portable.Sample.Droid.csproj +++ b/Demos/Microsoft.Band.Portable.Sample/Microsoft.Band.Portable.Sample.Droid/Microsoft.Band.Portable.Sample.Droid.csproj @@ -59,57 +59,96 @@ False + + ..\packages\Xamarin.Forms.2.0.0.6490\lib\MonoAndroid10\FormsViewGroup.dll + True + + + ..\packages\Xamarin.Microsoft.Band.Native.1.3.7\lib\MonoAndroid\Microsoft.Band.Android.dll + True + + + ..\packages\Xamarin.Microsoft.Band.1.3.7\lib\MonoAndroid\Microsoft.Band.Portable.dll + True + - - - - - - ..\packages\Xam.Plugins.Notifier.1.0.2\lib\MonoAndroid10\EdSnider.Plugins.Core.dll + + ..\packages\Plugin.CurrentActivity.1.0.1\lib\MonoAndroid10\Plugin.CurrentActivity.dll + True - - ..\packages\Xam.Plugins.Notifier.1.0.2\lib\MonoAndroid10\EdSnider.Plugins.Notifier.dll + + ..\packages\Xam.Plugins.Notifier.2.0.2\lib\MonoAndroid10\Plugin.LocalNotifications.dll + True - - ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\FormsViewGroup.dll + + ..\packages\Xam.Plugins.Notifier.2.0.2\lib\MonoAndroid10\Plugin.LocalNotifications.Abstractions.dll + True - - ..\packages\Xam.Plugin.Media.1.0.2\lib\MonoAndroid10\Media.Plugin.dll + + ..\packages\Xam.Plugin.Media.2.1.2\lib\MonoAndroid10\Plugin.Media.dll + True - - ..\packages\Xam.Plugin.Media.1.0.2\lib\MonoAndroid10\Media.Plugin.Abstractions.dll + + ..\packages\Xam.Plugin.Media.2.1.2\lib\MonoAndroid10\Plugin.Media.Abstractions.dll + True - - ..\packages\Xamarin.Microsoft.Band.Native.1.3.6\lib\MonoAndroid\Microsoft.Band.Android.dll + + ..\packages\Plugin.Permissions.1.1.4\lib\MonoAndroid10\Plugin.Permissions.dll + True - - ..\packages\Xamarin.Microsoft.Band.1.3.6\lib\MonoAndroid\Microsoft.Band.Portable.dll + + ..\packages\Plugin.Permissions.1.1.4\lib\MonoAndroid10\Plugin.Permissions.Abstractions.dll + True - + + + + + + ..\packages\Xamarin.Android.Support.Design.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.Design.dll + True + + ..\packages\Xamarin.Android.Support.v13.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v13.dll + True - + ..\packages\Xamarin.Android.Support.v4.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll + True - + ..\packages\Xamarin.Android.Support.v7.AppCompat.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll + True + + + ..\packages\Xamarin.Android.Support.v7.CardView.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll + True + + + ..\packages\Xamarin.Android.Support.v7.MediaRouter.23.0.1.3\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll + True - - ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Core.dll + + ..\packages\Xamarin.Forms.2.0.0.6490\lib\MonoAndroid10\Xamarin.Forms.Core.dll + True - - ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + + ..\packages\Xamarin.Forms.2.0.0.6490\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + True - - ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll + + ..\packages\Xamarin.Forms.2.0.0.6490\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll + True - - ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll + + ..\packages\Xamarin.Forms.2.0.0.6490\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll + True + @@ -140,12 +179,12 @@ - + - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + 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}. - +