我正在嘗試實施單點登錄(GMAIL)。嘗試使用此鏈接https://developers.google.com/accounts/docs/MobileApps示例代碼。我無法獲取YOUR_AUTHENTICATION_ENDPOINT令牌密鑰。請任何人幫我拿出YOUR_AUTHENTICATION_ENDPOINT令牌密鑰。Android:如何獲取YOUR_AUTHENTICATION_ENDPOINT在GMAIL上的SSO?
這裏是我的main.activity這裏我使用YOUR_AUTHENTICATION_ENDPOINT。
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflating the menu resource.
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.my_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Start the WebViewActivity to handle the authentication.
case R.id.login:
Intent intent = new Intent(this, WebViewActivity.class);
intent.setData(Uri.parse(YOUR_AUTHENTICATION_ENDPOINT));
startActivityForResult(intent, 0);
return true;
// Exit.
case R.id.exit:
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
應用程序是運行時我得到這個錯誤:
04-02 15:09:12.271: E/Web Console(924): SyntaxError: Parse error at https://mail.google.com/mail/x/cc6i6zigt73b-/?pli=1&f=1&shva=1:1
我需要一個緊急的幫助..請請請任何人都可以幫助我。
或給我任何其他選項或方法來實現對GMAIL
在此先感謝了單點登錄...
無法加載您的web瀏覽器鏈接。拋出500服務器錯誤 – 2012-04-02 10:05:20
更新了答案。 – 2012-04-02 10:11:13
謝謝 - 羅漢..但我想用java或android .. plz你能幫我嗎。在此先感謝 – 2012-04-02 10:31:17