Android Open Source - Interception Call Detect Service

From Project

Back to project page Interception.


The source code is released under:

# The Code Project Open License (CPOL) 1.02 ###Preamble This License governs Your use of the Work. This License is intended to allow developers to use the Source Code and Executable Files provided a...

If you think the Android project Interception listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.bitgriff.androidcalls;
//w ww . j  a  v a  2 s. co m
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;

 * Call detect service. 
 * This service is needed, because MainActivity can lost it's focus,
 * and calls will not be detected.
 * @author Moskvichev Andrey V.
public class CallDetectService extends Service {
  private CallHelper callHelper;
    private Context ctx;
    public CallDetectService() {

  public int onStartCommand(Intent intent, int flags, int startId) {
    callHelper = new CallHelper(this);
    int res = super.onStartCommand(intent, flags, startId);

    return res;
  public void onDestroy() {

    public IBinder onBind(Intent intent) {
    // not supporting binding
      return null;

Java Source Code List