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.
package com.bitgriff.androidcalls; //w ww . j a v a 2 s. co m import android.app.Service; 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() { } @Override public int onStartCommand(Intent intent, int flags, int startId) { callHelper = new CallHelper(this); int res = super.onStartCommand(intent, flags, startId); callHelper.start(); return res; } @Override public void onDestroy() { super.onDestroy(); callHelper.stop(); } @Override public IBinder onBind(Intent intent) { // not supporting binding return null; } }