android call a timer run function from widget
<p>i have a timer in my widget that runs every 10 minutes, but i need to call the timers run function when I press a button. is any way of doing that?</p>

<pre><code>public class MyWidget extends AppWidgetProvider {


@Override
public void onReceive(Context context, Intent intent) {

    final String action = intent.getAction();
    if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
        final int appWidgetId = intent.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,
                AppWidgetManager.INVALID_APPWIDGET_ID);
        if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
            this.onDeleted(context, new int[] { appWidgetId });
        }
    } else {
  // check, if our Action was called
        if (intent.getAction().equals(ACTION_WIDGET_RECEIVER)) {
            //call the run function of the timer
        }

        super.onReceive(context, intent);
    }
}

@Override
public void onUpdate( Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds ) {

    if(tt==0) {
        Timer timer = new Timer();
        timer.scheduleAtFixedRate(new MyTime(context, appWidgetManager), 1000, 600000);
        tt=1;
    }
}

private class MyTime extends TimerTask {


    public MyTime(Context context, AppWidgetManager appWidgetManager) {

    }

    @Override
    public void run() {
            }
</code></pre>

<p>i need to cal that function from onReceive()</p>
