Exemplo n.º 1
0
        /// <summary>
        /// 初期化処理
        /// </summary>
        /// <param name="bundle"></param>
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App(new AndroidInitializer()));

            AppCenter.Start("1bcf60ce-7dc3-4084-b04f-8227131443f1", typeof(Analytics), typeof(Crashes));

            // デバイスID登録
            // この処理はDependencyServiceを使うのでForms.Initの前に呼び出してはいけない
            if (UserDataModel.Instance.DeviceId == null)
            {
                UserDataModel.Instance.DeviceId = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId);
            }

            // ジオフェンスの初期化
            _registerGeofences = new RegisterGeofences(this, this);
        }
Exemplo n.º 2
0
        public RegisterGeofences_Droid()
        {
            var context = Android.App.Application.Context;

            _registerGeofences = new RegisterGeofences(context);
        }