Android Open Source - datacollection Wearable Service






From Project

Back to project page datacollection.

License

The source code is released under:

MIT License

If you think the Android project datacollection 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 edu.fordham.cis.wisdm.actipebble;
//w w w.  jav a 2  s.  c  o m
import android.content.Intent;
import android.util.Log;

import com.google.android.gms.wearable.MessageEvent;
import com.google.android.gms.wearable.WearableListenerService;

/**
 * Created by andrew on 11/11/14.
 */
public class WearableService extends WearableListenerService {

    private static final String TAG = "WearableService";
    private static final String START_TRAINING = "/start-training";

    @Override
    public void onCreate() {
        super.onCreate();
        Log.wtf(TAG, "Wear Service started");
    }

    @Override
    public void onMessageReceived(MessageEvent messageEvent) {
        Log.d(TAG, "Message received for path " + messageEvent.getPath());
        if (messageEvent.getPath().equals(START_TRAINING)) {
            Intent i = new Intent(getBaseContext(), WearTrainingActivity.class);
            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            getApplication().startActivity(i);
        }
    }
}




Java Source Code List

edu.fordham.cis.wisdm.actipebble.AccelerationRecord.java
edu.fordham.cis.wisdm.actipebble.AccelerationRecord.java
edu.fordham.cis.wisdm.actipebble.ApplicationTest.java
edu.fordham.cis.wisdm.actipebble.DataManagementService.java
edu.fordham.cis.wisdm.actipebble.GMailSender.java
edu.fordham.cis.wisdm.actipebble.JSSEProvider.java
edu.fordham.cis.wisdm.actipebble.LoginActivity.java
edu.fordham.cis.wisdm.actipebble.MainActivity.java
edu.fordham.cis.wisdm.actipebble.MainActivity.java
edu.fordham.cis.wisdm.actipebble.ScreenLockReceiver.java
edu.fordham.cis.wisdm.actipebble.WearTrainingActivity.java
edu.fordham.cis.wisdm.actipebble.WearableService.java