I've been a software developer for 15yrs but I'm new to MonoDroid
development.  Could you explain about the IParcel?  I don't think I'm using
that, however I do pass an Intent to Bundle.PutParcelable.  I would think
that if Bundle has that function it would be supported.  Is there a way
around this?

Thanks!

Here's my (partial) implementation of
Android.Accounts.AbstractAccountAuthenticator:

namespace MyApp.DataManagement
{
  class Authenticator : AbstractAccountAuthenticator
  {
    private Context _context = null;

    public Authenticator(Context context) : base(context)
    {
      _context = context;
    }

    public override Bundle AddAccount(AccountAuthenticatorResponse response,
string accountType, string authTokenType, string[] requiredFeatures, Bundle
options)
    {
      Intent intent = new Intent(_context, typeof(AuthenticatorActivity));
      intent.PutExtra(AuthenticatorActivity.PARAM_AUTHTOKEN_TYPE,
authTokenType);
      intent.PutExtra(AccountManager.KeyAccountAuthenticatorResponse,
response);

      Bundle bundle = new Bundle();
      bundle.PutParcelable(AccountManager.KeyIntent, intent);
      return bundle;
    }

    public override Bundle ConfirmCredentials(AccountAuthenticatorResponse
response, Account account, Bundle options)
    {
...
    }

    public override Bundle EditProperties(AccountAuthenticatorResponse
response, string accountType)
    {
      throw new NotSupportedException();
    }

    public override Bundle GetAuthToken(AccountAuthenticatorResponse
response, Account account, string authTokenType, Bundle options)
    {
...
    }

    public override string GetAuthTokenLabel(string authTokenType)
    {
      if (authTokenType == AuthenticatorActivity.AUTHTOKEN_TYPE)
      {
        return _context.GetString(Resource.String.ApplicationName);
      }

      return null;
    }

    public override Bundle HasFeatures(AccountAuthenticatorResponse
response, Account account, string[] features)
    {
...
    }

    public override Bundle UpdateCredentials(AccountAuthenticatorResponse
response, Account account, string authTokenType, Bundle options)
    {
...
    }

  }
}

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Sync-Adapter-and-Account-Authenticator-Services-tp4623034p4624606.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to