title: Passing object from one application to another
body: <p>I need to pass a custom object from an activity of one application to the main activity of another.</p>
  
  <p>Will I be able to accomplish this using intent.putExtra as shown:</p>
  
  <pre><code>putExtra("key",obj);
  </code></pre>
  
  <p>It was showing error since putExtra method does not support this. How can this be achieved?</p>
  
  <p>Any help is appreciated.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The following class' instance, I need to pass to another application. I would have the object 'obj' as follows, which I need to pass:</p>
  
  <pre><code>CounterAndNotifier obj = new CounterAndNotifier(5, this)
  </code></pre>
  
  <p>obj is the object to be passed</p>
  
  <pre><code>public class CounterAndNotifier
  {
  private int counter = 0;
  private int count;
  private Runnable runnable;
  
  public CounterAndNotifier(int count, Runnable runnable)
  {
      this.count = count;
      this.runnable = runnable;
  }
  
  public synchronized void incrementCounter()
  {
      counter++;
      if (counter == count) {
          runnable.run();
      }
  }
  }
  </code></pre>