Android Open Source - WearChronoAS Notification Receiver






From Project

Back to project page WearChronoAS.

License

The source code is released under:

GNU General Public License

If you think the Android project WearChronoAS 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 wearun.giux.com.wearchrono;
/*from www .ja  va2  s.  com*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;


public class NotificationReceiver extends BroadcastReceiver{
  
  public static final String ACTION_START ="com.giux.wearun.ACTION_START";
  public static final String ACTION_LAP ="com.giux.wearun.ACTION_LAP";
  public static final String ACTION_STOP = "com.giux.wearun.ACTION_STOP";

  @Override
  public void onReceive(Context context, Intent intent) {
    // TODO Auto-generated method stub
    
    String action = intent.getAction();

    switch (action) {
    case ACTION_START:
            MyActivity.start();
      break;
      
    case ACTION_LAP:
            MyActivity.lap();
      break;
      
    case ACTION_STOP:
      MyActivity.stop();
      break;

    default:
      break;
    }
    
    
  }

}




Java Source Code List

wearun.giux.com.wearchrono.ApplicationTest.java
wearun.giux.com.wearchrono.MyActivity.java
wearun.giux.com.wearchrono.MyActivity.java
wearun.giux.com.wearchrono.NotificationReceiver.java