Back to project page LollipopDemo.
The source code is released under:
Apache License
If you think the Android project LollipopDemo 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 com.ToxicBakery.lollipop; //from w ww. ja va2s . com import android.content.Intent; import com.google.android.gms.wearable.MessageEvent; import com.google.android.gms.wearable.WearableListenerService; public class DataLayerListenerService extends WearableListenerService { private static final String START_ACTIVITY_PATH = "/start-wearableSyncActivity"; @Override public void onMessageReceived(MessageEvent messageEvent) { // Check to see if the message is to start an activity if (messageEvent.getPath().equals(START_ACTIVITY_PATH)) { Intent startIntent = new Intent(this, DemoWearActivity.class); startIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(startIntent); } } }