diff --git a/TestUnitaire/TestUnitaire.csproj b/TestUnitaire/TestUnitaire.csproj index 076dacf..af3cfc9 100644 --- a/TestUnitaire/TestUnitaire.csproj +++ b/TestUnitaire/TestUnitaire.csproj @@ -27,6 +27,15 @@ 4 + + ..\packages\MvvmCross.Plugin.BLE.2.1.1\lib\netstandard2.0\MvvmCross.Plugins.BLE.dll + + + ..\packages\Plugin.BLE.2.1.1\lib\netstandard2.0\Plugin.BLE.dll + + + ..\packages\Plugin.BLE.2.1.1\lib\netstandard2.0\Plugin.BLE.Abstractions.dll + ..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll diff --git a/TestUnitaire/packages.config b/TestUnitaire/packages.config index f3eaa94..a203ad4 100644 --- a/TestUnitaire/packages.config +++ b/TestUnitaire/packages.config @@ -1,6 +1,8 @@  + + diff --git a/TheGameExtreme.Android/MainActivity.cs b/TheGameExtreme.Android/MainActivity.cs index 5eafc09..42cef58 100644 --- a/TheGameExtreme.Android/MainActivity.cs +++ b/TheGameExtreme.Android/MainActivity.cs @@ -6,6 +6,7 @@ using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; +using Xamarin.Forms; namespace TheGameExtreme.Droid { @@ -30,5 +31,7 @@ namespace TheGameExtreme.Droid base.OnRequestPermissionsResult(requestCode, permissions, grantResults); } + + } } diff --git a/TheGameExtreme.Android/Properties/AndroidManifest.xml b/TheGameExtreme.Android/Properties/AndroidManifest.xml index c33db26..69ec06d 100644 --- a/TheGameExtreme.Android/Properties/AndroidManifest.xml +++ b/TheGameExtreme.Android/Properties/AndroidManifest.xml @@ -3,6 +3,13 @@ + + + + + + + \ No newline at end of file diff --git a/TheGameExtreme.Android/Resources/drawable/TrierImageB.png b/TheGameExtreme.Android/Resources/drawable/TrierImageB.png index 0cb05a4..3a216ac 100644 Binary files a/TheGameExtreme.Android/Resources/drawable/TrierImageB.png and b/TheGameExtreme.Android/Resources/drawable/TrierImageB.png differ diff --git a/TheGameExtreme.Android/TheGameExtreme.Android.csproj b/TheGameExtreme.Android/TheGameExtreme.Android.csproj index 1910ff4..d23d799 100644 --- a/TheGameExtreme.Android/TheGameExtreme.Android.csproj +++ b/TheGameExtreme.Android/TheGameExtreme.Android.csproj @@ -48,6 +48,7 @@ + @@ -56,6 +57,9 @@ + + 2.1.1 + diff --git a/TheGameExtreme.iOS/AppDelegate.cs b/TheGameExtreme.iOS/AppDelegate.cs index d3736f2..6dffecf 100644 --- a/TheGameExtreme.iOS/AppDelegate.cs +++ b/TheGameExtreme.iOS/AppDelegate.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Foundation; +using Foundation; using UIKit; namespace TheGameExtreme.iOS @@ -20,6 +16,7 @@ namespace TheGameExtreme.iOS // // You have 17 seconds to return from this method, or iOS will terminate your application. // + public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); diff --git a/TheGameExtreme.iOS/Info.plist b/TheGameExtreme.iOS/Info.plist index 90ddd14..9dbda89 100644 --- a/TheGameExtreme.iOS/Info.plist +++ b/TheGameExtreme.iOS/Info.plist @@ -19,6 +19,24 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + + UIBackgroundModes + + + bluetooth-central + + + bluetooth-peripheral + + + + NSBluetoothPeripheralUsageDescription + YOUR CUSTOM MESSAGE + + + NSBluetoothAlwaysUsageDescription + + Wallah MinimumOSVersion 8.0 CFBundleDisplayName diff --git a/TheGameExtreme.iOS/Resources/TrierImageB.ico b/TheGameExtreme.iOS/Resources/TrierImageB.ico index b1076a7..6888576 100644 Binary files a/TheGameExtreme.iOS/Resources/TrierImageB.ico and b/TheGameExtreme.iOS/Resources/TrierImageB.ico differ diff --git a/TheGameExtreme.iOS/TheGameExtreme.iOS.csproj b/TheGameExtreme.iOS/TheGameExtreme.iOS.csproj index c39dabe..11952dd 100644 --- a/TheGameExtreme.iOS/TheGameExtreme.iOS.csproj +++ b/TheGameExtreme.iOS/TheGameExtreme.iOS.csproj @@ -137,6 +137,9 @@ + + 2.1.1 + diff --git a/TheGameExtreme/TheGameExtreme.csproj b/TheGameExtreme/TheGameExtreme.csproj index 2d54fe8..3781ebb 100644 --- a/TheGameExtreme/TheGameExtreme.csproj +++ b/TheGameExtreme/TheGameExtreme.csproj @@ -6,6 +6,9 @@ + + + diff --git a/TheGameExtreme/view/HomePage.xaml b/TheGameExtreme/view/HomePage.xaml index d862d47..9a9ca38 100644 --- a/TheGameExtreme/view/HomePage.xaml +++ b/TheGameExtreme/view/HomePage.xaml @@ -52,7 +52,7 @@ WidthRequest="230" Clicked="OpenMultiPlayerMode" CornerRadius="10" - Margin="15" + Margin="15" BackgroundColor="{DynamicResource SkyBlueColor}"/> + + + \ No newline at end of file diff --git a/TheGameExtreme/view/MultiPlayerMode.xaml.cs b/TheGameExtreme/view/MultiPlayerMode.xaml.cs index 0df45af..579b4d7 100644 --- a/TheGameExtreme/view/MultiPlayerMode.xaml.cs +++ b/TheGameExtreme/view/MultiPlayerMode.xaml.cs @@ -1,21 +1,55 @@ -using System; -using System.Collections.Generic; - +using MvvmCross; +using Plugin.BLE; +using Plugin.BLE.Abstractions.Contracts; +using System; +using System.Collections.ObjectModel; using Xamarin.Forms; namespace TheGameExtreme.view { public partial class MultiPlayerMode : ContentPage { + /*IBluetoothLE ble; + IAdapter adapter; + ObservableCollection devicesList; + IDevice device;*/ + public MultiPlayerMode() { InitializeComponent(); NavigationPage.SetHasNavigationBar(this, false); + + /*ble = CrossBluetoothLE.Current; + adapter = CrossBluetoothLE.Current.Adapter; + devicesList = new ObservableCollection();*/ } - private async void BackMulti_Clicked(object sender, EventArgs e) + /*private async void BackMulti_Clicked(object sender, EventArgs e) { await Navigation.PopAsync(); } + + public void BtnStatueClicked(object sender, EventArgs args) + { + var state = ble.State; + this.DisplayAlert("Notice", state.ToString(), "ok"); + } + public async void BtnScanClicked(object sender, EventArgs args) + { + devicesList.Clear(); + adapter.DeviceDiscovered += (s, a) => + { + devicesList.Add(a.Device); + }; + + if (!ble.Adapter.IsScanning) + { + await adapter.StartScanningForDevicesAsync(); + } + + }*/ + + + } } diff --git a/UnitTestProjectGame/UnitTestProjectGame.csproj b/UnitTestProjectGame/UnitTestProjectGame.csproj index 044fe6d..42bc624 100644 --- a/UnitTestProjectGame/UnitTestProjectGame.csproj +++ b/UnitTestProjectGame/UnitTestProjectGame.csproj @@ -45,6 +45,15 @@ ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + ..\packages\MvvmCross.Plugin.BLE.2.1.1\lib\netstandard2.0\MvvmCross.Plugins.BLE.dll + + + ..\packages\Plugin.BLE.2.1.1\lib\netstandard2.0\Plugin.BLE.dll + + + ..\packages\Plugin.BLE.2.1.1\lib\netstandard2.0\Plugin.BLE.Abstractions.dll + diff --git a/UnitTestProjectGame/packages.config b/UnitTestProjectGame/packages.config index 2f7c5a1..8edb209 100644 --- a/UnitTestProjectGame/packages.config +++ b/UnitTestProjectGame/packages.config @@ -2,4 +2,6 @@ + + \ No newline at end of file