Android Open Source - NightWiper Toaster






From Project

Back to project page NightWiper.

License

The source code is released under:

Apache License

If you think the Android project NightWiper 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 org.umtri.NightWiper;
/* w  ww . jav a2s  .  c o m*/
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;

/**
 * 
 * @author Cody Hyman
 *
 */
public class Toaster {
  
  private static Handler mHandler; 
  
  /**
   * 
   * @param handler
   */
  public static void setToasterHandler(Handler handler)
  {
    mHandler = handler;
    Log.i("Toaster","Assigning handler");
  }
  
  /**
   * 
   * @param data
   */
  public static void makeToast(String data)
  {
    Message msg = mHandler.obtainMessage(NightWiperActivity.MESSAGE_TOAST);
    Bundle bundle = new Bundle();
    bundle.putString(NightWiperActivity.TOAST, data);
    msg.setData(bundle);
    mHandler.sendMessage(msg);
  }
}




Java Source Code List

org.umtri.NightWiper.BluetoothSPPServer.java
org.umtri.NightWiper.CommunicationThread.java
org.umtri.NightWiper.NightWiperActivity.java
org.umtri.NightWiper.NightWiperDetector.java
org.umtri.NightWiper.Toaster.java