This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml | |
index 963fb7a..a955b06 100644 | |
--- a/main/AndroidManifest.xml | |
+++ b/main/AndroidManifest.xml | |
@@ -23,6 +23,16 @@ | |
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" /> | |
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" /> | |
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" /> | |
+ <uses-permission | |
+ android:name="android.permission.WRITE_CONTACTS" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml | |
index a955b06..982f99f 100644 | |
--- a/main/AndroidManifest.xml | |
+++ b/main/AndroidManifest.xml | |
@@ -410,7 +410,7 @@ | |
android:resource="@xml/authenticator" /> | |
</service> | |
- <service android:name=".ContactsSyncService" android:exported="true"> | |
+ <service android:name=".ContactsSyncService" android:exported="true" android:process=":sync"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void checkCallingUidAgainstAuthenticator(Account account) { | |
final int uid = Binder.getCallingUid(); | |
if (account == null || !hasAuthenticatorUid(account.type, uid)) { | |
String msg = "caller uid " + uid + " is different than the authenticator's uid"; | |
Log.w(TAG, msg); | |
throw new SecurityException(msg); | |
} | |
if (Log.isLoggable(TAG, Log.VERBOSE)) { | |
Log.v(TAG, "caller uid " + uid + " is the same as the authenticator's uid"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LoginTask { | |
Account account = new Account(userId, AuthenticatorService.ACCOUNT_TYPE); | |
... | |
} | |
class AuthenticatorService extends Service { | |
public static final String ACCOUNT_TYPE = "com.joelapenna.foursquared"; | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android" | |
android:accountType="com.joelapenna.foursquared.account" ... /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/res/xml/authenticator.xml b/main/res/xml/authenticator.xml | |
index e234726..5fa8471 100644 | |
--- a/main/res/xml/authenticator.xml | |
+++ b/main/res/xml/authenticator.xml | |
@@ -1,5 +1,5 @@ | |
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android" | |
- android:accountType="com.joelapenna.foursquared.account" | |
+ android:accountType="com.joelapenna.foursquared" | |
android:icon="@drawable/icon" | |
android:smallIcon="@drawable/icon" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/src/com/joelapenna/foursquared/Authenticator.java b/main/src/com/joelapenna/foursquared/Authenticator.java | |
index 11fc06b..f779c5b 100644 | |
--- a/main/src/com/joelapenna/foursquared/Authenticator.java | |
+++ b/main/src/com/joelapenna/foursquared/Authenticator.java | |
@@ -51,8 +51,19 @@ final class Authenticator extends AbstractAccountAuthenticator { | |
@Override | |
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, | |
Bundle options) throws NetworkErrorException { | |
- // TODO Auto-generated method stub | |
- return null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<title>Google Wave Embed API Example: Simple Wave</title> | |
<script src="http://www.google.com/jsapi" type="text/javascript"></script> | |
<script type="text/javascript"> | |
google.load("wave", "1"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/src/com/joelapenna/foursquared/ContactsSyncAdapter.java b/main/src/com/joelapenna/foursquared/ContactsSyncAdapter.java | |
index 098e9d4..943665a 100644 | |
--- a/main/src/com/joelapenna/foursquared/ContactsSyncAdapter.java | |
+++ b/main/src/com/joelapenna/foursquared/ContactsSyncAdapter.java | |
@@ -14,12 +14,17 @@ import android.accounts.AuthenticatorException; | |
import android.accounts.OperationCanceledException; | |
import android.content.AbstractThreadedSyncAdapter; | |
import android.content.ContentProviderClient; | |
+import android.content.ContentProviderOperation; | |
+import android.content.ContentResolver; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/src/com/joelapenna/foursquared/ContactsSyncAdapter.java b/main/src/com/joelapenna/foursquared/ContactsSyncAdapter.java | |
index 943665a..03afad7 100644 | |
--- a/main/src/com/joelapenna/foursquared/ContactsSyncAdapter.java | |
+++ b/main/src/com/joelapenna/foursquared/ContactsSyncAdapter.java | |
@@ -1,12 +1,10 @@ | |
package com.joelapenna.foursquared; | |
-import com.joelapenna.foursquare.Foursquare; | |
import com.joelapenna.foursquare.error.FoursquareError; | |
import com.joelapenna.foursquare.error.FoursquareException; |