stop Service - Android Android OS

Android examples for Android OS:Service

Description

stop Service

Demo Code


//package com.java2s;

import android.app.Service;
import android.content.Context;
import android.content.Intent;

public class Main {
    public static void stopService(Context context,
            Class<? extends Service> type) {
        context.stopService(new Intent(context, type));
    }//from  w  ww  .j ava  2 s . c o m
}

Related Tutorials