0

如何实现面料发现恶魔

我已经成功实现了上传联系人,我也上传了联系人号码。但我无法实现查找朋友,这就是为什么我没有匹配联系人(我已经注册了应用程序的用户,请参见下面的实现)因为我怀疑 ContactMatch(); 永远不会被调用

代码

find.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Digits.uploadContacts(CONTACT_UPLOAD_REQUEST);


        }
    });

    return view;

}

private static void ContactMatch() {

    //  progressDialog.show();


    Digits.findFriends(new ContactsCallback<Contacts>() {

        @Override
        public void success(Result<Contacts> result) {
            if (result.data.users != null) {
                Log.e("data", result.toString());
            }
        }

        @Override
        public void failure(TwitterException exception) {

            Log.e("failure", exception.toString());
        }
    });
}

public static class MyResultReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (ContactsUploadService.UPLOAD_COMPLETE.equals(intent.getAction())) {
            ContactsUploadResult result = intent
                    .getParcelableExtra(ContactsUploadService.UPLOAD_COMPLETE_EXTRA);
            if (result != null) {

            }

            Log.e("contacts", result.successCount + "");
            ContactMatch();

            // Post success notification
        } else {
            // Post failure notification
        }
    }
}


@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == CONTACT_UPLOAD_REQUEST && resultCode == RESULT_CANCELED) {
    }
}
4

0 回答 0