I have a question about the Android Facebook API singleSignOn() method.
The code below uses package "com.facebook.katana" and class "com.facebook.katana.proxyAuth".
The problem is I don't have such a package and class in my installation of Eclipse, but it seems the activity which uses those package and class works fine - even if I don't have one. Why?
The line
activity.startActivityForResult(intent, activityCode);
does not throw ActivityNotFoundException
errors even if I don't have a right package?
The code is here:
private boolean startSingleSignOn(Activity activity, String applicationId,
String[] permissions, int activityCode) {
boolean didSucceed = true;<br>
Intent intent = new Intent();
intent.setClassName("com.facebook.katana",
"com.facebook.katana.ProxyAuth");
intent.putExtra("client_id", applicationId);
if (permissions.length > 0) {
intent.putExtra("scope", TextUtils.join(",", permissions));
}
// Verify that the application whose package name is
// com.facebook.katana.ProxyAuth has the expected
// Facebook app signature.
if (!validateAppSignatureForIntent(activity, intent)) {
Log.d("Facebook - startSignleSignOn", "AppSign Validation Failed, return didsucced false");
return false;
}
mAuthActivity = activity;
mAuthPermissions = permissions;
mAuthActivityCode = activityCode;
try {
activity.startActivityForResult(intent, activityCode);
} catch (ActivityNotFoundException e) {
Log.d("Facebok - startSingleSignOn", "Activity not found exception, return didsucced false");
didSucceed = false;
}
return didSucceed;
}