protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); SetIcon(); SystemRequirementsChecker.CheckWithDefaultDialogs(this); ShowProgress("Loading..."); pref = PreferenceManager.GetDefaultSharedPreferences(this); string login_token = pref.GetString(Constants.PREF_TOKEN_TAG, ""); if (login_token.Equals("")) { Intent openLoginScreen = new Intent(this, typeof(LoginActivity)); StartActivity(openLoginScreen); Finish(); } else { Intent openInboxScreen = new Intent(this, typeof(InboxActivity)); StartActivity(openInboxScreen); Finish(); } EndProgress(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SystemRequirementsChecker.CheckWithDefaultDialogs(this); Estimote.EnableDebugLogging(true); Estimote.Initialize(this, "test-nm6", "9e7bddbce8bbbfc9d6427ece93bf279d"); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById <Button>(Resource.Id.myButton); button.Click += delegate { button.Text = $"{count++} clicks!"; }; // Create your application here beaconManager = new BeaconManager(this); beaconManager.Nearable += (sender, e) => { var items = e.Nearables; if (items.Count > 0) { Toast.MakeText(this, string.Format("Found {0} nearables.", items.Count), ToastLength.Short).Show(); } }; beaconManager.Connect(this); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Register); SystemRequirementsChecker.CheckWithDefaultDialogs(this); Init(); SetIcon(); }
protected async override void OnResume() { base.OnResume(); _beaconManager.Connect(this); SystemRequirementsChecker.CheckWithDefaultDialogs(this); await GetDataAsync().ContinueWith((task) => { RunOnUiThread(() => { EndProgress(); }); }); }
protected async override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.ReadMessage); SystemRequirementsChecker.CheckWithDefaultDialogs(this); ShowProgress("Loading..."); await Init().ContinueWith((task) => { RunOnUiThread(() => { EndProgress(); }); }); SetIcon(); }
protected override void OnResume() { base.OnResume(); SystemRequirementsChecker.CheckWithDefaultDialogs(this); }