The Wear app, which we will build, will have three main interfaces for starting the water reminder, heart rate analysis, and step counter.
The is the water reminder screen for starting the reminder service. Using the navigation facility in the navigation drawer, we can swap between other screens:
Knowing the list of available in the Wear device you are working on is actually good ensuring you do for not have false results and unnecessary waiting. Few android Wear devices don't have the heart rate sensor. Writing an app for the heart rate sensor, in such cases, proves nothing. Here's how we can get the list of available sensors:
publicclassSensorActivityextendsActivityimplementsSensorEventListener{ privateSensorManager mSensorManager; privateSensor mLight; @Override publicfinalvoid onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); mSensorManager =(SensorManager...