Commit Graph

138 Commits (962720145e3678f5ffd17ea6c4a9e277a665b144)

Author SHA1 Message Date
cpfeiffer 92c629c351 Ranem NotificationType.UNDEFINED to UNKNOWN 2016-10-10 23:06:44 +02:00
cpfeiffer 62828e5158 Remove ORIGIN_ notification constants, clean up
- MI preferences now use NotificationType.getFixedName() for preference
  keys
2016-10-10 22:45:26 +02:00
cpfeiffer 125c0092cb Storage and improved way of realtime data (hr, steps so far) 2016-10-08 01:35:58 +02:00
Andreas Shimokawa 8080734470 Pebble: use telegram icon for telegram messages
also use the facebook icon for the official facebook app
(untested because we would never use facebook)
2016-09-21 21:31:23 +02:00
Andreas Shimokawa 6a18d90fee Vibratissimo: add simple and buggy activity with a slider for vibration control
Also includes some fixes and "find your device" support ;)
2016-09-20 20:28:52 +02:00
Andreas Shimokawa 8ba7bc7353 Add (useless) support for Vibratissimo "massage devices"
Don't take this serious. It will make the "massage device" vibrate when a phone call arrives.
It is inspired by the famous lawsuit[1] which has nothing to do with the Vibratissimo device maker.
After reading this I picked up the cheapest ble massage device just to see if we could support it.
And yes, we can.

[1] http://arstechnica.com/wp-content/uploads/2016/09/vibratorsuit.pdf
2016-09-19 12:37:41 +02:00
JohnnySun 08f2b0eb7c fix somebug and rewirte the auth process 2016-09-13 18:15:03 +08:00
cpfeiffer 083d752011 Even more documentation/specification 2016-08-27 20:14:42 +02:00
cpfeiffer bfc0b4faaf Add robolectric dependency and addd a first EntitiesTest
Use KitKat (19) as target sdk since robolectric 3.1.2/sqlite4java
does not understand "WITHOUT ROWID" tables.

Also, add constants for user's gender and document some things.
2016-08-24 22:56:42 +02:00
cpfeiffer 26d490ffd6 Store the DeviceType in the Device entity
(so that we can later recreate a GBDevice from a Device)
2016-08-17 00:34:19 +02:00
cpfeiffer 8766fc5269 Handle MiBand2 device type 2016-08-14 23:25:35 +02:00
Andreas Shimokawa 8ea29e6e1d Refactor database / sample access (#206)
We now have separate tables for each provider's samples but a common interface.
2016-07-27 23:34:13 +02:00
Andreas Shimokawa 726f767576 work towards a Pebble Misfit raw sample table 2016-07-25 22:19:39 +02:00
Andreas Shimokawa 181df7311a add missing file 2016-06-24 14:57:01 +02:00
Andreas Shimokawa b77f3ad3bf Pebble: Implement call dismissal with canned messages
This also moved the canned replies setting to pebble settings
(we will change that if we have another device supporting this)
2016-06-24 10:25:08 +02:00
cpfeiffer 687beee501 Migration work 2016-06-16 21:54:53 +02:00
cpfeiffer a01507a924 Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-14 20:14:04 +02:00
Andreas Shimokawa 98999993e5 Pebble: In AppManager allow moving apps on the device to the top (context menu) 2016-06-12 01:20:12 +02:00
Andreas Shimokawa f812fb1b1f Improvements to MusicPlayback receiver
- Also send duration if "duration" extra is present
- If "playing" and "postion" extras are present send a music state update

treat previous state and current state as equal if position delta is <=2 seconds
(Neccessary for some players which update every second - the pebble however counts by itself)
2016-06-11 23:37:03 +02:00
Andreas Shimokawa 2d080cabb2 fix NPE by using Objects.equals() 2016-06-11 22:32:38 +02:00
Andreas Shimokawa d1a62968f6 Do not send new audio metadata to device if nothing has changed
This prevents some players which send a metadata changed intent every second to drain the battery
2016-06-10 23:13:33 +02:00
Andreas Shimokawa 9623449b6e Merge branch 'master' into feature-weather 2016-06-09 23:15:23 +02:00
Steffen Liebergeld c5262869d9 Use names for playstates
These names need to be mapped to device specific constants in the
device code.
2016-06-09 20:02:55 +02:00
Steffen Liebergeld e386d6da43 Add onSetMusicState(MusicStateSpec stateSpec)
This commit contains the infrastructure needed for the
NotificationHandler to send music state information to the device. That
is, it introduces a call onSetMusicState(MusicStateSpec stateSpec), that
in turn sets up an intent to the service, which will then call the
encodeSetMusicState() function of the device. encodeSetMusicState is
available for pebble only. There are empty stubs for other devices.
2016-06-08 20:31:48 +02:00
Steffen Liebergeld 1d5c8bae9d MusicStateSpec: introduce new class describing the music state
Contains:
- state
- position
- playRate
- shuffle
- repeat

This is close to what PebbleProtocol currently supports.
2016-06-08 20:22:56 +02:00
Andreas Shimokawa 98a0774fc2 Merge branch 'master' into feature-weather 2016-06-07 22:53:40 +02:00
cpfeiffer ae548d0806 WIP: more work, compile again 2016-06-06 23:18:46 +02:00
cpfeiffer 3b87966fe9 Merge branch 'master' into db-refactoring 2016-06-06 22:16:40 +02:00
Andreas Shimokawa cb1ec5dccb Make calendar event type byte instead of int
Now the UUID will be constructed like this:

High 64bit 0x4742474200 | type
Low 64bit id
2016-05-24 13:11:57 +02:00
Andreas Shimokawa 4bd578ebea Pebble: send sunrise/sunset to watch for today and tomorrow, also delete previous timeline pins 2016-05-16 23:37:40 +02:00
Andreas Shimokawa 017f650b3f Pebble: send sunrine and sunset pins to timeline when setting time in debug menu
This is just a test and it will leak your timeline data, since we never delete it.
Also this adds some rough infrastructure for calendar events.
2016-05-16 17:30:11 +02:00
Andreas Shimokawa dafdb1008d Merge branch 'master' into feature-weather 2016-05-16 14:15:39 +02:00
cpfeiffer 8ca821ab8a More WIP on db refactoring 2016-05-13 23:47:47 +02:00
cpfeiffer 70eaca8883 Further WIP towards greendao:
- for now, use a custom version of greendao with the fix 39ac07be550c5f5b6fd265c8870f58015c95e908
- use a superclass for activity sample classes that provides value normalization using SampleProvider
2016-05-01 23:56:14 +02:00
cpfeiffer 4744d8b59e Some more WIP towards greendao. Note: does not compile atm. 2016-05-01 00:19:15 +02:00
cpfeiffer e35ce978bd Remove now unused imports + fix one more SharedPreferences usage 2016-04-25 23:43:19 +02:00
cpfeiffer 0704915a88 Move parsing of preference strings to int values to Prefs 2016-04-25 23:39:03 +02:00
cpfeiffer f15a97d994 Initial live heartrate measurement in the live activity tab #178 2016-04-12 23:12:50 +02:00
Andreas Shimokawa a15b327ff1 Refactoring: get rid of ServiceCommand, use new CallSpec and MusicSpec to pass Call and Music info 2016-04-04 20:08:34 +02:00
cpfeiffer b129844169 Small fixes to PR 273 #232
- dynamically toggle hr sleep support when preference changes
- check hr support dynaically after device info is available to avoid false error message
2016-04-03 22:38:06 +02:00
Andreas Shimokawa adfef3db42 Prepare code for more music metadata (duration, track count, current track number)
Oh and format code
2016-03-27 17:45:44 +02:00
Andreas Shimokawa 4be1926459 reformat code though Android Studio 2016-03-20 15:00:05 +01:00
cpfeiffer e26e6d7b24 Display HR firmware version
Hide fw,hw,hr versions by default and show them on demand with an info
button.
2016-03-16 00:27:32 +01:00
cpfeiffer 3f39928df5 Some more cursor-related improvements (closing) 2016-03-08 23:48:31 +01:00
Andreas Shimokawa 3786e0b7f2 fix typo 2016-03-03 16:04:17 +01:00
Andreas Shimokawa bd7b34985b reformat code and optimize imports 2016-03-03 15:47:00 +01:00
Andreas Shimokawa 2a7f9226a0 Pebble: send configuration to watch
TODO: handle booleans
2016-03-03 14:23:17 +01:00
Andreas Shimokawa 5eb525ee44 Merge pull request #239 from 0nse/sleepAlarmWidget
Add widget to quickly set an alarm according to the user's preferred sleep length (in hours)
2016-03-02 00:36:13 +01:00
0nse 3babedf936 + Add Widget which allows quickly creating an alarm depending on the user's preferred sleep length (in hours). 2016-02-29 21:36:39 +01:00
Andreas Shimokawa ed85fd5011 convert byte and short values related to activity tracking to int
This avoids a lot of problems because java
- does not know unsigned values
- jvm and dalvic do not internally support byte and short
- sqlite does not know them either
2016-02-29 20:54:39 +01:00
Kasha 9e636d66f6 Initial heart rate support by KashaMalaga #178
(removed unrelated Android M fixes and squashed commits)
2016-02-27 00:05:06 +01:00
cpfeiffer 0ef738067d Some work in progress for heart rate graphs #178
Currently we get the heart rate when synchronizing activity data
(i.e. not live) and we write it to the activity database so that we
can show a nice graph. The value is currently always 0 though,
because we can't enable recording hr, yet.
2016-02-26 23:45:17 +01:00
cpfeiffer a10c6f3b9f Some initial heartrate support #205
(not visible to user yet)
2016-02-26 00:30:57 +01:00
danielegobbetti b858e50804 Use strings to store activity shared preferences.
System has trouble with accessing integer in the preferences, so let's not use them.
2016-02-21 13:04:32 +01:00
Daniele Gobbetti baf5eee72f Refactored the User Activity-tracking related preferences.
Created a new device-independent class ActivityUser to hold the data
Moved the constants from the miband constant class to the ActivityUser class
Removed the miband-specific in favor of common-prefixed preferences (with upgrade support for legacy values)
Changed the way the gender is stored to an integer value
Removed the hardcoded default values for user data in favor of static fields of the ActivityUser class
2016-02-02 17:33:24 +01:00
danielegobbetti 4bb78722b5 Merge branch 'master' of https://github.com/Freeyourgadget/Gadgetbridge into feature-weather 2016-01-09 18:48:39 +01:00
Andreas Shimokawa 0b53f60b0d Pebble: EXPERIMENTAL support for replying to wearable notifications
Tested with Signal, more could work.
2016-01-09 17:54:17 +01:00
danielegobbetti d7f4769f57 make the conversion methods static 2016-01-05 16:04:32 +01:00
danielegobbetti c7c723134e Add weather singleton (to store the whole data passed by weather notification).
Add weather info for TimeStylePebble.
Add further fields to the ParcelableWeather class.
Add reverse mapping to ParcelableWeather to get back the original OpenWeatherMap API condition codes.
2016-01-03 18:28:32 +01:00
danielegobbetti abb7ed0189 Manual mapping between openweathermap and yahoo weather conditions. 2016-01-03 16:33:48 +01:00
danielegobbetti 070f3fa66f Add further getters, converting the data to other units 2015-12-19 20:26:43 +01:00
danielegobbetti 5fb8c7bed8 Use the right column for sorting upcoming events.
Plus add forgotten getQueue
2015-12-18 18:49:29 +01:00
Daniele Gobbetti 19afe23703 Read events from android calendars, one week in the future.
- Needs new permission.
- Stores the details needed for the pebble timeline and the miband
- Device support to be done
2015-12-16 14:45:01 +01:00
Andreas Shimokawa 53fb63781e WIP: Work towards SMS replies / canned replies
- Implement the PebbleProtocol side (2.x and 3.x)
- Add Preferences for canned replies

This can be tested by enabling untested features in Pebble Settings
It lets you see and select the replies set up in "Canned Repies" on the Pebble
You will get a "NOT IMPLENTED" message on your Pebble.

THIS DOES NOT ACTUALLY DO ANYTHING USEFUL YET.
2015-12-13 12:03:57 +01:00
cpfeiffer f258e62633 Refactoring: centralize GBDevice creation
- created and provided by DeviceHelper
- passed from UI to service
- without UI, service uses DeviceHelper directly

=> Cleaner and less duplicated code
2015-12-13 00:43:07 +01:00
cpfeiffer bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01:00
cpfeiffer 81c2f657bd Some lint fixes 2015-11-23 22:46:12 +01:00
cpfeiffer d9722c6db2 Translate strings, remove unused variable 2015-11-09 23:56:46 +01:00
cpfeiffer 694b3d897f Some Javadoc 2015-10-26 23:32:03 +01:00
cpfeiffer 4250a002b4 Merge branch 'master' into live-activity-data 2015-09-27 00:16:04 +02:00
Andreas Shimokawa 1d41f2f8e4 Refactoring
The notfification APIs now use NotificationSpec as their only parameter, which
contains all information (required and optional ones).
We no longer have separate methods and actions for SMS/EMAIL/GENERIC anymore.
The type of notification is important now, not how we received them technically.
2015-09-24 14:45:21 +02:00
Julien Pivotto 21d59b23c1 Allow QKSMS notifications to be handled as a generic notification if SMS notification mode is set to "never"
This makes it possible to use the "Open on Phone" and individial dismiss feature with QKSMS.
2015-09-13 22:51:05 +02:00
Andreas Shimokawa 95e22a4e32 Pebble: Allow stopping apps though PebbleKit messages (also in the API) 2015-09-13 21:44:26 +02:00
Julien Pivotto eafb795874 Fix a small typo in gadgetbridge.model.ServiceCommand 2015-09-13 14:26:55 +02:00
Andreas Shimokawa 4f80844016 noficicaion_kind -> notificationKind 2015-09-13 13:38:11 +02:00
Julien Pivotto d50a82d495 Pebble: Set application icons for generic notifications
Closes #116.
2015-09-13 00:39:53 +02:00
cpfeiffer 42420e676b More WIP: displays live activity data 2015-09-02 23:49:06 +02:00
cpfeiffer ab8982e7f2 WIP: support for live display of activity data 2015-09-02 08:02:26 +02:00
Andreas Shimokawa 46171e4ab8 Some preparations for interactive notifications 2015-08-31 22:27:25 +02:00
cpfeiffer 41d8bcf634 Make firmware and app installation a bit more user friendly #30 2015-08-30 00:21:51 +02:00
Daniele Gobbetti 26792717d4 Add showing when the device wasn't worn by the user 2015-08-28 14:58:30 +02:00
Daniele Gobbetti fb5ebeacb6 Light colors for the graphs.
Closes #99
2015-08-28 14:58:30 +02:00
Daniele Gobbetti 7923e153e6 Moved the enum to standalone in the model package. 2015-08-27 11:50:31 +02:00
cpfeiffer 77cad5c47f Initial support for testing the DeviceCommunicationService
Lots of support classes to enable local testing, without
a device or an emulator.
2015-08-22 01:09:56 +02:00
cpfeiffer a1cb246e27 Add and use a "client interface" for the actions of the service
Previously, the DeviceCommunicationService was invoked directly,
via
Intent intent = new Intent(foo, bar);
intent.setExtra(EXTRA_BAZ, baz);
startService(...);

and this was scattered throughout GadgetBridge.
Now there is a "frontend" available, so that you can call
the service more easily, like
GBApplication.deviceService().connect();

For a start, this client interface (DeviceService) actually
implements the same interface (EventHandler) as the receiving side
(DeviceSupport). This may change in the future.

This will also make testing much easier, because we can use
this client interface to invoke the test service as well.
2015-08-21 01:03:57 +02:00
cpfeiffer 7c597b325a Big refactoring: move classes and packages around to get a better structure
- model package contains mostly shared interfaces (UI+service), not named GB*
- impl package contains implementations of those interfaces, named GB*
  the impl classes should not be used by the service (not completely done)
- the service classes should mostly use classes inside the service and deviceevents
  packages (tbd)

Every device now has two packages:
- devices/[device name] for UI related functionality
- service[device name] for lowlevel communication
2015-08-03 23:09:49 +02:00
Andreas Shimokawa 9f591ef8b5 Refactoring: Merge Pebble app/fw installer activity and Miband firmware update Activity 2015-07-28 17:30:20 +02:00
cpfeiffer 858c962dd0 Refactoring #45
- add some device and db independent model interfaces for activity samples
- use these model interfaces where possible
- chart activity does not do device dependent rendering anymore and uses
  normalized values for all devices
- initial interface for daily summaries
2015-07-28 00:05:05 +02:00