Android Open Source - VoicemailOnboard voicemail_onboard_receiver






From Project

Back to project page VoicemailOnboard.

License

The source code is released under:

Apache License

If you think the Android project VoicemailOnboard 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.pnzr.voicemail_onboard;
//from  w  ww. j  av a 2s .  c o m
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.telephony.TelephonyManager;

public class voicemail_onboard_receiver extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
    SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(context);
    if(intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_RINGING) && sPrefs.getBoolean("enabled", false))
    {
      context.startService(new Intent(context,voicemail_onboard_intent.class));
    }
  }
    
}




Java Source Code List

com.pnzr.voicemail_onboard.voicemail_onboard_activity.java
com.pnzr.voicemail_onboard.voicemail_onboard_intent.java
com.pnzr.voicemail_onboard.voicemail_onboard_pref_activity.java
com.pnzr.voicemail_onboard.voicemail_onboard_receiver.java