예제 #1
0
 public void RequestFriends(Google.RequestFriendsDelegate callback)
 {
     Log.Debug("[GoogleiOS] not supported API");
     if (null != callback)
     {
         Result result = new Result(Result.NETMARBLES_DOMAIN, Result.NOT_SUPPORTED, "Not supported channel");
         callback(result, null, null);
     }
 }
예제 #2
0
        public int SetRequestFriendsCallback(Google.RequestFriendsDelegate callback)
        {
            if (null == callback)
            {
                return(0);
            }

            int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message)
            {
                Log.Debug("[GoogleCallback] RequestFriendsCallback: " + message.ToString());

                Result result = message.GetResult();

                IList appFriendProfileList   = message.GetList("appFriendProfileList");
                List <GoogleProfile> appList = null;
                if (null != appFriendProfileList)
                {
                    appList = new List <GoogleProfile>();
                    foreach (IDictionary profileDic in appFriendProfileList)
                    {
                        string playerId        = profileDic.GetString("playerId");
                        string googleId        = profileDic.GetString("googleId");
                        string nickname        = profileDic.GetString("nickname");
                        string profileImageUrl = profileDic.GetString("profileImageUrl");
                        appList.Add(new GoogleProfile(playerId, googleId, nickname, profileImageUrl));
                    }
                }

                IList nonAppFriendProfileList   = message.GetList("nonAppFriendProfileList");
                List <GoogleProfile> nonappList = null;
                if (null != nonAppFriendProfileList)
                {
                    nonappList = new List <GoogleProfile>();
                    foreach (IDictionary profileDic in nonAppFriendProfileList)
                    {
                        string playerId        = profileDic.GetString("playerId");
                        string googleId        = profileDic.GetString("googleId");
                        string nickname        = profileDic.GetString("nickname");
                        string profileImageUrl = profileDic.GetString("profileImageUrl");
                        nonappList.Add(new GoogleProfile(playerId, googleId, nickname, profileImageUrl));
                    }
                }

                if (null != callback)
                {
                    callback(result, appList, nonappList);
                }
            });

            return(handlerNum);
        }
예제 #3
0
 public void RequestFriends(Google.RequestFriendsDelegate callback)
 {
 }
예제 #4
0
        public void RequestFriends(Google.RequestFriendsDelegate callback)
        {
            int handlerNum = googleCallback.SetRequestFriendsCallback(callback);

            googleAndroidClass.CallStatic("nmg_google_requestFriends", handlerNum);
        }