Calling a method instead of an activity using an Intent - android developers
<p>How can I fire a method instead of an Activity in my code?</p>

<p>I want to use the <code>AddProximityAlert()</code> method from the <code>LocationManager</code> but it needs an Intent to work and I don't want to call another activity since the method I want to fire is in the same <code>Activity</code> from where I'm using <code>AddProximityAlert()</code></p>

<p>Goes like this:</p>

<pre><code>public clase onCreate()
{
......

LocationManager LM; // already initialized

LM.addProximityAlert(lat,long,radio,expiration,INTENT) &lt;--- This INTENT needs to call myMethod()

}

public void MyMethod()
{

.......

}
</code></pre>

<p>I have several hours trying to find a solution for this, and all I find is for calling another activity, please be as much specific, even if I have to do something with the <code>manifest.xml</code> because I haven't used intents before.</p>

<p>Thanks</p>
