use of com.facebook.internal.CallbackManagerImpl in project facebook-android-sdk by facebook.
the class CreateAppGroupDialog method registerCallbackImpl.
@Override
protected void registerCallbackImpl(final CallbackManagerImpl callbackManager, final FacebookCallback<Result> callback) {
final ResultProcessor resultProcessor = (callback == null) ? null : new ResultProcessor(callback) {
@Override
public void onSuccess(AppCall appCall, Bundle results) {
callback.onSuccess(new Result(results.getString("id")));
}
};
CallbackManagerImpl.Callback callbackManagerCallback = new CallbackManagerImpl.Callback() {
@Override
public boolean onActivityResult(int resultCode, Intent data) {
return ShareInternalUtility.handleActivityResult(getRequestCode(), resultCode, data, resultProcessor);
}
};
callbackManager.registerCallback(getRequestCode(), callbackManagerCallback);
}
use of com.facebook.internal.CallbackManagerImpl in project facebook-android-sdk by facebook.
the class GameRequestDialog method registerCallbackImpl.
@Override
protected void registerCallbackImpl(final CallbackManagerImpl callbackManager, final FacebookCallback<Result> callback) {
final ResultProcessor resultProcessor = (callback == null) ? null : new ResultProcessor(callback) {
@Override
public void onSuccess(AppCall appCall, Bundle results) {
if (results != null) {
callback.onSuccess(new Result(results));
} else {
onCancel(appCall);
}
}
};
callbackManager.registerCallback(getRequestCode(), new CallbackManagerImpl.Callback() {
@Override
public boolean onActivityResult(int resultCode, Intent data) {
return ShareInternalUtility.handleActivityResult(getRequestCode(), resultCode, data, resultProcessor);
}
});
}
use of com.facebook.internal.CallbackManagerImpl in project facebook-android-sdk by facebook.
the class JoinAppGroupDialog method registerCallbackImpl.
@Override
protected void registerCallbackImpl(final CallbackManagerImpl callbackManager, final FacebookCallback<Result> callback) {
final ResultProcessor resultProcessor = (callback == null) ? null : new ResultProcessor(callback) {
@Override
public void onSuccess(AppCall appCall, Bundle results) {
callback.onSuccess(new Result(results));
}
};
CallbackManagerImpl.Callback callbackManagerCallback = new CallbackManagerImpl.Callback() {
@Override
public boolean onActivityResult(int resultCode, Intent data) {
return ShareInternalUtility.handleActivityResult(getRequestCode(), resultCode, data, resultProcessor);
}
};
callbackManager.registerCallback(getRequestCode(), callbackManagerCallback);
}
Aggregations