CASUALWear Watchface [FOSS] [Analog & Digital]

Search This thread

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,821
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
Hi guys,

Rumor on the street has it that there is no API for making watchfaces.. Well, that's just plain wrong. I've been working with Daniel "Master of Time" Ortiz, aka @kuronosan. We've worked out a ton of the details in order to make watchface APKs easy! It's as simple as making some png resources and then putting code behind them. You just need a framework and that framework is right here! We are going to squash that "no API" rumor here and now. We've not only got the APis here, we've added nice things like transitions which you won't find on many of the other watches!
attachment.php




What's it all about?
This package consists of 2 major parts, the Mobile App, and the Wear App.

mobile app
The mobile app's job is to deploy the Wear app and provide an icon/view which gets installed in the app drawer, allowing the user easy access to uninstallation. After the Wear "MicroApp" App is deployed, this application serves little function. Its a little funny as the MicroApp is much larger than the primary app due to resources

Wear App
The Wear App has two entirely different activities built into it; Analog and Digital. Wear applications are basically live wallpapers. They use the Background Provider permission and they have a few additional properties such as the need to react to the DisplayManager's Screen On, Screen Dim and Screen Off commands. Aside from this, they are simply eye-candy.


Digital
The Digital section of this watch was written entirely from scratch by yours truely. I found that the animations involved in watchfaces can bloat an activity significantly. So, I use Java Inheritance to extend the classes in order to logically separate things in this way
  1. DigitalWatchfaceActivity - Handles setting up the views and intent receivers for date/time/battery and updating the time
  2. DigitalWatchfaceActions - Handles PowerManager commands and aesthetic elements such as animations/transitions.
  3. DigitalWatchfaceApp - Used to launch the activity, reserved for future use.

Analog
Watchface-Gears has provided an awesome starter for Analog Watches. Rather than reinvent the wheel, we've used their base. I had to rework a considerable chunk to add in fading transitions and refactoring for analog/digital separation. When all was said and done, between mine and Daniel Ortiz's work, the only thing that's original is Watchface-Gears library. We kept Watchface-Gears in tact because it is an awesome library. It also set the license used throughout the project. (Apache)

How do I make my own?
Here's how you get started. Being that this is mostly artwork, I can't tell you "how" to do it... But, I can do what to do.
  1. Download the source.
  2. Load it into Android Studio
  3. Modify the package name suffix (watchface/gradle.properties: currentApplicationIdSuffix=MyCustomWatchName), and make it unique string, so when you generate a signed APK it doesn't collide with mine or others. Better yet, you should rename the entire package but that is a detailed operation.
  4. Modify both the Mobile and Wear (watchface/wear/src/main/AndroidManifest.xml & watchface/mobile/src/main/AndroidManifest.xml) files to rename the watch faces and app names for the Wear Picker.
  5. Build the package now to verify it works after you've changed properties.
  6. If you want to customize the Analog watchface app, all you need to do is modify the PNGs in watchface/wear/src/main/res.
  7. If you want to customize the Digital watchface app, you will rework both the wear/src/main/res/layout/digital_watch_layout_awake.xml and the wear/src/main/res/layout/digital_watch_layout_dim.xml. These are standard Android XML layouts.
  8. If you don't want to use the Analog or Digital, remove the AnalogWatchfaceActivity's or DigitalWatchfaceActivity's <activty> entry from watchface/wear/src/main/AndroidManifest.xml
  9. When you're done with the layouts, update the PNG files in watchface/wear/src/main/res/drawable with screenshots for the Background Provider picker (shown near the bottom).
Get creative!


CASUALWear Images
see attached images

Transitioning through Background Providers:
attachment.php


See attachments

Downloads and Source
You can get source here: https://github.com/adamoutler/watchface
Download it free here: https://play.google.com/store/apps/details?id=com.casual_dev.CASUALWatch.release
Get the donate version and give me an excuse for my wife here: https://play.google.com/store/apps/details?id=com.casual_dev.CASUALWatch
 

Attachments

  • device-2014-11-02-121914.png
    device-2014-11-02-121914.png
    18 KB · Views: 17,088
  • device-2014-11-02-121444.png
    device-2014-11-02-121444.png
    7.4 KB · Views: 10,415
  • device-2014-11-02-122029.png
    device-2014-11-02-122029.png
    22.8 KB · Views: 10,751
  • device-2014-11-02-121601.png
    device-2014-11-02-121601.png
    17.7 KB · Views: 16,985
  • device-2014-11-02-122108.png
    device-2014-11-02-122108.png
    25.9 KB · Views: 18,064
  • c-dev512.png
    c-dev512.png
    89.1 KB · Views: 2,447
  • Screenshot_2014-11-02-12-31-39.png
    Screenshot_2014-11-02-12-31-39.png
    147.9 KB · Views: 2,833
Last edited:

ngr.hd

Senior Member
Oct 27, 2010
334
75
Nice and thanks!

BTW any news about the new Android Wear 2 that was due to be released on Nov 3?
 

majee12

Senior Member
Mar 22, 2013
578
123
Upper West Region
great

:good: If Adam wouldnt do it then who will try it . great work Adam :cowboy:
Hi guys,

Rumor on the street has it that there is no API for making watchfaces.. Well, that's just plain wrong. I've been working with Daniel "Master of Time" Ortiz, aka @kuronosan. We've worked out a ton of the details in order to make watchface APKs easy! It's as simple as making some png resources and then putting code behind them. You just need a framework and that framework is right here! We are going to squash that "no API" rumor here and now. We've not only got the APis here, we've added nice things like transitions which you won't find on many of the other watches!
attachment.php




What's it all about?
This package consists of 2 major parts, the Mobile App, and the Wear App.

mobile app
The mobile app's job is to deploy the Wear app and provide an icon/view which gets installed in the app drawer, allowing the user easy access to uninstallation. After the Wear "MicroApp" App is deployed, this application serves little function. Its a little funny as the MicroApp is much larger than the primary app due to resources

Wear App
The Wear App has two entirely different activities built into it; Analog and Digital. Wear applications are basically live wallpapers. They use the Background Provider permission and they have a few additional properties such as the need to react to the DisplayManager's Screen On, Screen Dim and Screen Off commands. Aside from this, they are simply eye-candy.


Digital
The Digital section of this watch was written entirely from scratch by yours truely. I found that the animations involved in watchfaces can bloat an activity significantly. So, I use Java Inheritance to extend the classes in order to logically separate things in this way
  1. DigitalWatchfaceActivity - Handles setting up the views and intent receivers for date/time/battery and updating the time
  2. DigitalWatchfaceActions - Handles PowerManager commands and aesthetic elements such as animations/transitions.
  3. DigitalWatchfaceApp - Used to launch the activity, reserved for future use.

Analog
Watchface-Gears has provided an awesome starter for Analog Watches. Rather than reinvent the wheel, we've used their base. I had to rework a considerable chunk to add in fading transitions and refactoring for analog/digital separation. When all was said and done, between mine and Daniel Ortiz's work, the only thing that's original is Watchface-Gears library. We kept Watchface-Gears in tact because it is an awesome library. It also set the license used throughout the project. (Apache)

How do I make my own?
Here's how you get started. Being that this is mostly artwork, I can't tell you "how" to do it... But, I can do what I can do.
  1. Download the source.
  2. Load it into Android Studio
  3. Modify the package name suffix (watchface/gradle.properties: currentApplicationIdSuffix=MyCustomWatchName), and make it unique string, so when you generate a signed APK it doesn't collide with mine or others. Better yet, you should rename the entire package but that is a detailed operation.
  4. Modify both the Mobile and Wear (watchface/wear/src/main/AndroidManifest.xml & watchface/mobile/src/main/AndroidManifest.xml) files to rename the watch faces and app names for the Wear Picker.
  5. Build the package now to verify it works after you've changed properties.
  6. If you want to customize the Analog watchface app, all you need to do is modify the PNGs in watchface/wear/src/main/res.
  7. If you want to customize the Digital watchface app, you will rework both the wear/src/main/res/layout/digital_watch_layout_awake.xml and the wear/src/main/res/layout/digital_watch_layout_dim.xml. These are standard Android XML layouts.
  8. If you don't want to use the Analog or Digital, remove the AnalogWatchfaceActivity's or DigitalWatchfaceActivity's <activty> entry from watchface/wear/src/main/AndroidManifest.xml
  9. When you're done with the layouts, update the PNG files in watchface/wear/src/main/res/drawable with screenshots for the Background Provider picker (shown near the bottom).
Get creative!


CASUALWear Images
mobile app: http://forum.xda-developers.com/attachment.php?attachmentid=2996683&stc=1&d=1414986371

Digital:
attachment.php
attachment.php


Analog
attachment.php


Transitioning through Background Providers:
attachment.php


See attachments

Downloads and Source
You can get source here: https://github.com/adamoutler/watchface
Download it free here: https://play.google.com/store/apps/details?id=com.casual_dev.CASUALWatch.release
Get the donate version and give me an excuse for my wife here: https://play.google.com/store/apps/details?id=com.casual_dev.CASUALWatch
 
  • Like
Reactions: AdamOutler

Zatta

Inactive Recognized Developer / Contributor
Dec 22, 2010
2,177
1,222
Sneek
Hi Adam,

I managed to get watchface build and run on a previous version of android studio. Now that I have updated it I'm unable to build it anymore. Damn! I've changed some gradle properties according to:
http://tools.android.com/tech-docs/new-build-system
Renamed a few properties to make things more consistent.
BuildType.runProguard -> minifyEnabled
BuildType.zipAlign -> zipAlignEnabled
BuildType.jniDebugBuild -> jniDebuggable
BuildType.renderscriptDebug -> renderscriptDebuggable
ProductFlavor.renderscriptSupportMode -> renderscriptSupportModeEnabled
ProductFlavor.renderscriptNdkMode -> renderscriptNdkModeEnabled

But I'm getting stranded on:
Code:
Error:(27, 0) Could not find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@a49d4b5.

I know I'm not the greatest dev in the world so I need some help here. Please?
 

SchmilK

Senior Member
Nov 2, 2007
775
543
play.google.com
Google Pixel 6 Pro
With Android Wear 5.01 this maybe old?

Yes, received an email from Google 2 days ago saying I need to update to use API 5.02 otherwise my app will cause problems and stop working after January 31st 2015.

Managed to mangle my way through a Google provided template, but having issues using images instead of drawPaint for the hands....time to learn.
 

seahorsepip

Senior Member
Jan 22, 2012
459
176
Yes, received an email from Google 2 days ago saying I need to update to use API 5.02 otherwise my app will cause problems and stop working after January 31st 2015.

Managed to mangle my way through a Google provided template, but having issues using images instead of drawPaint for the hands....time to learn.

Code:
canvas.save(Canvas.MATRIX_SAVE_FLAG); //Saving the canvas and later restoring it so only this image will be rotated.
canvas.rotate(angle);
canvas.drawBitmap(bitmap, left, top, null);
canvas.restore();

This is the method I use to rotate bitmaps.

By the way what do you think about my first watchface: https://dl.dropboxusercontent.com/u/4281191/Line2.apk ?
After some fiddling around I was able to add a settings menu on the watch itself ^^
 

SchmilK

Senior Member
Nov 2, 2007
775
543
play.google.com
Google Pixel 6 Pro
Code:
canvas.save(Canvas.MATRIX_SAVE_FLAG); //Saving the canvas and later restoring it so only this image will be rotated.
canvas.rotate(angle);
canvas.drawBitmap(bitmap, left, top, null);
canvas.restore();

This is the method I use to rotate bitmaps.

By the way what do you think about my first watchface: https://dl.dropboxusercontent.com/u/4281191/Line2.apk ?
After some fiddling around I was able to add a settings menu on the watch itself ^^

I'll have to try that, thanks! All this time I"ve spent trying to hack through sample code, I probably could have learned how to program myself. :-/
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Hi guys,

    Rumor on the street has it that there is no API for making watchfaces.. Well, that's just plain wrong. I've been working with Daniel "Master of Time" Ortiz, aka @kuronosan. We've worked out a ton of the details in order to make watchface APKs easy! It's as simple as making some png resources and then putting code behind them. You just need a framework and that framework is right here! We are going to squash that "no API" rumor here and now. We've not only got the APis here, we've added nice things like transitions which you won't find on many of the other watches!
    attachment.php




    What's it all about?
    This package consists of 2 major parts, the Mobile App, and the Wear App.

    mobile app
    The mobile app's job is to deploy the Wear app and provide an icon/view which gets installed in the app drawer, allowing the user easy access to uninstallation. After the Wear "MicroApp" App is deployed, this application serves little function. Its a little funny as the MicroApp is much larger than the primary app due to resources

    Wear App
    The Wear App has two entirely different activities built into it; Analog and Digital. Wear applications are basically live wallpapers. They use the Background Provider permission and they have a few additional properties such as the need to react to the DisplayManager's Screen On, Screen Dim and Screen Off commands. Aside from this, they are simply eye-candy.


    Digital
    The Digital section of this watch was written entirely from scratch by yours truely. I found that the animations involved in watchfaces can bloat an activity significantly. So, I use Java Inheritance to extend the classes in order to logically separate things in this way
    1. DigitalWatchfaceActivity - Handles setting up the views and intent receivers for date/time/battery and updating the time
    2. DigitalWatchfaceActions - Handles PowerManager commands and aesthetic elements such as animations/transitions.
    3. DigitalWatchfaceApp - Used to launch the activity, reserved for future use.

    Analog
    Watchface-Gears has provided an awesome starter for Analog Watches. Rather than reinvent the wheel, we've used their base. I had to rework a considerable chunk to add in fading transitions and refactoring for analog/digital separation. When all was said and done, between mine and Daniel Ortiz's work, the only thing that's original is Watchface-Gears library. We kept Watchface-Gears in tact because it is an awesome library. It also set the license used throughout the project. (Apache)

    How do I make my own?
    Here's how you get started. Being that this is mostly artwork, I can't tell you "how" to do it... But, I can do what to do.
    1. Download the source.
    2. Load it into Android Studio
    3. Modify the package name suffix (watchface/gradle.properties: currentApplicationIdSuffix=MyCustomWatchName), and make it unique string, so when you generate a signed APK it doesn't collide with mine or others. Better yet, you should rename the entire package but that is a detailed operation.
    4. Modify both the Mobile and Wear (watchface/wear/src/main/AndroidManifest.xml & watchface/mobile/src/main/AndroidManifest.xml) files to rename the watch faces and app names for the Wear Picker.
    5. Build the package now to verify it works after you've changed properties.
    6. If you want to customize the Analog watchface app, all you need to do is modify the PNGs in watchface/wear/src/main/res.
    7. If you want to customize the Digital watchface app, you will rework both the wear/src/main/res/layout/digital_watch_layout_awake.xml and the wear/src/main/res/layout/digital_watch_layout_dim.xml. These are standard Android XML layouts.
    8. If you don't want to use the Analog or Digital, remove the AnalogWatchfaceActivity's or DigitalWatchfaceActivity's <activty> entry from watchface/wear/src/main/AndroidManifest.xml
    9. When you're done with the layouts, update the PNG files in watchface/wear/src/main/res/drawable with screenshots for the Background Provider picker (shown near the bottom).
    Get creative!


    CASUALWear Images
    see attached images

    Transitioning through Background Providers:
    attachment.php


    See attachments

    Downloads and Source
    You can get source here: https://github.com/adamoutler/watchface
    Download it free here: https://play.google.com/store/apps/details?id=com.casual_dev.CASUALWatch.release
    Get the donate version and give me an excuse for my wife here: https://play.google.com/store/apps/details?id=com.casual_dev.CASUALWatch
    3
    Wow!!!!
    You guys are awesome... Great to see you two were able to pull this project that is otherwise much needed. Thanks Dan and Adam. =D
    1
    excellent. thankyou.

    Sent from my D6603 using Tapatalk
    1
    great

    :good: If Adam wouldnt do it then who will try it . great work Adam :cowboy:
    Hi guys,

    Rumor on the street has it that there is no API for making watchfaces.. Well, that's just plain wrong. I've been working with Daniel "Master of Time" Ortiz, aka @kuronosan. We've worked out a ton of the details in order to make watchface APKs easy! It's as simple as making some png resources and then putting code behind them. You just need a framework and that framework is right here! We are going to squash that "no API" rumor here and now. We've not only got the APis here, we've added nice things like transitions which you won't find on many of the other watches!
    attachment.php




    What's it all about?
    This package consists of 2 major parts, the Mobile App, and the Wear App.

    mobile app
    The mobile app's job is to deploy the Wear app and provide an icon/view which gets installed in the app drawer, allowing the user easy access to uninstallation. After the Wear "MicroApp" App is deployed, this application serves little function. Its a little funny as the MicroApp is much larger than the primary app due to resources

    Wear App
    The Wear App has two entirely different activities built into it; Analog and Digital. Wear applications are basically live wallpapers. They use the Background Provider permission and they have a few additional properties such as the need to react to the DisplayManager's Screen On, Screen Dim and Screen Off commands. Aside from this, they are simply eye-candy.


    Digital
    The Digital section of this watch was written entirely from scratch by yours truely. I found that the animations involved in watchfaces can bloat an activity significantly. So, I use Java Inheritance to extend the classes in order to logically separate things in this way
    1. DigitalWatchfaceActivity - Handles setting up the views and intent receivers for date/time/battery and updating the time
    2. DigitalWatchfaceActions - Handles PowerManager commands and aesthetic elements such as animations/transitions.
    3. DigitalWatchfaceApp - Used to launch the activity, reserved for future use.

    Analog
    Watchface-Gears has provided an awesome starter for Analog Watches. Rather than reinvent the wheel, we've used their base. I had to rework a considerable chunk to add in fading transitions and refactoring for analog/digital separation. When all was said and done, between mine and Daniel Ortiz's work, the only thing that's original is Watchface-Gears library. We kept Watchface-Gears in tact because it is an awesome library. It also set the license used throughout the project. (Apache)

    How do I make my own?
    Here's how you get started. Being that this is mostly artwork, I can't tell you "how" to do it... But, I can do what I can do.
    1. Download the source.
    2. Load it into Android Studio
    3. Modify the package name suffix (watchface/gradle.properties: currentApplicationIdSuffix=MyCustomWatchName), and make it unique string, so when you generate a signed APK it doesn't collide with mine or others. Better yet, you should rename the entire package but that is a detailed operation.
    4. Modify both the Mobile and Wear (watchface/wear/src/main/AndroidManifest.xml & watchface/mobile/src/main/AndroidManifest.xml) files to rename the watch faces and app names for the Wear Picker.
    5. Build the package now to verify it works after you've changed properties.
    6. If you want to customize the Analog watchface app, all you need to do is modify the PNGs in watchface/wear/src/main/res.
    7. If you want to customize the Digital watchface app, you will rework both the wear/src/main/res/layout/digital_watch_layout_awake.xml and the wear/src/main/res/layout/digital_watch_layout_dim.xml. These are standard Android XML layouts.
    8. If you don't want to use the Analog or Digital, remove the AnalogWatchfaceActivity's or DigitalWatchfaceActivity's <activty> entry from watchface/wear/src/main/AndroidManifest.xml
    9. When you're done with the layouts, update the PNG files in watchface/wear/src/main/res/drawable with screenshots for the Background Provider picker (shown near the bottom).
    Get creative!


    CASUALWear Images
    mobile app: http://forum.xda-developers.com/attachment.php?attachmentid=2996683&stc=1&d=1414986371

    Digital:
    attachment.php
    attachment.php


    Analog
    attachment.php


    Transitioning through Background Providers:
    attachment.php


    See attachments

    Downloads and Source
    You can get source here: https://github.com/adamoutler/watchface
    Download it free here: https://play.google.com/store/apps/details?id=com.casual_dev.CASUALWatch.release
    Get the donate version and give me an excuse for my wife here: https://play.google.com/store/apps/details?id=com.casual_dev.CASUALWatch
    1
    purchased (so the wife is more likely to allow future indulgences)