Coder Social home page Coder Social logo

danwallach / calwatch Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 6.0 90.94 MB

Android WearOS watch face app, displays your day's events on your wrist

Home Page: https://www.cs.rice.edu/~dwallach/calwatch/

License: GNU General Public License v3.0

Java 44.34% Shell 0.20% Kotlin 55.46%

calwatch's People

Contributors

danwallach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

calwatch's Issues

BroadcastReceiver for timezone changes

See example code: https://developer.android.com/training/wearables/watch-faces/drawing

private const val MSG_UPDATE_TIME = 0

class Service : CanvasWatchFaceService() {
    ...
    inner class Engine : CanvasWatchFaceService.Engine() {

        private lateinit var calendar: Calendar

        ...

        // receiver to update the time zone
        private val timeZoneReceiver: BroadcastReceiver = object : BroadcastReceiver() {
            override fun onReceive(context: Context, intent: Intent) {
                calendar.timeZone = TimeZone.getDefault()
                invalidate()
            }
        }

        // service methods (see other sections)
        ...
    }
    ...
}

private fun registerReceiver() {
    if (registeredTimeZoneReceiver) return
    registeredTimeZoneReceiver = true
    IntentFilter(Intent.ACTION_TIMEZONE_CHANGED).also { filter ->
        this@AnalogWatchFaceService.registerReceiver(timeZoneReceiver, filter)
    }
}

private fun unregisterReceiver() {
    if (!registeredTimeZoneReceiver) return
    registeredTimeZoneReceiver = false
    this@AnalogWatchFaceService.unregisterReceiver(timeZoneReceiver)
}

Possibly handy links:

Play Store says incompatible with all my devices

A few months ago CalWatch stopped working and doesn't even show up as selectable. Play Store says it is incompatible with all my devices. My phone has Nougat and my watch is Android Wear 1.0 (Original Moto 360)

[Enhancement Proposal] Add an option for a 24-hour clock face

I have events with people from around the world, so I use either a digital watchface, or a 24-hour analog face. The only app that provides this, along with calendar functionality, is Sectograph, which I have been using for the last two years or so. Would it be possible to add a 24-hour watchface?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.