Android Open Source - rwestful-android Boot Receiver






From Project

Back to project page rwestful-android.

License

The source code is released under:

MIT License

If you think the Android project rwestful-android 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.rwestful.android.receivers;
/*from w w  w .ja v a2  s.co m*/
import com.rwestful.android.web.services.HTTPService;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class BootReceiver extends BroadcastReceiver {
  
  private Toast toast;
  
  public BootReceiver() {
  }

  @Override
  public void onReceive(Context context, Intent intent) {
    // TODO: This method is called when the BroadcastReceiver is receiving
    // an Intent broadcast.
    int duration = Toast.LENGTH_SHORT;
    toast = Toast.makeText(context, "I AM ALIIIIIVE!", duration);
    toast.show();

    context.stopService(new Intent(context, HTTPService.class));
      context.startService(new Intent(context, HTTPService.class));      
  }
}




Java Source Code List

com.rwestful.android.MainActivity.java
com.rwestful.android.SettingsActivity.java
com.rwestful.android.constants.Constants.java
com.rwestful.android.listeners.OnSettingsMenuItemClickListener.java
com.rwestful.android.receivers.BootReceiver.java
com.rwestful.android.web.handlers.DefaultHandler.java
com.rwestful.android.web.handlers.storage.StorageWriteHandler.java
com.rwestful.android.web.servers.HTTPServer.java
com.rwestful.android.web.services.HTTPService.java