How to make global "Intent explicitIntent = new Intent(...)" methods
<p>I have the same methods in various classes (views) and would like to abstract them somehow so I don't have the identical code parts in multiple classes. How do I have to do this in Android?</p>

<p>The method I have multiple times in my project looks like this:</p>

<pre><code>    public void goHome() {
    Intent explicitIntent = new Intent(CurrentClass.this, ClassWhereToGo.class);
    startActivity(explicitIntent);
}
</code></pre>

<p>In the end I just want to have this one in the whole project and be able to access it dynamically from different views. I guess I have to add two parameters to goHome(p1, p2) in order to be able to access the method from various views. I just don't know where I have to place the method and how I have to make it work with the parameters.</p>

<p>I think ideally I would create some sort of helper class?</p>

<p>Thanks for help!</p>
