Ejemplo n.º 1
0
        public static IEnumerator GetFacebookFriendsIEnumerator(FBFriendArray fbFriendArray)
        {
            FBFriend[]          fbFriends = new FBFriend[fbFriendArray.ArraySize];
            AndroidJavaObject[] bigArray  = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(fbFriendArray.Array);

            int count = 0;

            for (int i = 0; i < bigArray.Length; i++)
            {
                AndroidJavaObject   tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray     = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0; j < InnerArray.Length; j++)
                {
                    using (AndroidJavaObject tempObj = InnerArray[j])
                    {
                        fbFriends[count].Id       = tempObj.Get <string>("mFacebookID");
                        fbFriends[count].Name     = tempObj.Get <string>("mFacebookName");
                        fbFriends[count].ImageURL = tempObj.Get <string>("mFacebookImage");
                        bool hasUser = false;
                        hasUser = tempObj.Get <bool>("mHasApplicasaUser");
                        if (hasUser)
                        {
                            AndroidJavaObject tempUserJavaObject = tempObj.Get <AndroidJavaObject>("user");
                            fbFriends[count].UserObj = new User(tempObj.GetRawObject(), tempObj);
                        }
                        count++;
                    }
                }
                yield return(new WaitForSeconds(0.2f));
            }
            FBFriends = fbFriends;
        }
Ejemplo n.º 2
0
        public static IEnumerator GetFacebookFriendsIEnumerator(FBFriendArray fbFriendArray)
        {
            yield return(new WaitForSeconds(4f));

            FBFriend[] fbFriends = new FBFriend[0];
            FBFriends = fbFriends;
        }
Ejemplo n.º 3
0
 public static FBFriend[] GetFacebookFriends(FBFriendArray fbFriendArray)
 {
     PrivateFBFriend[] pfbFriends = new PrivateFBFriend[fbFriendArray.ArraySize];
     FBFriend[]        fbFriends  = new FBFriend[fbFriendArray.ArraySize];
     for (int i = 0; i < fbFriendArray.ArraySize; i++)
     {
         IntPtr newPtr = Marshal.ReadIntPtr(fbFriendArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
         pfbFriends[i]         = ApplicasaUserGetFacebookFriend(newPtr);
         fbFriends[i].Id       = pfbFriends[i].Id;
         fbFriends[i].Name     = pfbFriends[i].Name;
         fbFriends[i].ImageURL = pfbFriends[i].ImageURL;
         if (pfbFriends[i].UserPtr.ToInt32() != 0)
         {
             fbFriends[i].UserObj = new User(pfbFriends[i].UserPtr);
         }
     }
     return(fbFriends);
 }
Ejemplo n.º 4
0
        public static IEnumerator GetFacebookFriendsIEnumerator(FBFriendArray fbFriendArray)
        {
            yield return(new WaitForSeconds(0.2f));

            PrivateFBFriend[] pfbFriends = new PrivateFBFriend[fbFriendArray.ArraySize];
            FBFriend[]        fbFriends  = new FBFriend[fbFriendArray.ArraySize];
            for (int i = 0; i < fbFriendArray.ArraySize; i++)
            {
                pfbFriends[i]         = ApplicasaUserGetFacebookFriendByIndex(i);
                fbFriends[i].Id       = pfbFriends[i].Id;
                fbFriends[i].Name     = pfbFriends[i].Name;
                fbFriends[i].ImageURL = pfbFriends[i].ImageURL;
                if (pfbFriends[i].UserPtr.ToInt32() != 0)
                {
                    fbFriends[i].UserObj = new User(pfbFriends[i].UserPtr);
                }
            }
            FBFriends = fbFriends;
        }
Ejemplo n.º 5
0
 public static FBFriend[] GetFacebookFriends(FBFriendArray fbFriendArray)
 {
     FBFriend[] fbFriends = new FBFriend[0];
     return(fbFriends);
 }
Ejemplo n.º 6
0
 public static IEnumerator GetFacebookFriendsIEnumerator(FBFriendArray fbFriendArray)
 {
     FBFriends = GetFacebookFriends(fbFriendArray);
     yield return(new WaitForSeconds(0.2f));
 }
Ejemplo n.º 7
0
 public static FBFriend[] GetFacebookFriends(FBFriendArray fbFriendArray)
 {
     FBFriend[] fbFriends = new FBFriend[0];
     return fbFriends;
 }
Ejemplo n.º 8
0
 public static FBFriend[] GetFacebookFriends(FBFriendArray fbFriendArray)
 {
     FBFriend[] fbFriends = new FBFriend[fbFriendArray.ArraySize];
     AndroidJavaObject tempJavaObjectArray=new AndroidJavaObject(fbFriendArray.Array);
     for (int i=0; i < fbFriendArray.ArraySize; i++) {
         using(AndroidJavaObject tempJavaObject = tempJavaObjectArray.Call<AndroidJavaObject>("get",i))
         {
             fbFriends[i].Id = int.Parse(tempJavaObject.Get<string>("mFacebookID"));
             fbFriends[i].Name = tempJavaObject.Get<string>("mFacebookName");
             fbFriends[i].ImageURL = tempJavaObject.Get<string>("mFacebookImage");
             fbFriends[i].UserPtr = AndroidJNI.NewGlobalRef(tempJavaObject.Get<IntPtr>("user"));
         }
     }
     return fbFriends;
 }
Ejemplo n.º 9
0
 public static FBFriend[] GetFacebookFriends(FBFriendArray fbFriendArray)
 {
     FBFriend[] fbFriends = new FBFriend[fbFriendArray.ArraySize];
     for (int i=0; i < fbFriendArray.ArraySize; i++) {
         IntPtr newPtr = Marshal.ReadIntPtr (fbFriendArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
         fbFriends[i] = ApplicasaUserGetFacebookFriend(newPtr);
     }
     return fbFriends;
 }