Code example for BasicCookieStore

  public 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);
  protected void onHandleIntent(Intent intent) {
    Log.d(TAG, "onHandleIntent");
    try { 
      Context context = getApplicationContext();
      if (intent.getAction().equals("")) {
        HandleRegistration(context, intent);
Connect your IDE to all the code out there  Get Codota for Java