Google 스프레드 시트 액세스/수정에 Google Api를 사용하는 방법을 알아 내려고합니다. 많은 기기에서 동일한 스프레드 시트로 항상 연결하고 싶습니다. AccountManager를 사용하는 예제가 있지만 사용자 계정을 사용해서는 안됩니다. 좋은 토리토리가 있습니까? 지금 당장은 다음과 같은 것이 있습니다. 맞습니까?Android 스프레드 시트 용 Google Api
AccountManager accountManager = AccountManager.get (this); ArrayList googleAccounts = new ArrayList();
// Just for the example, I am using the first google account returned.
Account account = new Account("[email protected]", "com.google");
// "wise" = Google Spreadheets
AccountManagerFuture<Bundle> amf = accountManager.getAuthToken(account, "wise", null, this, null, null);
try {
Bundle authTokenBundle = amf.getResult();
String authToken = authTokenBundle.getString(AccountManager.KEY_AUTHTOKEN);
// do something with the token
//InputStream response = sgc.getFeedAsStream(feedUrl, authToken, null, "2.1");
}
catch (Exception e) {
// TODO: handle exception
}
여기에 멋진 예제가 있습니다. http://code.google.com/p/yetanothercoder/ 누군가가 도와 줄 수 있기를 바랍니다. –