Skip to content

Commit

Permalink
Improve battery life and add configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Protino committed Feb 28, 2017
1 parent 25fc622 commit f747769
Show file tree
Hide file tree
Showing 15 changed files with 737 additions and 319 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ This is an android application which shows real-time weather data by using <a hr
4. Initialize the following variable in the file.

`MyOpenWeatherMapApiKey = "[YOUR_API_KEY_HERE]"`
You can get an API_KEY from <a href="http://openweathermap.org" target="_blank">Open Weather</a>
You can get an API_KEY from <a href="http://openweathermap.org" target="_blank">Open Weather Map</a>
5. Also, add the places API key in the AndroidManifest.xml file

`<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="ENTER_YOU_API_KEY_HERE"/>`

Please report issues by attaching log errors, if possible else screenshots will do.
Please report issues by attaching log errors.
5 changes: 5 additions & 0 deletions wear/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ android {
}
}
}
ext {
supportLibraryVersion = "25.0.1"
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:design:${supportLibraryVersion}"

compile 'com.google.android.support:wearable:2.0.0'
compile 'com.google.android.gms:play-services-wearable:10.0.1'
}
21 changes: 20 additions & 1 deletion wear/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,23 @@
android:supportsRtl="true"
android:theme="@android:style/Theme.DeviceDefault">

<activity
android:name=".SunshineWatchFaceWearableConfigActivity"
android:label="@string/sunshine_watch_config_name"
android:theme="@style/Theme.AppCompat">
<intent-filter>
<action android:name=
"com.example.android.wearable.watchface.CONFIG_DIGITAL"/>

<category android:name=
"com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>

<!-- WeatherWatchFace Service -->
<service
android:name=".WeatherWatchFaceService"
android:name=".SunshineWatchFaceService"
android:label="@string/watch_name"
android:permission="android.permission.BIND_WALLPAPER">
<meta-data
Expand All @@ -32,6 +46,11 @@
<!-- android:name="com.google.android.wearable.watchface.preview_circular" -->
<!-- android:resource="@drawable/preview_analog_circular"/> -->

<!-- wearable configuration activity -->
<meta-data
android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
android:value="com.example.android.wearable.watchface.CONFIG_DIGITAL"/>

<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService"/>

Expand Down
Loading

0 comments on commit f747769

Please sign in to comment.