protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); uiHelper = new UiLifecycleHelper(this, callback); uiHelper.OnCreate(savedInstanceState); var info = PackageManager.GetPackageInfo("com.sammdesmond.popPIC", Android.Content.PM.PackageInfoFlags.Signatures); foreach (var signature in info.Signatures) { MessageDigest me = MessageDigest.GetInstance("SHA"); me.Update(signature.ToByteArray()); var s = Base64.EncodeToString(me.Digest(), Base64Flags.Default); Log.Error("ssl key", s); // ShowAlert ("Danny ignore this", s); } SetContentView(Resource.Layout.loginPage); loginButton = (LoginButton)FindViewById(Resource.Id.login_button); loginButton.UserInfoChangedCallback = new MyUserInfoChangedCallback(this); loginButton.LoginBehavior = SessionLoginBehavior.SsoWithFallback; greeting = FindViewById <TextView> (Resource.Id.greeting); var activeSession = Session.OpenActiveSessionFromCache(this); if (activeSession != null && activeSession.IsOpened) { // Do somethign interesting! } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); uiHelper = new UiLifecycleHelper(this, callback); uiHelper.OnCreate(savedInstanceState); if (savedInstanceState != null) { string name = savedInstanceState.GetString(PENDING_ACTION_BUNDLE_KEY); pendingAction = (PendingAction)Enum.Parse(typeof(PendingAction), name); } SetContentView(Resource.Layout.main); loginButton = (LoginButton)FindViewById(Resource.Id.login_button); loginButton.UserInfoChangedCallback = new MyUserInfoChangedCallback(this); profilePictureView = FindViewById <ProfilePictureView> (Resource.Id.profilePicture); greeting = FindViewById <TextView> (Resource.Id.greeting); postStatusUpdateButton = FindViewById <Button> (Resource.Id.postStatusUpdateButton); postStatusUpdateButton.Click += delegate { OnClickPostStatusUpdate(); }; postPhotoButton = (Button)FindViewById(Resource.Id.postPhotoButton); postPhotoButton.Click += delegate { OnClickPostPhoto(); }; pickFriendsButton = (Button)FindViewById(Resource.Id.pickFriendsButton); pickFriendsButton.Click += delegate { OnClickPickFriends(); }; pickPlaceButton = (Button)FindViewById(Resource.Id.pickPlaceButton); pickPlaceButton.Click += delegate { OnClickPickPlace(); }; controlsContainer = (ViewGroup)FindViewById(Resource.Id.main_ui_container); FragmentManager fm = SupportFragmentManager; Fragment fragment = fm.FindFragmentById(Resource.Id.fragment_container); if (fragment != null) { // If we're being re-created and have a fragment, we need to a) hide the main UI controls and // b) hook up its listeners again. controlsContainer.Visibility = ViewStates.Gone; if (fragment is FriendPickerFragment) { SetFriendPickerListeners((FriendPickerFragment)fragment); } else if (fragment is PlacePickerFragment) { SetPlacePickerListeners((PlacePickerFragment)fragment); } } fm.BackStackChanged += delegate { if (fm.BackStackEntryCount == 0) { // We need to re-show our UI. controlsContainer.Visibility = ViewStates.Visible; } }; }
protected override void OnCreate (Bundle savedInstanceState) { base.OnCreate (savedInstanceState); uiHelper = new UiLifecycleHelper (this, callback); uiHelper.OnCreate (savedInstanceState); if (savedInstanceState != null) { string name = savedInstanceState.GetString (PENDING_ACTION_BUNDLE_KEY); pendingAction = (PendingAction)Enum.Parse (typeof(PendingAction), name); } SetContentView (Resource.Layout.main); loginButton = (LoginButton)FindViewById (Resource.Id.login_button); loginButton.UserInfoChangedCallback = new MyUserInfoChangedCallback (this); profilePictureView = FindViewById<ProfilePictureView> (Resource.Id.profilePicture); greeting = FindViewById<TextView> (Resource.Id.greeting); postStatusUpdateButton = FindViewById<Button> (Resource.Id.postStatusUpdateButton); postStatusUpdateButton.Click += delegate { OnClickPostStatusUpdate (); }; postPhotoButton = (Button)FindViewById (Resource.Id.postPhotoButton); postPhotoButton.Click += delegate { OnClickPostPhoto (); }; pickFriendsButton = (Button)FindViewById (Resource.Id.pickFriendsButton); pickFriendsButton.Click += delegate { OnClickPickFriends (); }; pickPlaceButton = (Button)FindViewById (Resource.Id.pickPlaceButton); pickPlaceButton.Click += delegate { OnClickPickPlace (); }; controlsContainer = (ViewGroup)FindViewById (Resource.Id.main_ui_container); FragmentManager fm = SupportFragmentManager; Fragment fragment = fm.FindFragmentById (Resource.Id.fragment_container); if (fragment != null) { // If we're being re-created and have a fragment, we need to a) hide the main UI controls and // b) hook up its listeners again. controlsContainer.Visibility = ViewStates.Gone; if (fragment is FriendPickerFragment) { SetFriendPickerListeners ((FriendPickerFragment)fragment); } else if (fragment is PlacePickerFragment) { SetPlacePickerListeners ((PlacePickerFragment)fragment); } } fm.BackStackChanged += delegate { if (fm.BackStackEntryCount == 0) { // We need to re-show our UI. controlsContainer.Visibility = ViewStates.Visible; } }; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); _uiHelper = new UiLifecycleHelper (this, _callback); SetContentView (Resource.Layout.Login); _loginButton = (LoginButton)FindViewById (Resource.Id.login_button); _loginButton.UserInfoChangedCallback = new MyUserInfoChangedCallback (this); _loginButton.SetReadPermissions(new List<string>{"email"}); //_profilePictureView = FindViewById<ProfilePictureView> (Resource.Id.profilePicture); //_greeting = FindViewById<TextView> (Resource.Id.greeting); _mainLayoutView = FindViewById<LinearLayout> (Resource.Id.main_ui_container); _continueAnonymouslyButton = FindViewById<Button>(Resource.Id.btnNoLogin); _continueAnonymouslyButton.Click += (object sender, EventArgs e) => StartActivity (typeof (IntroActivity)); UpdateUI (); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); _uiHelper = new UiLifecycleHelper(this, callback); _uiHelper.OnCreate(savedInstanceState); if (savedInstanceState != null) { string name = savedInstanceState.GetString(PENDING_ACTION_BUNDLE_KEY); _pendingAction = (PendingAction)Enum.Parse(typeof(PendingAction), name); } SetContentView(Resource.Layout.FacebookScreen); //_googlePlayLink = "http://play.google.com/store/apps/details?id=" + this.PackageName; _ID = Intent.GetIntExtra("ID", 0); _Item = MainActivity._BDDB.SelectItem(_ID); TimeSpan ts = _Item._EndDate.Subtract(DateTime.Now); string DaysTo = String.Format("{0:0000}", ts.Days); string HoursTo = String.Format("{0:00}", ts.Hours); string MinTo = String.Format("{0:00}", ts.Minutes); string SecTo = String.Format("{0:00}", ts.Seconds); _message = string.Format("{0} {1} {2} days, {3} hours, {4} minutes, {5} seconds {6}", _Item._Name, _Item._EndDate < DateTime.Now ? "was" : "is coming in", DaysTo, HoursTo, MinTo, SecTo, _Item._EndDate < DateTime.Now ? " ago" : ""); _textFacebookDescription = (TextView)FindViewById(Resource.Id.textFacebookDescription); _textFacebookDescription.Text = _message; _textMessage = (EditText)FindViewById(Resource.Id.txtMessage); _loginButton = (LoginButton)FindViewById(Resource.Id.facebook_login_button); _loginButton.UserInfoChangedCallback = new MyUserInfoChangedCallback(this); _postStatusUpdateButton = FindViewById <Button> (Resource.Id.postStatusUpdateButton); _postStatusUpdateButton.Click += delegate { OnClickPostStatusUpdate(); }; _controlsContainer = (ViewGroup)FindViewById(Resource.Id.main_ui_container); Android.Support.V4.App.FragmentManager fm = SupportFragmentManager; Android.Support.V4.App.Fragment fragment = fm.FindFragmentById(Resource.Id.fragment_container); if (fragment != null) { // If we're being re-created and have a fragment, we need to a) hide the main UI controls and // b) hook up its listeners again. _controlsContainer.Visibility = ViewStates.Gone; } fm.BackStackChanged += delegate { if (fm.BackStackEntryCount == 0) { // We need to re-show our UI. _controlsContainer.Visibility = ViewStates.Visible; } }; }