Code example for BasicCookieStore

0
 
  public C2DMService() { 
    super("C2DMService"); 
    client_ = AndroidHttpClient.newInstance("ClementineRemote");
    // Create a local instance of cookie store 
    BasicCookieStore cookie_store = new BasicCookieStore();
 
    // Create local HTTP context 
    http_context_ = new BasicHttpContext();
    // Bind custom cookie store to the local context 
    http_context_.setAttribute(ClientContext.COOKIE_STORE, cookie_store);
  } 
 
  @Override 
  protected void onHandleIntent(Intent intent) {
    Log.d(TAG, "onHandleIntent");
    try { 
      Context context = getApplicationContext();
      if (intent.getAction().equals("com.google.android.c2dm.intent.REGISTRATION")) {
        HandleRegistration(context, intent);
      } else if (intent.getAction().equals("com.google.android.c2dm.intent.RECEIVE")) {