示例#1
0
        public void alertSub(Activity actualActivity, AppCore.User u)
        {
            List <AppCore.User> uses = LegionUtils.getListJson(appPreferences.getValueKey(AppPreferences.CONTACTS));

            new AlertDialog.Builder(actualActivity)
            .SetPositiveButton("Yes", (s, args) =>
            {
                Log.Info("Accept friend request");
                ActivityService.GetInstance.App.Xmpp.Approve(u.Jid);
                uses.Add(u);
                LegionUtils.saveFoundContacts(uses, appPreferences, AppPreferences.CONTACTS);
                LegionUtils.saveFoundContacts(new List <AppCore.User>(), appPreferences, AppPreferences.FRIEND_REQUEST);
                appPreferences.saveKey(AppPreferences.FIRST_ACCESS, true);
            })
            .SetNegativeButton("No", (s, args) =>
            {
                Log.Info("Deny friend request");
                ActivityService.GetInstance.App.Xmpp.Deny(u.Jid);
            })
            .SetTitle("Friend Request")
            .SetMessage("Would you like to add " + u.Jid + " as a friend?")
            .Show();
        }
示例#2
0
 protected virtual void XmppClient_OnClose(object sender, EventArgs e)
 {
     Log.Debug("OnClose");
 }