my BroadcastReciver is not getting called from serive ?? my service is running perfectly (as i can seee the log statements in LogCat) following is my code
public class ServiceExample extends Service { @Override public void onCreate() { super.onCreate(); startservice(); } @Override public void onDestroy() { stopservice(); super.onDestroy(); } @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); } private void startservice() { broadcastReciver = new ABC(); // here my class is there intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_ANSWER); intentFilter.addAction(Intent.ACTION_CALL_BUTTON); intentFilter.addAction(Intent.ACTION_DIAL); intentFilter.addAction(Intent.ACTION_NEW_OUTGOING_CALL); registerReceiver(broadcastReciver, intentFilter); broadcastReciver.setOrderedHint(true); .... // here my mussiness logic is there } } public class ABCextends BroadcastReceiver { public void onReceive(Context context, Intent intent) { TelephonyManager tManager = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); CallStateListener callStateListener = new CallStateListener(); tManager .listen(callStateListener, PhoneStateListener.LISTEN_CALL_STATE); } } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en