Commit Graph

40 Commits

Author SHA1 Message Date
689990639d Migrate to gioui.org v0.10.2; fix Android BLE flow, rendering, and circle.
Main changes:
- go.mod: gioui.org v0.10.2, go 1.24, git.wow.st/gmp/ble
  e53c7be (commitNowAllowingStateLoss + BLUETOOTH_SCAN/CONNECT
  permission request from BlessedConnect.onAttach).
- main.go: ported to the v0.10 API (app.Main + single-goroutine
  event loop, app.FrameEvent.Frame, material.* styles, op.Offset/
  Affine, clip.Path for the circle).
- On-demand rendering: no fixed 30 FPS ticker redraws. Frames are
  produced by Bluetooth events and input; 30 FPS only while the live
  stopwatch runs. The worker goroutine only polls the runtime
  permission (while a scan is pending) and starts the deferred scan.
- widget.Clickable.Clicked must be called before Layout in v0.10:
  the Clickable consumes its click events during Layout.
- circleClip: the clip.Path.Cube control points are relative to the
  pen; the second control point of each segment must be at (k-r),
  not (k). The old code drew a distorted, non-circular shape.
- Android: perm_android.go pins a worker goroutine to one OS thread
  attached to the JVM for the life of the app (repeated
  attach/detach stack-overflows ART); the BLE view handle and scan
  permission state are shared with the render loop under bleMu.
- os_android.go: AndroidViewEvent attach handling; os_others.go:
  no-op stubs for other platforms.

New:
- scripts/build.sh: gogio -> apktool decode -> inject
  BLUETOOTH_SCAN/BLUETOOTH_CONNECT into the manifest -> rebuild ->
  debug-sign -> install. Usage: ./scripts/build.sh [phone|emu]
  [--no-install].
- .gitignore: .DS_Store, *.idsig.
2026-08-22 07:50:05 -04:00
23312478be Bump git.wow.st/gmp/ble to 20211115204235 to fix cgo bug. 2021-11-15 15:47:42 -05:00
36a4a9a3e5 Update to gioui.org@v0.0.0-20211113093644. Updates for MacOS 11.5. 2021-11-15 14:19:30 -05:00
41129e49cc Update to gioui.org@20200829. 2020-09-05 14:24:06 -04:00
63330567f0 Add gioui.org/cmd to go.mod 2020-09-04 07:51:27 -04:00
7852de3edc Bump gio version, bump ble version. 2020-06-12 16:13:33 -04:00
f7c201a3cd Update version of git.wow.st/gmp/ble. 2020-02-04 18:10:07 -05:00
087b6d3d06 Add fastlane/ metadata for F-Droid. 2020-01-06 17:07:38 -05:00
6c00897583 Version bump for git.wow.st/gmp/ble. 2019-12-31 08:46:53 -05:00
acf0e7efe9 Doc updates. 2019-12-16 08:56:32 -05:00
9484ffac99 Restructure to add depjars directory so that I can cause go to
build *.jar files in package dependencies.
2019-12-13 14:24:31 -05:00
52806e3f6b Updated appicon.png. 2019-12-11 14:40:39 -05:00
94638e9710 Add appicon.png and license information. 2019-12-11 09:59:19 -05:00
363ada0b85 Update git.wow.st/gmp/ble version (now uses Blessed library). 2019-12-10 09:49:13 -05:00
81ee9c3c2b Update git.wow.st/gmp/ble version. Fix peripheral name label. 2019-12-06 16:24:57 -05:00
6e020858d9 Layout improvements: do not draw the stopwatch if there is not
enough room for it.
2019-12-06 12:58:40 -05:00
31fa374c7f Downgrade to pre-Blessed version of git.wow.st/gmp/ble.
Improve layout generally and add wide (horizontal) layouts.

Add stopwatch widget.
2019-12-06 12:16:46 -05:00
14bbbf0679 UI enhancements for horizontal mode, intermediate checkin. 2019-12-05 21:00:17 -05:00
265caa30a2 Update git.wow.st/gmp/ble version. 2019-12-05 08:51:41 -05:00
05665cdd8f Update to latest version of git.wow.st/gmp/ble package. 2019-12-04 17:13:45 -05:00
c93d5b6906 Draw a circle around the heart rate value. 2019-12-02 13:29:08 -05:00
11962c3372 add README.md 2019-11-27 11:56:23 -05:00
66c4ac4885 Update go.mod. 2019-11-27 11:50:36 -05:00
fa469ac9b9 Working Android version. 2019-11-27 10:48:13 -05:00
c6a4d14f34 Larger font on Android. 2019-11-22 16:44:26 -05:00
fe2dadfa1f Some tweaks for the beginning of Android support. 2019-11-22 16:17:17 -05:00
390086788f Move BleUtil.java into the ble package, update go.mod. 2019-11-01 15:06:36 -04:00
8576d3e4c5 Add BleUtil.java and go:generate commands to create a jar for
inclusion by gogio.
2019-10-30 12:07:24 -04:00
c9f3733aee Add stub android implementation. 2019-10-28 12:46:57 -04:00
5e2898f553 Add ble.Init() call for future Android support. 2019-10-28 11:23:19 -04:00
de1ebbe8b2 Add go.mod. 2019-10-25 15:09:43 -04:00
299600b537 Update Gio version. Remove ticker as we already invalidate on
any Bluetooth event.
2019-10-25 14:58:07 -04:00
f04f3b1ffb Add buttons to cancel connection attempts and disconnect from
connected devices.
2019-10-25 14:04:08 -04:00
a123228e30 Read autoconnect ID out of configuration file, save config file
on any change to autoconnect ID.
2019-10-25 13:29:16 -04:00
45863ab212 Minor tweaks. 2019-10-25 09:08:14 -04:00
43cf503d77 Update to use DiscoverServiceEvent, DiscoverCharacteristicEvent, and
UpdateValue event.
2019-10-24 21:29:58 -04:00
11dd9c3eb4 Add autocnnect and connection timeouts. 2019-10-24 17:00:23 -04:00
7fa3860f6c Peripheral.Identifier is now a field, not a method. 2019-10-24 09:00:13 -04:00
c60519182a Manually call ble.DiscoverSerices(). 2019-10-23 19:29:41 -04:00
bda132266d Initial commit. 2019-10-23 18:29:13 -04:00