title: How can i check if a Intent was created
body: <p>I want to check at the beginning of my App if an <code>Intent</code> exists. So when I launch it some details are displayed. I can then switch to a different class to edit those details. Now if i switch back to my Main class I want the details to be replaced with the ones I just edited. I hope you guys can help me out and hopefully you understand my question. </p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_dashboard);
  
       if (getIntent()!= null) {
           Intent myintent2 = getIntent();
           ArrayList&lt;String&gt; buffer = new ArrayList&lt;&gt;();
           buffer = myintent2.getStringArrayListExtra("Interest_items");
           for (int f = 0; f &lt; buffer.size(); f++) {
               Interests.add(buffer.get(f));
           }
       } else {
           Interests.add("Cycling");
           Interests.add("Swimming");
           Interests.add ("Running");
       }
  }
  </code></pre>