I have a ImageView in Widget , when ever i click over it i start a service using getService
as follows
Intent intent = new Intent(context,MyService.class);
PendingIntent pendingServiceIntent = PendingIntent.getService(context,0 ,
intent , 0);
and in turn MyService class send a message to handler in onCreate
of MyService
to start the service with a message
myHandler.sendEmptyMessage(MSG_FETCH_DATA);
Now i want to stop that service using that ImageView , so how can i do that ? My application demands to stop this service manually by widget so that i am not using stopSelf()