Android Open Source - VirginMobileMinutesChecker Call Event Receiver

From Project

Back to project page VirginMobileMinutesChecker.


The source code is released under:

Copyright 2011 Jay Goel. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Red...

If you think the Android project VirginMobileMinutesChecker 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.drfloob.VirginMobileMinutesChecker.call_trigger;
/*from   w w w  . j  a v a2 s .  co  m*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.telephony.TelephonyManager;

public class CallEventReceiver extends BroadcastReceiver {

    public void onReceive(Context context, Intent intent) {

  Log.d("DEBUG", "CallEventReceiver Running");
  Log.d("DEBUG", intent.getAction());

  String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);

  Log.d("DEBUG", state);
  Intent i= new Intent(context, MinutesService.class);
  i.putExtra(MinutesService.EVENT, state);


Java Source Code List