Back to project page Sunshine.
The source code is released under:
MIT License
If you think the Android project Sunshine listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.alteridem.sunshine.sync; //w w w . ja v a2s . co m import android.accounts.AbstractAccountAuthenticator; import android.accounts.Account; import android.accounts.AccountAuthenticatorResponse; import android.accounts.NetworkErrorException; import android.content.Context; import android.os.Bundle; /** * Manages "Authentication" to Sunshine's backend service. The SyncAdapter framework * requires an authenticator object, so syncing to a service that doesn't need authentication * typically means creating a stub authenticator like this one. * This code is copied directly, in its entirety, from * http://developer.android.com/training/sync-adapters/creating-authenticator.html * Which is a pretty handy reference when creating your own syncadapters. Just sayin'. */ public class WeatherAuthenticator extends AbstractAccountAuthenticator { public WeatherAuthenticator(Context context) { super(context); } @Override public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) { throw new UnsupportedOperationException(); } @Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { return null; } @Override public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options) throws NetworkErrorException { return null; } @Override public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) throws NetworkErrorException { throw new UnsupportedOperationException(); } @Override public String getAuthTokenLabel(String authTokenType) { throw new UnsupportedOperationException(); } @Override public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) throws NetworkErrorException { throw new UnsupportedOperationException(); } @Override public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features) throws NetworkErrorException { throw new UnsupportedOperationException(); } }