pebble/devsite/source/_changelogs/4.0.md

76 lines
3.5 KiB
Markdown
Raw Permalink Normal View History

---
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
title: Pebble SDK 4.0 - Changelog
date: 2016-08-30
---
### Changes to Firmware
* Added support for [Pebble 2]({{ site.links.kickstarter3 }}).
* Added [AppGlances](/guides/user-interfaces/appglance-c/) and [Timeline Quick View](/guides/user-interfaces/unobstructed-area/).
* Removed Timeline Past.
### Changes to SDK
* Added the new "Diorite" platform for the Pebble 2.
* Added support for writing watchfaces in JavaScript running directly on the watch using
[Rocky.js](/blog/2016/08/15/introducing-rockyjs-watchfaces/).
* Added `PBL_COMPASS`, `PBL_SMARTSTRAP_POWER`, and `PBL_PLATFORM_DIORITE`
defines.
* Added ``preferred_result_display_duration`` to get the recommended number of
milliseconds a result window should be visible before it should be closed.
* Added ``AppExitReason`` and ``exit_reason_set``
for an application to be able to notify the system of
[the reason it is exiting](/guides/user-interfaces/app-exit-reason/).
* Added ``AppGlanceSlice``, ``AppGlanceResult``, ``AppGlanceReloadSession``,
``app_glance_add_slice``, ``AppGlanceReloadCallback`` and ``app_glance_reload``.
to support [AppGlances](/guides/user-interfaces/appglance-c/).
* Added [Unobstructed Area APIs](/guides/user-interfaces/unobstructed-area/):
``UnobstructedAreaWillChangeHandler``,
``UnobstructedAreaChangeHandler``,
``UnobstructedAreaDidChangeHandler``,
``UnobstructedAreaHandlers``,
``layer_get_unobstructed_bounds``,
``unobstructed_area_service_subscribe``
and ``unobstructed_area_service_unsubscribe``
to enable a watchface to adapt to overlays partially obstructing it, such as
during a Timeline Quick View.
* The compass service will now return ``CompassStatusUnavailable`` on diorite
watches, which do not have a compass. Apps built with SDK 2 or SDK 3 will
still see ``CompassStatusDataInvalid``.
* Report memory usage for Pebble Packages at build time.
* Fixed bug causing zero-length JS files to result in build failures.
### Changes to Documentation
* Added [AppGlances Guide](/guides/user-interfaces/appglance-c/)
* Added [Unobstructed Area Guide](/guides/user-interfaces/unobstructed-area/)
* Added [AppExitReason Guide](/guides/user-interfaces/app-exit-reason)
* Added [One Click Action Guide](/guides/design-and-interaction/one-click-actions/)
* Added API documentation for new ``App Glance``, ``UnobstructedArea`` and ``AppExitReason`` APIs.
### Known Issues
* `pebble gdb` is currently broken.
* AppGlances cannot currently use system icons.
* Custom AppGlance icons may not work if the assigned published media ID does not happen
to also be a standard resource ID. This can usually be worked around by assigning published
media IDs starting at 1 and counting up.
* For apps not using AppGlances, the system default icon may appear instead of the app-specified
menu icon if the resources defined for the app vary between platforms. This can be worked
around by defining the menu icon resource before defining any resources that use the
`targetPlatforms` attribute.