Common classes

You should include all of the following classes into your SmartWatch 2 development project:

Class Description Required
ExtensionReceiver Broadcast receiver that receives the intent from the host application to start the app. Yes
SampleExtensionService This service starts the app and runs during the lifetime of the app. Yes
SamplePreferenceActivity Sets up a preference activity for your app that runs on the phone. This can be accessed from the list of apps installed on the watch in the Smart Connect app on the phone or tablet. No
SampleRegistrationInformation This class is required to register your app with the host app. Yes

In most cases, you won’t need to change much in ExtensionReceiver, SampleExtensionService, and SampleRegistrationInformation. These classes can be copied directly into your project and used as is.