internal Platform(Context context, bool embedded) { _embedded = embedded; _context = context; PackageName = context?.PackageName; _renderer = new PlatformRenderer(context, this); var activity = _context.GetActivity(); if (embedded && activity != null) { // Set up handling of DisplayAlert/DisplayActionSheet/UpdateProgressBarVisibility if (_context == null) { // Can't show dialogs if it's not an activity return; } PopupManager.Subscribe(_context.GetActivity()); return; } FormsAppCompatActivity.BackPressed += HandleBackPressed; }
protected FormsAppCompatActivity() { _previousState = AndroidApplicationLifecycleState.Uninitialized; _currentState = AndroidApplicationLifecycleState.Uninitialized; PopupManager.Subscribe(this); }