Back to project page metawear-antifitness.
The source code is released under:
GNU General Public License
If you think the Android project metawear-antifitness listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package za.co.paulscott.antifitness; // w w w.j a v a 2 s. c o m import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Vibrator; import android.util.Log; import android.widget.Toast; public class MetawearReceiver extends BroadcastReceiver { private static final String TAG = "MetawearReceiver"; @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, "Receiver started"); Toast.makeText(context, "Don't panic but your time is up!", Toast.LENGTH_LONG).show(); Vibrator vibrator = (Vibrator) context .getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(2000); } }