我得到這個問題,而eshtablishing facebook android sdk連接.. 當im運行代碼我得到的logcat的此錯誤消息:WARN/InputManagerService(59):窗口已經聚焦,忽略焦點增益:[email protected]
WARN/InputManagerService(59): Window already focused, ignoring focus gain of: [email protected]
這是我的代碼已經refrenced Facebook的Android SDK中我的項目:
package com.conn;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.facebook.android.*;
import com.facebook.android.Facebook.*;
public class MyGreatActivity extends Activity {
Facebook facebook = new Facebook("YOUR_APP_ID");
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
facebook.authorize(this, new String[] { "email", "read_stream" },
new DialogListener() {
@Override
public void onComplete(Bundle values) {}
@Override
public void onFacebookError(FacebookError error) {}
@Override
public void onError(DialogError e) {}
@Override
public void onCancel() {}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
facebook.authorizeCallback(requestCode, resultCode, data);
}
}
請幫
礦山固定方式:Intent.FLAG_ACTIVITY_CLEAR_TOP – 2016-03-12 00:31:45