Friday, 15 August 2014

How to Start Service and Stop Service Based on Time Interval in android -



How to Start Service and Stop Service Based on Time Interval in android -

hi friends need start service every day morning 6 , need stop service every day 8 am,please 1 help me how accomplish that..

create broadcastreceiver

public class myreceiver extends broadcastreceiver { public void onreceive(context context, intent intent) { final string action = intent.getaction(); if (action.equals(intent.action_time_changed) || action.equals(intent.action_timezone_changed)) { // current time here , start/stop sevice depend on time } } }

android

No comments:

Post a Comment