[APP] Widget Calendar v1.9.6 - Pace/Stratos/Verge (2020-03-10)

Search This thread

GreatApo

Senior Member
Feb 15, 2011
1,087
659
amazfit-calendar-widget.png

Pace/Stratos/Verge Calendar Widget
Hello everyone,
After @Quinny899 's excellent work :victory:, we are able to make widget/apps! So, here is the first Calendar Widget for our Amazfit Pace/Stratos! This app would be displayed as a widget after you reboot your watch (or the launcher). In order to move this widget you will need @Quinny899 's "Springboard Settings" app from here since it can't be moved through the phone app.

If you want to support my work or the other devs involved, now is your chance to buy us a beer or help us gather the money for our next watch device:
- GreatApo's donation button
- lfom's donation button
- Amazmod OpenCollective
- Quinny899 donation button

Screenshot:
com.dinodevs.pacecalendarwidget-1.9.3.pngcom.dinodevs.pacecalendarwidget-1.9.3-settings.pngcom.dinodevs.pacecalendarwidget-1.9.3-timeline.png


Features:
  • This is a Pace/Stratos/Verge Widget (2 actually)
  • Calendar and Timeline widgets
  • Change to previous/next months (swipe/buttons)
  • Refresh to current date
  • Vibration on button touches (default disabled)
  • Date is refreshed when you change back to this widget
  • Double tap/press for settings
  • Change calendar's color
  • Show/Hide year number
  • Show/Hide week numbers
  • Select Sunday or Monday as 1st day of the week
  • Supported languages: English, Bulgarian, Chinese, Czech, Danish, Dutch, French, German, Greek, Hebrew, Hungarian, Italian, Japanese, Korean, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, Thai, Turkish, Vietnamese
  • Right to left Calendar support (for Hebrew language)
  • Settings are saved
  • Calendar events are shown (new style, phone events through Amazmod or iCalendar feed/file)
  • You can touch on each day for more events info
  • Timeline event view as widget or launchable from app list/Calendar (deprecated separate old Timeline Widget)
  • Support of iCalendar feed (URL) and local ICS file
Bugs:
  • You tell us!


Calendar Events - How To
There are 3 ways to get your calendar evens.
1. From phone: Install Amazmod (both phone+watch) and forward phone's stock calendar events.
2. From iCalendar feed: Create the file "/sdcard/Android/data/com.dinodevs.pacecalendarwidget/files/pacecalendar.txt" and write your iCalendar feed url in the first line (eg. http://mysuperdupercalendar.ics). Your events will be updated from WiFi (be connected). Powered by iCal4j library.
3. From iCalendar local file: Put your ics file at "/sdcard/Android/data/com.dinodevs.pacecalendarwidget/files/" named as "calendar.ics". This file is been searched only if there is no URL of method 2 and WiFi is off.
For 2 & 3, after placing the files, press the events button, the Timeline will open, press the refresh icon​


Installation
ADB install command / restart launcher: (if you have errors, uninstall the previous version first)
Code:
adb install -r PaceCalendarWidget.X.X.X.apk
adb shell am force-stop com.huami.watch.launcher
If you are on Verge, you need to enable the widget using "Springboard Settings" app from Quinny899 or Amazmod. If the widget does not show up, reboot the watch and try again.

ADB uninstall command:
Code:
adb uninstall com.dinodevs.pacecalendarwidget
ADB command to delete calendar data from watch:
Code:
adb shell settings delete system CustomCalendarData


Changelog:
Code:
Version 1.9.6 (10/03/2020)
• Timeline widget also available
Code:
Version 1.9.5 (09/09/2019)
• Timeline code improvements
• Calendar launchable from app draw (new activity)
• Translation improvements (added missing translated words, Bulgarian UI adjustments & Vietnamese days fix)
• Week number fix when Monday is 1st
Code:
Version 1.9.4 (02/09/2019)
• Added Bulgarian, Danish & Vietnamese translations (by danireo, thra1982 & chienkd)
• Added ability to launch Timeline from app draw
Code:
Version 1.9.3 (07/02/2019)
• Today's event color change fix
• New event refresh button
• Display messages improved with more info
• Last saved vibration preference not loading fix
• Missing vibration from events button added
• New Timeline style compatible with calendar colors
• Multiple "Today" separator fix
Code:
Version 1.9.2 (04/02/2019)
• Local iCalendar (*.ics file) support by LFOM
• No event location crash fix
Code:
Version 1.9.1 (02/02/2019)
• New icons buttons
• iCal support (local URL, update with wifi) by LFOM
• Long press timer on timeline to load iCal events
• Crash fix when events have never been saved
• Previous month crash fix
• Verge compatibility fixes by LFOM
Code:
Version 1.9.0 (02/02/2019)
• Calendar events are now shown (much of the work was done by @lfom)
• Timeline widget is also integrated in the calendar
• Hungarian translation fix
Code:
Version 1.8.0 (16/01/2019)
• Verge compatibility fix by LFOM
• Romanian translation added by Xonx
• Croatian translation added by TumiBC
• Various translation display fixes
Code:
Version 1.7.0 (13/09/2018)
• Korean translation added by eastway11
• Thai translation added by iamping
• Vibration option added
• Added week numbers (default disabled)
Code:
Version 1.6.3 (28/06/2018)
• Added Turkish translation
• Added settings icon
• Open settings with screen double tap
Code:
Version 1.6.2 (26/05/2018)
• Added Dutch translation (thanks to Northguy)
Code:
Version 1.6.1 (14/04/2018)
• Czech language fix
Code:
Version 1.6 (13/04/2018)
• Settings are now saved in the emulated external storage
• Added Czech, Hebrew, Polish translations (thanks to kaziu687, pavel zeldin and selvok)
• Right to Left calendar support
• Settings pop up bug fix reverted to version's 1.4 solution + long press duration is set to 2sec
• Ability to call double click listener in source codes
Code:
Version 1.5 (10/04/2018)
• Added translations for setting texts
• Swipe calibrations
• Fixed settings opening bug for Stratos (?)
Code:
Version 1.4 (09/04/2018)
• Swipe up/down to change month added again
• Long press rescripted
• Ability to use left/right swipes in source code (not recomended for widget mode)
Code:
Version 1.3 (08/04/2018)
• Translations added (ported from this project: [URL="https://github.com/GramThanos/jsCalendar"]jsCalendar[/URL])
• Set Monday 1st day of the week
• Vibration on button touch
• Bug clicking refresh while on settings fixed
Code:
Version 1.2 (08/04/2018)
• Refresh to current date after widget change
• Change calendar's color
• Show/Hide year number
• Swipe removed
Code:
Version 1.1 (07/04/2018)
• Custom made
• New design
• Refresh to current date
• Swipe to move through months (buggy)
Code:
Version 1.0 (19/02/2018)
• Initial release


Download:
This app is based on @Quinny899 's work over springboard widgets :highfive: . The source code is writen with coments so you can use it as a base to create a widget. There are already scripted codes (ex. hard coded swipes/long clicks) that you may need. For more about how to set up a widget/app for Pace, you can also follow this topic "[DEV] Create custom home screen pages for the Pace".​


FAQ:
  • Can I sync my phone calendar events with this app?
    You can't. However, some devs are working on it. Now you can!
  • My language is not included!
    Reply to this topic with your language's week days, months and the texts you see in settings. I will add them ASAP.
  • Can I get reminders from this widget?
    No since your calendar phone app can/will throw notifications that will then be forwarded to the watch. Hence, there is no need for reminders.
  • What is the battery impact?
    Data are send through Amazmod's battery and alarm data forwarding, but calendar data updated only if there is a change (but also once a day). Hence, you will not see any difference relative to forwarding batttery/alarm only.
  • Do I have to install Timeline Widget?
    No you don't have too, it is integrated in the calendar (click a button and it opens). However, if you need the Timeline as a widget, you should.
  • I have the [INSTALL_FAILED_UPDATE_INCOMPATIBLE] error!
    Run the uninstall command from adb first. (don't uninstall with Amazfit Tools)
  • I see a black widget!
    This indicates a widget crash. I may not be aware of the problem, so, a logcat will help me fix it.
    To save LogCat to a text file open up a terminal window and type: (it will create a file named "logcat.txt" in your current directory)
    Code:
    adb logcat -d > logcat.txt


Thanks to:
Code:
Quinny899, DarkThanos, LFOM, iCal4j library team ([url]https://github.com/ical4j/ical4j)[/url] and all the translators (see changelog)
 
Last edited:

Cracklydisc

Senior Member
Feb 3, 2017
65
199
Parma
View attachment 4424473
Pace Calendar Widget
Hello everyone,
After @Quinny899 's excellent work :victory:, we are able to make widget/apps! So, here is the first Calendar Widget for our Amazfit Pace!

Screenshot:
attachment.php

Download:
• Version 1.0 in attachments: View attachment 4424474

Installation:
Code:
adb install -r PaceCalendarWidget-1.0.apk

Uninstall:
Code:
adb uninstall com.dinodevs.pacecalendarwidget

Usage:
This app would be displayed as a widget after you reboot you watch (or the launcher). In order to move this widget you will need @Quinny899 's "Springboard Settings" app from here since it can't be moved through the phone app.

Source:
This app is completely based on @Quinny899 's work with small changes :highfive:, basically just the app layout. The source code for a demo widget/app can be found here. For more follow this topic "[DEV] Create custom home screen pages for the Pace".

Great Job! can i add it in my custom ROM?:)
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,507
7,747
23
Salford, Greater Manchester, UK
quinny898.co.uk
Nice job! You worked really quick to get this up ?

Really great widget. Is there any way it can sync with calendar on my phone. I understand that there is no google services on the watch, but probably there is other way to push events data.

Not only is there no play services but the watch doesn't actually stay connected to WiFi, and unless you manually connect it in code it won't do (which can be a battery hog). What I'm also looking at is how the weather app works, as that must use internet over Bluetooth, to see if it's feasible to connect that way
 
  • Like
Reactions: LBA97 and le_lutin

GreatApo

Senior Member
Feb 15, 2011
1,087
659
Great Job! can i add it in my custom ROM?:)
You should speak with @Quinny899, the base code is actually his and you should probably add the "Springboard Settings" apk too. For me do whatever you want :)

Not only is there no play services but the watch doesn't actually stay connected to WiFi, and unless you manually connect it in code it won't do (which can be a battery hog). What I'm also looking at is how the weather app works, as that must use internet over Bluetooth, to see if it's feasible to connect that way
Nice!
 
  • Like
Reactions: LBA97

shadowcaster666

Senior Member
Jan 17, 2010
95
45
Nice job! You worked really quick to get this up



Not only is there no play services but the watch doesn't actually stay connected to WiFi, and unless you manually connect it in code it won't do (which can be a battery hog). What I'm also looking at is how the weather app works, as that must use internet over Bluetooth, to see if it's feasible to connect that way

What about making a companion phone app that can send data from the internet to the watch over BT?

In the interest of further apps with net access, you could make a phone side app that gives net access to watch apps and can be used by anyone wanting make an internet enabled watch app.
 
  • Like
Reactions: pmansour

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,507
7,747
23
Salford, Greater Manchester, UK
quinny898.co.uk
What about making a companion phone app that can send data from the internet to the watch over BT?

In the interest of further apps with net access, you could make a phone side app that gives net access to watch apps and can be used by anyone wanting make an internet enabled watch app.
That's what I'm going to do probably, the weather app uses code that only works for the weather :/
 

storm of fire

New member
May 15, 2013
2
1
Hi. Good job
Can you upload the source code? I saw the thread of demo widget but your calendar its amazing bt im spanish and usually my weeks begin on monday and i wold like change it.
thanks in advantage
 
  • Like
Reactions: tomato4

Diginix

Senior Member
Sep 27, 2016
343
134
Thuringia
Is it possible to have the current day and week selected and highlighted in the next version?
My Widget stays always in the last manually viewed month and week. This can be confusing. I would expect to see always the current month and day.
 

clebersleite

Senior Member
Sep 19, 2012
191
43
São Paulo
The source code was uploaded on Github.

How do you emulate this code? directly in your smartwatch? or you make a specific AVD?

I was able to compile and emulate directly on my smartwatch, I tried to change the location on the widget to leave it in my native language, but it translates the name of the month and the week does not. idea?
 

Attachments

  • smartwatch.jpg
    smartwatch.jpg
    64.5 KB · Views: 483

GreatApo

Senior Member
Feb 15, 2011
1,087
659
New version 1.1 is out.
New custom design, not android ViewCalendar. Swipe is a little buggy.


How do you emulate this code? directly in your smartwatch? or you make a specific AVD?
You can't emulate it unless you make a normal android app, and copy the code in this one (the widget) after.

I tried to change the location on the widget to leave it in my native language, but it translates the name of the month and the week does not. idea?
Version 1.0 uses android ViewCalendar and i do not think it can be translated. On the other hand, version 1.1 can be translated.
 
Last edited:
  • Like
Reactions: Saratoga79

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    amazfit-calendar-widget.png

    Pace/Stratos/Verge Calendar Widget
    Hello everyone,
    After @Quinny899 's excellent work :victory:, we are able to make widget/apps! So, here is the first Calendar Widget for our Amazfit Pace/Stratos! This app would be displayed as a widget after you reboot your watch (or the launcher). In order to move this widget you will need @Quinny899 's "Springboard Settings" app from here since it can't be moved through the phone app.

    If you want to support my work or the other devs involved, now is your chance to buy us a beer or help us gather the money for our next watch device:
    - GreatApo's donation button
    - lfom's donation button
    - Amazmod OpenCollective
    - Quinny899 donation button

    Screenshot:
    com.dinodevs.pacecalendarwidget-1.9.3.pngcom.dinodevs.pacecalendarwidget-1.9.3-settings.pngcom.dinodevs.pacecalendarwidget-1.9.3-timeline.png


    Features:
    • This is a Pace/Stratos/Verge Widget (2 actually)
    • Calendar and Timeline widgets
    • Change to previous/next months (swipe/buttons)
    • Refresh to current date
    • Vibration on button touches (default disabled)
    • Date is refreshed when you change back to this widget
    • Double tap/press for settings
    • Change calendar's color
    • Show/Hide year number
    • Show/Hide week numbers
    • Select Sunday or Monday as 1st day of the week
    • Supported languages: English, Bulgarian, Chinese, Czech, Danish, Dutch, French, German, Greek, Hebrew, Hungarian, Italian, Japanese, Korean, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, Thai, Turkish, Vietnamese
    • Right to left Calendar support (for Hebrew language)
    • Settings are saved
    • Calendar events are shown (new style, phone events through Amazmod or iCalendar feed/file)
    • You can touch on each day for more events info
    • Timeline event view as widget or launchable from app list/Calendar (deprecated separate old Timeline Widget)
    • Support of iCalendar feed (URL) and local ICS file
    Bugs:
    • You tell us!


    Calendar Events - How To
    There are 3 ways to get your calendar evens.
    1. From phone: Install Amazmod (both phone+watch) and forward phone's stock calendar events.
    2. From iCalendar feed: Create the file "/sdcard/Android/data/com.dinodevs.pacecalendarwidget/files/pacecalendar.txt" and write your iCalendar feed url in the first line (eg. http://mysuperdupercalendar.ics). Your events will be updated from WiFi (be connected). Powered by iCal4j library.
    3. From iCalendar local file: Put your ics file at "/sdcard/Android/data/com.dinodevs.pacecalendarwidget/files/" named as "calendar.ics". This file is been searched only if there is no URL of method 2 and WiFi is off.
    For 2 & 3, after placing the files, press the events button, the Timeline will open, press the refresh icon​


    Installation
    ADB install command / restart launcher: (if you have errors, uninstall the previous version first)
    Code:
    adb install -r PaceCalendarWidget.X.X.X.apk
    adb shell am force-stop com.huami.watch.launcher
    If you are on Verge, you need to enable the widget using "Springboard Settings" app from Quinny899 or Amazmod. If the widget does not show up, reboot the watch and try again.

    ADB uninstall command:
    Code:
    adb uninstall com.dinodevs.pacecalendarwidget
    ADB command to delete calendar data from watch:
    Code:
    adb shell settings delete system CustomCalendarData


    Changelog:
    Code:
    Version 1.9.6 (10/03/2020)
    • Timeline widget also available
    Code:
    Version 1.9.5 (09/09/2019)
    • Timeline code improvements
    • Calendar launchable from app draw (new activity)
    • Translation improvements (added missing translated words, Bulgarian UI adjustments & Vietnamese days fix)
    • Week number fix when Monday is 1st
    Code:
    Version 1.9.4 (02/09/2019)
    • Added Bulgarian, Danish & Vietnamese translations (by danireo, thra1982 & chienkd)
    • Added ability to launch Timeline from app draw
    Code:
    Version 1.9.3 (07/02/2019)
    • Today's event color change fix
    • New event refresh button
    • Display messages improved with more info
    • Last saved vibration preference not loading fix
    • Missing vibration from events button added
    • New Timeline style compatible with calendar colors
    • Multiple "Today" separator fix
    Code:
    Version 1.9.2 (04/02/2019)
    • Local iCalendar (*.ics file) support by LFOM
    • No event location crash fix
    Code:
    Version 1.9.1 (02/02/2019)
    • New icons buttons
    • iCal support (local URL, update with wifi) by LFOM
    • Long press timer on timeline to load iCal events
    • Crash fix when events have never been saved
    • Previous month crash fix
    • Verge compatibility fixes by LFOM
    Code:
    Version 1.9.0 (02/02/2019)
    • Calendar events are now shown (much of the work was done by @lfom)
    • Timeline widget is also integrated in the calendar
    • Hungarian translation fix
    Code:
    Version 1.8.0 (16/01/2019)
    • Verge compatibility fix by LFOM
    • Romanian translation added by Xonx
    • Croatian translation added by TumiBC
    • Various translation display fixes
    Code:
    Version 1.7.0 (13/09/2018)
    • Korean translation added by eastway11
    • Thai translation added by iamping
    • Vibration option added
    • Added week numbers (default disabled)
    Code:
    Version 1.6.3 (28/06/2018)
    • Added Turkish translation
    • Added settings icon
    • Open settings with screen double tap
    Code:
    Version 1.6.2 (26/05/2018)
    • Added Dutch translation (thanks to Northguy)
    Code:
    Version 1.6.1 (14/04/2018)
    • Czech language fix
    Code:
    Version 1.6 (13/04/2018)
    • Settings are now saved in the emulated external storage
    • Added Czech, Hebrew, Polish translations (thanks to kaziu687, pavel zeldin and selvok)
    • Right to Left calendar support
    • Settings pop up bug fix reverted to version's 1.4 solution + long press duration is set to 2sec
    • Ability to call double click listener in source codes
    Code:
    Version 1.5 (10/04/2018)
    • Added translations for setting texts
    • Swipe calibrations
    • Fixed settings opening bug for Stratos (?)
    Code:
    Version 1.4 (09/04/2018)
    • Swipe up/down to change month added again
    • Long press rescripted
    • Ability to use left/right swipes in source code (not recomended for widget mode)
    Code:
    Version 1.3 (08/04/2018)
    • Translations added (ported from this project: [URL="https://github.com/GramThanos/jsCalendar"]jsCalendar[/URL])
    • Set Monday 1st day of the week
    • Vibration on button touch
    • Bug clicking refresh while on settings fixed
    Code:
    Version 1.2 (08/04/2018)
    • Refresh to current date after widget change
    • Change calendar's color
    • Show/Hide year number
    • Swipe removed
    Code:
    Version 1.1 (07/04/2018)
    • Custom made
    • New design
    • Refresh to current date
    • Swipe to move through months (buggy)
    Code:
    Version 1.0 (19/02/2018)
    • Initial release


    Download:
    This app is based on @Quinny899 's work over springboard widgets :highfive: . The source code is writen with coments so you can use it as a base to create a widget. There are already scripted codes (ex. hard coded swipes/long clicks) that you may need. For more about how to set up a widget/app for Pace, you can also follow this topic "[DEV] Create custom home screen pages for the Pace".​


    FAQ:
    • Can I sync my phone calendar events with this app?
      You can't. However, some devs are working on it. Now you can!
    • My language is not included!
      Reply to this topic with your language's week days, months and the texts you see in settings. I will add them ASAP.
    • Can I get reminders from this widget?
      No since your calendar phone app can/will throw notifications that will then be forwarded to the watch. Hence, there is no need for reminders.
    • What is the battery impact?
      Data are send through Amazmod's battery and alarm data forwarding, but calendar data updated only if there is a change (but also once a day). Hence, you will not see any difference relative to forwarding batttery/alarm only.
    • Do I have to install Timeline Widget?
      No you don't have too, it is integrated in the calendar (click a button and it opens). However, if you need the Timeline as a widget, you should.
    • I have the [INSTALL_FAILED_UPDATE_INCOMPATIBLE] error!
      Run the uninstall command from adb first. (don't uninstall with Amazfit Tools)
    • I see a black widget!
      This indicates a widget crash. I may not be aware of the problem, so, a logcat will help me fix it.
      To save LogCat to a text file open up a terminal window and type: (it will create a file named "logcat.txt" in your current directory)
      Code:
      adb logcat -d > logcat.txt


    Thanks to:
    Code:
    Quinny899, DarkThanos, LFOM, iCal4j library team ([url]https://github.com/ical4j/ical4j)[/url] and all the translators (see changelog)
    6
    Version 1.2 is out:
    - Swipe removed
    - Long press to open setings
    - Change color
    - Show/Hide year number
    - Date is refreshed when changing back to the widget
    4
    Version 1.8.0 out...

    Greate work!
    Very nice apps, thank you for them.

    Could you please also add Romanian language in next versions?
    ....
    Regards,
    Cosmin
    Done! Thank you!

    @GreatApo can you please release the new version with the fix?
    Thanks in advance :)
    All credits for the verge compatibility to @lfom
    4
    I'm not good in coding, but when i look into the code it looks like your'e listening for longpress on the whole widget. In this case i would assume that longpress and swipe could conflict. Why not listening for a good old click on a button? U tried this in the first stage, right?
    We are trying to provide full featured base widget sources, so anyone could start from this to code other widgets.
    4
    New version out
    Code:
    Version 1.9.4 (02/09/2019)
    • Added Bulgarian, Danish & Vietnamese translations (by danireo, thra1982 & chienkd)
    • Added ability to launch Timeline from app draw
    I will now try once again to track the notorious no events bug.