Révision 91ef3e8c TestTeoBluetooth/TestTeoBluetooth.Android/MainActivity.cs

Voir les différences:

TestTeoBluetooth/TestTeoBluetooth.Android/MainActivity.cs
5 5
using Android.Runtime;
6 6
using Android.OS;
7 7
using Xamarin.Forms;
8
using TeoTestBluetooth.Services;
9
using TestBLE.Droid.Connection;
10
using TestTeoBluetooth.Connection;
8
using TestXamConnections.Services;
9
using TestXamConnections.Droid.Connection;
10
using TestXamConnections.Connection;
11
using TestXamConnections.Helper;
12
using TestBLE.Droid.Helper;
13
using TestXamConnections.Droid.Services;
11 14

  
12
namespace TeoTestBluetooth.Droid
15
namespace TestXamConnections.Droid
13 16
{
14 17
    [Activity(Label = "TestBLE", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )]
15 18
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
......
20 23

  
21 24
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
22 25
            Forms.Init(this, savedInstanceState);
23
            DependencyService.Register<IConnectionService, BluetoothConnection>();
24
            DependencyService.Register<IConnectionService, InternConnection>();
26
            DependencyService.RegisterSingleton<IConnectionServiceProvider>(new ConnectionServiceUpdater());
27
            DependencyService.RegisterSingleton<IBluetoothService>(new BluetoothService());
25 28
            LoadApplication(new App());
26 29
        }
27 30
        public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)

Formats disponibles : Unified diff