Android Open Source - PhoneProfilesHelper_Eclipse Receivers Service






From Project

Back to project page PhoneProfilesHelper_Eclipse.

License

The source code is released under:

Apache License

If you think the Android project PhoneProfilesHelper_Eclipse 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 sk.henrichg.phoneprofileshelper;
//from  w ww. j  a v a2  s . c  om
import android.app.Service;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;


public class ReceiversService extends Service {

  private final PPHeplerBroadcastReceiver receiver = new PPHeplerBroadcastReceiver();

  public static boolean radioStateChange = false; 
  
  @Override
    public void onCreate()
  {
    SystemRoutines.logE("ReceiversService.onCreate", "xxx");
    
    IntentFilter intentFilter1 = new IntentFilter();
    intentFilter1.addAction(PPHeplerBroadcastReceiver.ACTION_SETPROFILEPREFERENCES);
    intentFilter1.addAction(PPHeplerBroadcastReceiver.ACTION_RADIOCHANGESTATE);
    registerReceiver(receiver, intentFilter1);
  }
   
  @Override
    public void onDestroy()
  {
    unregisterReceiver(receiver);
    SystemRoutines.logE("ReceiversService.onDestroy", "xxx");
    }
   
  @Override
    public int onStartCommand(Intent intent, int flags, int startId)
  {
        // We want this service to continue running until it is explicitly
        // stopped, so return sticky.
        return START_STICKY;
    }
  
  @Override
  public IBinder onBind(Intent intent)
  {
    return null;
  }

}




Java Source Code List

sk.henrichg.phoneprofileshelper.BootUpReceiver.java
sk.henrichg.phoneprofileshelper.PPHeplerBroadcastReceiver.java
sk.henrichg.phoneprofileshelper.ReceiversService.java
sk.henrichg.phoneprofileshelper.SetProfilePreferenceService.java
sk.henrichg.phoneprofileshelper.StartActivity.java
sk.henrichg.phoneprofileshelper.SystemRoutines.java