如何实现结构查找朋友

时间:2017-02-08 10:36:47

标签: android twitter-fabric fabric-digits

如何实现面料查找恶魔

  

我已经成功实现了上传联系人,我也上传了联系人号码。但我无法实现找到朋友,这就是为什么我没有找到匹配的联系人(我在哪里注册用户的应用程序请参阅实施以下)   因为我怀疑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) {
    }
}

0 个答案:

没有答案