JohnnySun
08f2b0eb7c
fix somebug and rewirte the auth process
2016-09-13 18:15:03 +08:00
JohnnySun
90d730bdc8
Added miband2 connection support
2016-09-13 01:28:50 +08:00
cpfeiffer
e555066ffc
Fix firmware2 not being set
2016-09-11 21:15:36 +02:00
Andreas Shimokawa
56c7b6b1cb
fix sleep goal and step goal not being set in database (should fix user attribute table spamming)
2016-09-11 12:35:26 +02:00
Andreas Shimokawa
0cc95bd297
more debug
2016-09-11 12:23:36 +02:00
Andreas Shimokawa
d0f8e308a4
also invalidate fw2 when invalidating fw
2016-09-11 12:23:14 +02:00
Andreas Shimokawa
ec1f539267
revert accidentially commited stuff
2016-09-11 00:38:26 +02:00
Andreas Shimokawa
053b9553bc
correct changelog (pebble health is also affected by userid and deviceid swapping)
2016-09-11 00:36:04 +02:00
Andreas Shimokawa
9c2e40ecc0
Pebble: fix mixup of userId and deviceId in contructor for Misfit and Morpheuz samples
2016-09-11 00:12:37 +02:00
Andreas Shimokawa
e1927733ba
remove special handling for conversations (latest release removed pebble messages)
2016-09-10 23:53:24 +02:00
cpfeiffer
c31049839a
Make DeviceCommunicationServiceTestCase runnable with robolectric
...
- enables the test for travis
- tests operation when not connected
- tests connecting
- tests operation when connected
2016-09-10 11:12:51 +02:00
cpfeiffer
ec0a0db4f6
Make strings translatable in the database management activity
2016-09-06 22:59:08 +02:00
cpfeiffer
d011c437a2
This hopefully fixes the recreation of the old activity db
...
(I cannot reproduce or test it)
2016-09-06 21:54:03 +02:00
cpfeiffer
f2b344349f
Make some primary and foreign keys not-nullable
2016-09-06 00:00:48 +02:00
cpfeiffer
afef50dfab
Hide the "merge old activity database" elements when there is no old db
2016-09-05 23:55:00 +02:00
cpfeiffer
411a90326e
Fix method name
2016-09-04 22:39:35 +02:00
Daniele Gobbetti
5cbedc782d
Pebble health: accept records of firmware 4.0 (nothing changed among the data we parse)
2016-09-04 15:59:19 +02:00
cpfeiffer
8e154ca67d
slightly more testing of Device/Attributes
2016-09-03 21:16:45 +02:00
Andreas Shimokawa
5a49f1215e
Display known devices from db even if Bluetooth is off or unsupported
...
This allows to view activity data without turning bt on or connecting to the pebble emulator via tcp/ip (needs modified manifest for internet access)
2016-09-02 10:54:32 +02:00
cpfeiffer
6f02f9e350
Unit-Test and fix *Attributes sort order
...
When adding e.g. new DeviceAttributes, we cannot simply add them to the
attributes list, because that list is supposed to be ordered. We could
insert it at the beginning, but that would be brittle to changes in the
GBDaoGenerator, so we simply re-fetch them from the db after adding
new attributes.
2016-09-02 00:34:30 +02:00
Daniele Gobbetti
1e6cb67edd
UI refactoring of the DB management activity.
...
Added a method to delete the legacy DB only.
2016-08-31 17:35:28 +02:00
Daniele Gobbetti
6a2043eeb7
Create DB management activity by taking the existing functionalities from the debug activity.
2016-08-31 15:12:26 +02:00
Daniele Gobbetti
84e644fa1a
Add preference for save raw pebble health data.
2016-08-31 14:05:02 +02:00
cpfeiffer
cd535a0a45
Include known devices from the database in CC
...
(as long as device-support is still available)
Fixes non-paired devices not being displayed
2016-08-31 00:33:54 +02:00
cpfeiffer
6340bcff15
Small cleanup
2016-08-31 00:03:20 +02:00
Andreas Shimokawa
93b165ee96
onboarding: use the text area not the button itself for displaying the info text ;)
2016-08-29 00:32:36 +02:00
cpfeiffer
bcb07ccacd
Enable LoggingTest with robolectric
2016-08-29 00:26:29 +02:00
Andreas Shimokawa
07ee860b1c
add information to onboarding activity, make strings translatable
2016-08-29 00:17:40 +02:00
Andreas Shimokawa
c55369747d
launch onboarding (database migration) activity from service when:
...
- device got initialized
- is not yet in the new device db
- an old database exists
2016-08-28 23:49:05 +02:00
cpfeiffer
eb7771c1a9
Support for overlapping ActivityDescriptions + testcases
2016-08-28 00:22:34 +02:00
cpfeiffer
39c7762416
Update the device in case it has changed
2016-08-27 23:25:37 +02:00
cpfeiffer
1a22259b4e
Good practice: use the DAO to insert/update instead of the session
...
(saves a few cycles to look up the correct DAO from the session)
2016-08-27 23:12:48 +02:00
cpfeiffer
840a125c81
Fix compilation
2016-08-27 22:55:00 +02:00
cpfeiffer
8d6e6c8675
Upon request, delete not only the old, but also the new database
2016-08-27 22:51:00 +02:00
cpfeiffer
ae2df2580c
Remove/document deprecated stuff
2016-08-27 22:45:27 +02:00
cpfeiffer
e139840fee
More appropriate user handling: update the user instead of creating new
2016-08-27 22:34:30 +02:00
cpfeiffer
bfaaed7e5c
Detcach samples from the session after querying, to save memory
2016-08-27 21:40:46 +02:00
cpfeiffer
083d752011
Even more documentation/specification
2016-08-27 20:14:42 +02:00
cpfeiffer
ec9e999be1
Lots of documentation
2016-08-27 16:44:47 +02:00
cpfeiffer
ec0db033b1
Avoid potential NPE when subclasses return null for rawKindSampleProperty
2016-08-27 15:36:42 +02:00
cpfeiffer
350e72d534
Initial support for user-configured activity descriptions
...
- for a given user and time span, there may be an ActivityDescription
- with a textual description
- and a list of tags
- every tag has
- a name
- and an optional description
2016-08-27 00:25:45 +02:00
Andreas Shimokawa
5ab40918c0
rename database from test-db5 to Gadgetbridge
2016-08-26 23:48:54 +02:00
Andreas Shimokawa
34aead6c63
remove obsolte stuff
2016-08-26 23:37:17 +02:00
cpfeiffer
69f73467ea
Store not only device type, but also the model in the db
2016-08-26 21:16:01 +02:00
cpfeiffer
c59553c9c9
Rename GBDevice#hardwareVersion to model
...
(e.g. while DeviceType is "PEBBLE" in general, the model
might specify a Pebble Time or Time Steel.
2016-08-26 20:57:59 +02:00
Andreas Shimokawa
4363f110fb
finish onboarding activity after import
2016-08-25 01:27:09 +02:00
Andreas Shimokawa
063d00cc51
only launch onboarding after device is initialized and write device to database if not in yet.
2016-08-25 01:08:43 +02:00
cpfeiffer
49b8b9ebca
More robolectric stuff
...
- guard against multiple GBApplication.onCreate() invocations
- test DBHelper.getDevice() for a start
2016-08-25 00:00:53 +02:00
cpfeiffer
38c4be4379
Remove isEqual() in favor of Objects.equals()
2016-08-24 23:14:25 +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
02ac70e2a7
Only dismiss the dialog is the activity is still alive
2016-08-24 22:56:42 +02:00
Andreas Shimokawa
ec4469a87b
Testing with dummy onboarding activity
...
crashes
2016-08-24 20:15:26 +02:00
Daniele Gobbetti
2a2ad20aa3
Store raw data in the DB for later interpretation.
2016-08-21 20:24:02 +02:00
Daniele Gobbetti
b617ba7264
Fix the logic regarding the last sample of a run. Remove the unneded try-catch block and reuse the current DB session instead.
2016-08-21 17:38:07 +02:00
Andreas Shimokawa
0ae9955a6f
Display Toast when trying to import old Misfit data (unsupported)
...
... and update TODO
2016-08-20 21:38:39 +02:00
Daniele Gobbetti
6119f3501a
Import the old samples and map the ranges to overlays for pebble.
2016-08-19 21:09:32 +02:00
Andreas Shimokawa
3fb558c536
db refactoring: add raw data column in health overlay table and make rawType part of the composite key
2016-08-18 22:06:26 +02:00
Daniele Gobbetti
0126b90f20
Store the timestamps as sent by the pebble. Use a strict inequality operator at the end of the period to exclude the last sample.
2016-08-18 21:44:06 +02:00
cpfeiffer
7a16834482
*return* the created device!
2016-08-18 21:29:26 +02:00
cpfeiffer
deeaa87df7
Batch the import of old activity samples to save memory during import
2016-08-18 20:51:15 +02:00
Andreas Shimokawa
ce8af615d1
Merge branch 'composite-key-dao'
2016-08-18 20:35:56 +02:00
cpfeiffer
6e98defe94
Only import old activity data once per device, not for every provider
2016-08-18 20:29:20 +02:00
cpfeiffer
fbf06c1fe3
Separate coordinator and support instances for Mi1 and Mi2 #323
...
+ Some more testing stuff for Mi2
2016-08-17 00:53:16 +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
9b7e8e06d6
Improved time conversion (0x2A0F)
...
- support for org.bluetooth.characteristic.local_time_information
- support for day of week in 0x2A2B
Unfortunately Mi Band 2 does not support 0x2A0F ;(
2016-08-15 00:40:35 +02:00
cpfeiffer
6843b5aa8f
Add icon for Mi Band 2
2016-08-15 00:39:31 +02:00
cpfeiffer
8766fc5269
Handle MiBand2 device type
2016-08-14 23:25:35 +02:00
cpfeiffer
a38bea892a
Some logging of found devices/uuids
2016-08-14 23:21:09 +02:00
Andreas Shimokawa
4ddbbfdfb0
change db name to test-db5
2016-08-14 22:36:50 +02:00
Andreas Shimokawa
69933c5e92
db refactoring: depend on latest -fyg patched greendao, change column order again (primary keys first), remove index from pebble health overlay also
2016-08-14 22:33:41 +02:00
Andreas Shimokawa
eb962c65f0
work towards composite keys
...
(builds but does not run because greendao generates wrong table creation code - we need to fix that)
2016-08-13 01:24:43 +02:00
cpfeiffer
7c060506cf
Invalidate UserAttributes and DeviceAttributes when new ones are created
2016-08-13 00:52:35 +02:00
cpfeiffer
b3984a409c
Fix checking for up-to-date User and Device attributes
2016-08-13 00:27:38 +02:00
Andreas Shimokawa
68b303246d
db refactoring: change column order for health overlay table also
2016-08-10 23:26:25 +02:00
Andreas Shimokawa
359ed46b06
db refactoring: remove raw activity kind field from pebble health minute data, add a blob column for raw undecoded health minute data.
...
also:
- change column order for all pebble related minute data tables (mandatory stuff first, then custom columns, for easier addition of new columns)
- remove unused code
TODO:
- fix column order in Mi Band table also
2016-08-10 23:06:07 +02:00
Daniele Gobbetti
23c289ce1a
Use the real raw values as received by the device.
...
Some types were also added, even though they are educated guesses.
2016-08-09 20:22:05 +02:00
Daniele Gobbetti
22d0387f76
Fix the comparison order again ,as it was correct originally.
...
Partial revert of 5cfddbb7e9
2016-08-09 20:05:42 +02:00
Daniele Gobbetti
4a7a34f461
Use only the overlay table for storing overlay data.
...
This removes the need to wait to have minute samples to store the overlay data, hence store has been made void instead of boolean.
2016-08-09 18:05:24 +02:00
Daniele Gobbetti
5cfddbb7e9
Use the right properties to build the query and fix the comparison operators.
...
Performance: iterate first on the smaller dataset.
2016-08-09 17:52:07 +02:00
Andreas Shimokawa
fe5ec74ca1
Pebble Health: read overlay data in sample provider and patch in raw kind
...
completely untested
2016-08-09 11:56:05 +02:00
Andreas Shimokawa
5072d6b959
Pebble: try to write to health activity overlay table
2016-08-08 19:16:53 +02:00
Andreas Shimokawa
af58b4600d
whoops
2016-08-07 12:15:40 +02:00
Andreas Shimokawa
c4f83d68cd
refactoring: add generic support for manually filtering samples by acticty kind in AbstractSampleProvider
...
This allows a lot of simplifications for Morpheuz and Misfit
2016-08-07 11:45:09 +02:00
Andreas Shimokawa
6b2565e4c9
DB refactoring: remove activity type from Morpheuz database, determinate it in PebbleMorpheuzSampleProvider instead
2016-08-07 01:47:15 +02:00
Andreas Shimokawa
e05d40dc7e
Pebble: Support for latest version of Morpheuz (4.6)
...
Also a few simplifications and minor fixes.
Morpheuz 3.7 should still work (last version for FW 2.x)
2016-08-06 01:19:38 +02:00
cpfeiffer
a7b9ae5596
whitelist fw 4.15.12.10 #369
2016-08-04 00:05:58 +02:00
Andreas Shimokawa
9520e23439
fix negative steps in Charts with Morpheuz
2016-08-02 00:31:29 +02:00
cpfeiffer
43d7566c0b
some more microsteps #206
2016-08-01 22:18:57 +02:00
Andreas Shimokawa
4fe498efc2
Pebble: delay 100ms after writing a pebble packet to the output steam
...
This fixes a problem on newer firmwares, probably from 3.0 on, where sending an
appmessage packet right after acknowledging a previous incoming appmessage
packet results in our outgoing appmessage packet to be NACKed by the pebble
firmware and not even reaching the app running on the pebble.
2016-07-31 23:49:19 +02:00
Andreas Shimokawa
8ba1ae3f3e
create extra table for Morpheuz, remove more unused stuff
...
Pebble activity tracker now do not share a common base anymore.
TODO: consider creating a custom way of querying activity types like in Misfit. The activity kind stored in the database now is solely based on the intensity, so it is redundant.
(#206 )
2016-07-31 00:06:26 +02:00
Andreas Shimokawa
eabe625c47
rename some classes, remove obsolete ones
2016-07-30 23:22:27 +02:00
cpfeiffer
b43b7948b0
Let GallCallback return boolean values in order to mark an event as "consumed"
...
(to avoid dispatching the event to further listeners (ble profiles)
2016-07-28 23:04:37 +02:00
cpfeiffer
c9a9566dad
Minor fixlet
2016-07-28 22:42:16 +02:00
cpfeiffer
493444a2a0
Remove unused stuff
2016-07-28 22:28:29 +02:00
cpfeiffer
b22111df9d
Fix field ordering of ActivitySample (c'tor!) and improve importer #206
2016-07-28 22:12:20 +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
dd5c80c2e7
forgot to add file
2016-07-25 22:28:40 +02:00
Andreas Shimokawa
726f767576
work towards a Pebble Misfit raw sample table
2016-07-25 22:19:39 +02:00
cpfeiffer
f5ba09ebe0
Some babysteps towards miband2 support #323
...
Start to implement standard BLE profiles/services.
2016-07-25 00:00:22 +02:00
cpfeiffer
df59ce7b96
Switch light sleep and deep sleep #250
...
Apparently REM is considered deep sleep and NREM is considered light
sleep even though NREM (non-rapid-eye-movement) phase 3 is actually
defined as deep sleep.
2016-07-19 20:43:28 +02:00
cpfeiffer
1997a9b7fa
some more service discovery logging
2016-07-18 23:55:44 +02:00
cpfeiffer
7b26986ab0
Fix for #349
...
We must not use UUID_CHAR_PAIR anymore. This prevents connecting
without being bonded. Connecting when bonded still works.
As without bonding, ControlCenter would not display the device anymore,
we have to re-install the "remember last connected device" in the
preferences thing.
2016-07-15 00:13:49 +02:00
cpfeiffer
ebda3e1535
uncomment some constants
2016-07-14 20:37:20 +02:00
cpfeiffer
367091587f
No more 0x8 in the logs
...
It's the confirmation that setting the latency succeeded.
2016-07-14 20:15:54 +02:00
cpfeiffer
aa00d2f93a
Avoid NPEs when device-name is null
2016-07-12 00:24:23 +02:00
cpfeiffer
76895aa2b1
Register to device name and alias changes and update accordingly
2016-07-11 00:28:15 +02:00
cpfeiffer
80930ce42a
More logging for pairing, destroy pairing activity when bonding failed #349
2016-07-10 00:11:28 +02:00
Andreas Shimokawa
340a0f4a66
Fix coordinators not recognitzing devices by name
...
Do not ask a device candidate for its name , ask the underlying BluetoothDevice
The candidate uses the device alias - not good for matching
2016-07-09 23:10:21 +02:00
cpfeiffer
f54163faeb
centralize quit() functionality in GBApplication
2016-07-08 22:35:52 +02:00
cpfeiffer
9215233344
Whitelist 4.16.3.7 Mi1S firmware
2016-07-08 22:17:19 +02:00
cpfeiffer
8154a887cb
When there are cached services, skip service discovery
2016-07-08 22:15:36 +02:00
Andreas Shimokawa
4de45787c3
Properly acquire network location if last location is not known
...
A toast will be shown if the network location provider is disabled.
Location will be automatically acquired after enabling it.
Fixes #346
2016-07-05 23:56:14 +02:00
cpfeiffer
20d8732d10
In GBDevice.toString(), return the correct state instead of the simplified one
2016-07-05 23:36:21 +02:00
cpfeiffer
154b7d28bb
Let discovery activity also display device aliases
2016-07-05 23:36:21 +02:00
Andreas Shimokawa
903890067d
Settings: properly check the input type flag
...
Fixes a bug where latitude/longitude could be made empty
2016-07-05 23:14:48 +02:00
cpfeiffer
94cc1a883a
Use GBActivity in Pairing Activity for theming
2016-07-05 22:13:11 +02:00
cpfeiffer
3bb1a228ec
Fix crash during device discovery
2016-07-05 21:48:33 +02:00
Andreas Shimokawa
43f95aee9c
fix NPE
2016-07-05 21:47:51 +02:00
cpfeiffer
9ae69eac55
Avoid NPEs when BluetoothDevice.getName() returns null
2016-07-05 21:03:30 +02:00
cpfeiffer
9881b6c281
Do not display paired devices in the discovery activity
2016-07-05 20:46:47 +02:00
cpfeiffer
abeb642972
Don't remember paired Mi device in preferences
...
(this was just a very old workaround for an even older Mi firmware
that couldn't pair)
2016-07-05 20:27:23 +02:00
cpfeiffer
8549031c6f
Only attempt to reconnect when we were previously initialized
2016-07-04 23:38:25 +02:00
cpfeiffer
91d1cea51f
Avoid potential NPEs
2016-07-04 22:40:24 +02:00
Andreas Shimokawa
73b2fc357e
Pebble: Add some Pebble Time 2 support - NOT WORKING
...
Not working because these are expected to use BLE.
The Emulator should work though.
2016-07-04 22:09:56 +02:00
Andreas Shimokawa
a2c2e48719
fix NPE in settings when last known position is null
...
This is not a proper fix, we would have to request a location first.
I just had a last known position when testing before. :/
Issue #346
2016-07-03 21:29:02 +02:00
cpfeiffer
8b24e098ea
Set sampleProvider to avoid NPEs
2016-07-01 00:22:54 +02:00
cpfeiffer
f65afa64d9
log raw activity data from mi band, closes #341
...
Hopefully aids in deciphering activity kinds.
2016-06-28 23:23:29 +02:00
cpfeiffer
f0da25c49b
Fix activity fetching getting stuck when double tapping #333
2016-06-28 23:07:24 +02:00
cpfeiffer
7613b62dab
Improved discovery mechanism #323
...
Does not rely solely on mac addresses anymore. Should help when
mac address randomization is used.
2016-06-28 00:35:50 +02:00
cpfeiffer
76a44ad3a4
more logging to detect problems with external dirs: #343
2016-06-27 22:01:52 +02:00
cpfeiffer
56615de1f0
log FileNotFoundException when checking if directory is writable or not: #343
2016-06-27 21:29:39 +02:00
cpfeiffer
e70a2290c3
sampleproviders now return device specific data #206
2016-06-27 20:43:48 +02:00
Daniele Gobbetti
1430619c30
Implement watchapp configuration presets.
...
This is a quick & dirty solution that may be improved by storing multiple presets in the DB in the future.
2016-06-26 11:55:08 +02:00
cpfeiffer
2fa166e381
Fix potential NPE, setup environment earlier
2016-06-25 18:58:54 +02:00
Andreas Shimokawa
b5cf2b20be
Pebble: In App Manager, enable adding of "Send Text" system app on non-aplite platforms
...
The App is not functional with Gadgetbridge, but since it is visible on the watch when canned messages for call dismissal is enabled, we support sorting it.
2016-06-25 18:08:53 +02:00
Daniele Gobbetti
20e2846d00
Enable localization of appmanager tab strip
2016-06-25 11:27:56 +02:00
Daniele Gobbetti
0f0a7ea925
Add send sms system app (commented because it only appears on Time series Pebbles after setting up SMS call decline)
2016-06-25 11:19:01 +02:00
Andreas Shimokawa
181df7311a
add missing file
2016-06-24 14:57:01 +02:00
Andreas Shimokawa
659165fa4c
Pebble: fix new app manager on 2.x
...
- properly intert apps reported from pebble into the corresponding tab
- disable tracking of installed apps
- disable drag and drop for apps and watchfaces
- ...
2016-06-24 13:39:29 +02:00
Andreas Shimokawa
1de6ee019f
Pebble: fix regression. FW 2.x was completely broken
...
No one noticed, so it seems we can kill 2.x support soon :D
2016-06-24 12:07:44 +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
Andreas Shimokawa
67e5bc0434
Pebble: implement decline call with SMS
...
Based on a proposal by @danielegobbetti, thanks!
This still does not enable the feature since the necessary blobdb is not filled yet
2016-06-21 00:31:53 +02:00
Andreas Shimokawa
72dff2abd2
provide haptic feedback on long press in AppManager
2016-06-20 17:50:19 +02:00
Andreas Shimokawa
1a9c40e790
fix crash when rotating screen in AppManager
2016-06-20 17:42:32 +02:00
cpfeiffer
45fa930ac3
Properly check support for heartrate measurements
2016-06-19 23:22:28 +02:00
cpfeiffer
8772631087
Merge branch 'db-refactoring'
2016-06-19 22:53:09 +02:00
Andreas Shimokawa
4347f134d6
Pebble: add Music, Alarms, Notifications and Watchapps to System Apps
...
They can be ordered too!
2016-06-19 21:48:07 +02:00
cpfeiffer
9772d8af06
Merge remote-tracking branch 'origin/master' into db-refactoring
2016-06-19 21:14:03 +02:00
Andreas Shimokawa
7597ce337d
Pebble: do not move to last position if reinstalling an app, the order seems to be preserved on the pebble
2016-06-19 21:13:47 +02:00
Andreas Shimokawa
24e840e03b
Pebble: remove "move to top" feature completely
2016-06-19 21:06:38 +02:00
Andreas Shimokawa
4b5969ef96
Merge branch 'master' into appmanager-fragments
2016-06-19 12:33:05 +02:00
Andreas Shimokawa
f42899d910
Pebble: on FW 2.x do not send extended music info and do not send playstate
...
I don't think they are supported and I cannot test.
2016-06-19 12:17:19 +02:00
Andreas Shimokawa
64182941d0
Pebble: always hide move to top feature in AppManager, it was not working as expected
...
A proper solution is in appmanager-fragments branch
2016-06-19 11:48:29 +02:00
cpfeiffer
7aa900ce82
Workaround crash in debug activity
...
(when progress dialog is visible and changing orientation)
2016-06-19 00:53:53 +02:00
cpfeiffer
0596c80381
Some migration fixes
...
especially: add unique index on samples using timestamp and device id
(since composite primary keys are not fully supported yet)
2016-06-19 00:40:51 +02:00
cpfeiffer
04c8a17d6e
Merge remote-tracking branch 'origin/master' into db-refactoring
2016-06-19 00:12:02 +02:00
cpfeiffer
5607b1c892
Working merging of activity data, with (indeterminate) progress dialog
2016-06-19 00:10:47 +02:00
cpfeiffer
dc932355b5
Some javadoc re DeviceManager
2016-06-18 23:40:37 +02:00
cpfeiffer
233a6155cc
Add class DeviceManager that provides access to the list of managed devices
...
Basically moved code out of ControlCenter to a separate class. Also provides
change events when the device list has changed, or changes to the device
state have occurred.
2016-06-18 23:35:34 +02:00
Daniele Gobbetti
ad3f7e53b3
Try hard to hide the browser activity from the stack.
2016-06-18 21:08:51 +02:00
Daniele Gobbetti
7263307409
Merge remote-tracking branch 'origin/master' into appmanager-fragments
2016-06-18 19:00:23 +02:00
Daniele Gobbetti
966c3d4811
Various improvements to the configuration page:
...
- localstorage is now cleared at every launch: this prevents some clay configuration pages to send back to the watch a number of keys that were set by other configuration pages
- only execute JS on document ready: this prevents some race conditions
- added dummy getTimelineToken function to Pebble JS object
- corrected (hopefully!) a few logic errors in the JS code (this referenced where it wasn't)
- refactored the steps visualization in JS
- lifecycle changes to the java activity: now the configuration page gets closed as soon as the settings have been sent, and there is only one instance of it
2016-06-18 18:40:57 +02:00
Daniele Gobbetti
fffeb87607
Use constant instead of hardcoded string
2016-06-18 18:33:35 +02:00
cpfeiffer
2890fd6737
Merge remote-tracking branch 'origin/master' into db-refactoring
2016-06-18 01:27:19 +02:00
cpfeiffer
41e6833b2d
Getting closer... db migration almost works.
2016-06-18 01:26:36 +02:00
Andreas Shimokawa
e8f2a0bc9f
Merge branch 'master' into appmanager-fragments
2016-06-17 22:47:17 +02:00
Andreas Shimokawa
79b439da28
Implement App Sorting
...
- grab icon to move apps
- cache can be sorted but nothing will be send to watch
- if sorting apps or watchfaces, order will be sent to watch
- we try to keep track of what is installed and what not
Firmware 2.x is currently not working properly
2016-06-17 22:43:06 +02:00
Daniele Gobbetti
d5586478f3
Support legacy configuration pages #251
...
There are pages that do not honor return_to get parameter. This commit allows the user to enter the returned url manually.
2016-06-17 17:47:13 +02:00
cpfeiffer
13959677af
More WIP for intrgrating old activity db into new one
...
(one demand to keep user in control)
2016-06-17 00:07:50 +02:00
cpfeiffer
d544509b60
Merge remote-tracking branch 'origin/master' into db-refactoring
2016-06-16 21:55:16 +02:00
cpfeiffer
687beee501
Migration work
2016-06-16 21:54:53 +02:00
Andreas Shimokawa
65ac4b364f
Merge branch 'master' into appmanager-fragments
2016-06-16 01:09:35 +02:00
Andreas Shimokawa
9f61458790
Pebble: Allow installation of aplite apps on diorite
2016-06-16 00:59:15 +02:00
Andreas Shimokawa
b79b94809a
initial support for FW 4.0-dp1
2016-06-16 00:24:27 +02:00
Andreas Shimokawa
1c6c78507c
Merge branch 'master' into appmanager-fragments
2016-06-15 22:53:41 +02:00
Andreas Shimokawa
d225743d64
Pebble: some preparations for Pebble 2
2016-06-15 22:53:05 +02:00
Andreas Shimokawa
7937fd6ea7
Merge branch 'master' into appmanager-fragments
2016-06-15 22:36:06 +02:00
Andreas Shimokawa
7690ad3af6
make appmanager usable again
2016-06-15 22:29:30 +02:00
Daniele Gobbetti
4120d686b8
Some key events were not working with the default audio player. Reported in #322
2016-06-15 22:15:21 +02:00
Andreas Shimokawa
b5693bcb45
play around with drag and drop list
2016-06-15 19:56:34 +02:00
cpfeiffer
71d99384c1
Cleanup, remove duplicated code, fix some TODOs
2016-06-14 23:10:35 +02:00
Andreas Shimokawa
4895704f99
add missing file
2016-06-14 22:55:38 +02:00
cpfeiffer
a01507a924
Merge remote-tracking branch 'origin/master' into db-refactoring
2016-06-14 20:14:04 +02:00
cpfeiffer
61957d6cb0
WIP: more db work
2016-06-14 20:13:08 +02:00
Andreas Shimokawa
3418543c31
play around with fragments
2016-06-14 20:04:54 +02:00
Andreas Shimokawa
1d6a697000
playing around with fragments
2016-06-14 15:56:38 +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
6de002c88b
also try to get track number and number of tracks from notifications
2016-06-10 22:20:55 +02:00
Andreas Shimokawa
66b5a21cf2
also gather music info from notifications when screen is off
2016-06-10 00:03:48 +02:00
Andreas Shimokawa
b0fe4b1519
also gather music info from notifications when screen is off
2016-06-09 23:39:00 +02:00
Andreas Shimokawa
9623449b6e
Merge branch 'master' into feature-weather
2016-06-09 23:15:23 +02:00
Andreas Shimokawa
b76619bb5b
Pebble: implement app reordering in PebbleProtocol
...
Not yet used.
2016-06-09 23:14:40 +02:00
Andreas Shimokawa
fd31bfe56b
Merge pull request #325 from stepardo/steffen/pocketcasts_notifications
...
Set extended music info by dissecting notifications on Android 5.0+
2016-06-09 23:12:17 +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
91f374edec
Revert ""duration" parameter in onSetMusicInfo uses microseconds"
...
The decision on granularity of APIs is up to the maintainers.
This reverts commit 204748c518
.
2016-06-09 20:02:55 +02:00
Andreas Shimokawa
088dfda5f4
Pebble: implement app reordering in PebbleProtocol
...
Not yet used.
2016-06-09 19:55:36 +02:00
Steffen Liebergeld
204748c518
"duration" parameter in onSetMusicInfo uses microseconds
...
This is in line with Android, and saves some calculations (and thereby a
tiny little bit of battery life).
2016-06-08 20:43:46 +02:00
Steffen Liebergeld
fb71cdf55b
Add handling for media session notifications
...
Since Android 5.0, media players can have interactive notifications that
reside in the notification area, and offer up to 5 control buttons
(play/pause, next, previous, etc), and information about the currentlu
playing media file.
We use these notifications to get information about the currently
playing media file such as:
- artist
- track (title)
- album
- duration (length of the media file)
- play state (playing, paused, stopped)
- position
- play rate (how fast is the media file being played)
We then send this information up to the device.
On Pebble, the music app will display the title and the artist, as
well as a progress bar showing the current position. The progress bar is
animated when the media file is being played, and if it is being paused,
it displays a pause symbol.
This code will be skipped when GadgetBridge is run on a device with
Android version older than 5.0 (lollipop).
2016-06-08 20:41:43 +02:00
Steffen Liebergeld
73fbaf0a54
Restore previous working of the debug activity
...
The previous commits broke the debug activity's setting of the music
info. This commit restores this functionality.
2016-06-08 20:32:34 +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
Steffen Liebergeld
0470731e4b
PebbleProtocol: Do not call encodeSetMusicState in encodeSetMusicInfo
...
encodeSetMusicState will be accessible on its own. If it was used to set
the music state, a call to encodeSetMusicInfo must not reset this info
arbitrarily.
2016-06-08 20:16:33 +02:00
Andreas Shimokawa
98a0774fc2
Merge branch 'master' into feature-weather
2016-06-07 22:53:40 +02:00
Andreas Shimokawa
32429df7bc
Pebble: allow to enable or disable sync for each activity tracker in settings
...
This is useful if you have multiple phones and do not want to have your data synced to one of them
2016-06-07 22:51:14 +02:00
Steffen Liebergeld
389a143bdb
Set music info for PocketCasts
...
PocketCasts tells about its current media state via notifications. This
patch tries to parse incoming notifications from PocketCasts and if
successful tells the device about it. Currently supported are track and
artist.
2016-06-07 19:34:37 +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
cpfeiffer
2b6ee41970
Add logging of heartrate values #318
2016-06-05 22:37:42 +02:00
cpfeiffer
ca26e27c60
Basic support for Mi Band 2 #323 , untested
2016-06-05 22:31:07 +02:00
Carsten Pfeiffer
1ed0dc59b2
Merge pull request #321 from pragmaware/mi-band-device-time-offset
...
Add support for shifting the device time by N hours
2016-06-05 22:29:44 +02:00
Andreas Shimokawa
0fb664c141
allow to switch languages at runtime
2016-06-05 14:33:09 +02:00
Andreas Shimokawa
9d3f3c57cd
Pebble: make disabling of appmessage handlers more generic
...
Also disable morpheuz handler if morpheuz is not the chosen activity tracker
.... and bump reported version to 3.12 to match the latest pebble release
2016-06-04 21:50:26 +02:00
Andreas Shimokawa
321707af8f
Pebble: ignore incoming misfit data if misfit is not set as the preferred activty tracker
2016-06-04 21:33:38 +02:00
Daniele Gobbetti
968d15c8d8
Keep the pebble health data on the pebble watch if the activity provider is not pebble Health.
...
This will nack all pebble health datalog messages. As mentioned in #322 , this would allow to use multiple android device without secondary devices "sipping" the health data from the watch.
2016-06-04 18:21:49 +02:00
Szymon Tomasz Stefanek
60fc29cc4d
Add support for shifting the device time by N hours to allow for sleep data gathering of shift workers
2016-06-03 04:43:12 +02:00
cpfeiffer
2e6536555b
Fix previous commit (compile!)
2016-05-31 22:56:22 +02:00
cpfeiffer
9a106667d2
Setting the wear location appears to fail for amazfit #274
...
So as a test, disable that for amazfit. Let's see what happens
next.
2016-05-31 22:33:38 +02:00
Andreas Shimokawa
19d7c03545
Pebble: get rid of log spamming when changing applications (unhandled message)
2016-05-31 14:18:45 +02:00
Andreas Shimokawa
a15d07858e
Sunset/Sunrise: always use UTC timezone for calendar operations
2016-05-31 13:03:15 +02:00
Daniele Gobbetti
42acb8915a
Pass the integer keys to pebble, even if they are not within the known app keys. Requested in #251
2016-05-31 12:24:28 +02:00
Andreas Shimokawa
0231e83ea3
try to fix duplicate/missing surise/sunset pins
2016-05-31 00:07:24 +02:00
Andreas Shimokawa
b71597800a
Pebble: set device to reconnecting state when actively reconnecting
...
It makes it easier to watch connection attempts and the delay between them in control center.
2016-05-29 23:24:16 +02:00
Andreas Shimokawa
33da6c2925
Pebble: make sure that "waiting for reconnect" state is set when initial connect fails
2016-05-29 22:58:25 +02:00
Andreas Shimokawa
4533c80c95
make sure to only reconnect when device is in "waiting for reconnect state"
2016-05-29 21:44:43 +02:00
Andreas Shimokawa
2e8d96e995
add option to enable sunrise/sunset on the timeline
...
Also fix a small type Aquire -> Acquire
2016-05-29 21:29:27 +02:00
Andreas Shimokawa
8970bbe044
display device address in info menu (IP:PORT / MAC)
2016-05-28 11:32:36 +02:00
cpfeiffer
2d49ce505a
Set state to "Waiting for reconnect" for BTLE devices
2016-05-26 23:48:05 +02:00
cpfeiffer
50b7a02ef2
One more attempt at fixing dynamic logging reconfiguration
...
- moved out of GBApplication to class Logging
- the main thing is: when start()ing the FileAppender again, it *must*
- be configured to be non-lazy, otherwise it won't open the stream ever again.
2016-05-26 23:46:21 +02:00
cpfeiffer
6e33c7364a
Remove some commented code
2016-05-26 22:21:58 +02:00
cpfeiffer
c360eb3392
This should fix some connection problems #274
...
Some APIs have become synchronous, it seems, e.g.
connectGatt() -> onConnectionStateChanged() -> discoverServices() -> onServicesDiscovered()
appears to happen synchronously. So connectGatt() will not return before services are discovered!
So now we deal with this situation.
2016-05-26 19:03:38 +02:00
Andreas Shimokawa
b0e0aec465
fix typo
2016-05-26 15:20:27 +02:00
Andreas Shimokawa
88f338b0b9
Reenable our discovery activity for Android 6
...
Now that we request location we are allowed to do a btle scan again
2016-05-26 14:58:36 +02:00
Andreas Shimokawa
7ef005f6a3
Allow getting the network location within pebble settings for sunrise/sunset calculation
...
It is also possible to set the location manually
On Android >=6 the required permission will be requested when pressing the button in settings.
2016-05-26 14:39:54 +02:00
Andreas Shimokawa
fa6100fcec
Merge branch 'master' into feature-sunrise
2016-05-26 13:11:03 +02:00
andre
bf66c25c7f
MusicPlayBackReceiver set track, artist and album to the artist member of MusicSpec.
...
Now the assignment of artist, track and album is correct
2016-05-24 19:33:12 +02:00
Andreas Shimokawa
55a40f7b06
Sunset/sunrise: rotate ids and reuse the id from two days ago for tomorrow, this way we will have sunrise/sunset for 3 days while sending only sunrise/sunset per day
2016-05-24 14:46:22 +02:00
Andreas Shimokawa
e3bee37b81
Change UUID prefix to 0x4767744272646700
2016-05-24 13:20:16 +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
c9c9b420dc
Pebble: Send sunrise and sunset events to the pebble every day using AlarmManager
2016-05-24 11:19:57 +02:00
Andreas Shimokawa
ec154c9041
Merge branch 'master' into feature-weather
2016-05-24 11:09:21 +02:00
Andreas Shimokawa
af3cfefec0
Merge branch 'master' into feature-sunrise
2016-05-23 23:52:39 +02:00
Andreas Shimokawa
30c37d3172
Pebble: only remove apps from app list when they got deleted from cache also
2016-05-23 23:46:54 +02:00
Andreas Shimokawa
884c4262cf
update changelog, bump version
...
(also change one German string and remove two newlines :P)
2016-05-23 23:37:57 +02:00
cpfeiffer
4504c5b5a4
Add Activity Description table and order samples
2016-05-23 23:31:22 +02:00
Andreas Shimokawa
24c51deaf9
Pebble: also delete other files from cache when deleting .pbw
2016-05-23 23:15:07 +02:00
Daniele Gobbetti
bef59ae9c0
Parse new version of Pebble health datalog message with tag "84".
...
This message was previously treated as a further "Sleep" message type, with firmware version 3.12 further types were added that are clearly unrelated to sleep (possibly to high-intensity activities like running etc.), hence the related code is now moved to a separate class.
The only decoded records are still sleep-related.
Fixes #312
2016-05-23 21:13:12 +02:00
Andreas Shimokawa
efe5e546fd
Merge branch 'master' into feature-sunrise
2016-05-22 23:36:09 +02:00
Andreas Shimokawa
80cf9fa8fe
Pebble: allow to delete apps from pbw cache
...
Also remove delete entries from all system apps' context menus (not only health)
2016-05-22 23:32:25 +02:00
Andreas Shimokawa
30883ab244
Pebble: In AppManager mark cached apps with (C), installed apps on FW 2.x with (D) and (CD) if both is the case
...
Also always add pebble health as a system app to the list on devices that have it (no need to enable untested features for that anymore)
2016-05-22 22:48:45 +02:00
Andreas Shimokawa
5a20d7ec81
Pebble: no longer clear list of cached apps as soon as the installed watchfaces is received from Firmware 2.x
...
This will result in duplicate entries (first the whole cache, then actually installed watchfaces)
It might already make watchface configuation working on 2.x even though it is dirty
I wish everybody would just update to 3.x *sigh*
2016-05-22 12:30:47 +02:00
Andreas Shimokawa
ca714417ac
Pebble: also copy pbw to cache on Firmware 2.x
...
Neccessary step towards watchface configuration on 2.x
2016-05-22 11:33:14 +02:00
Andreas Shimokawa
6370fdbebe
Merge branch 'master' into feature-sunrise
2016-05-22 01:25:52 +02:00
Andreas Shimokawa
0d7986a5ab
Pebble: rework incoming reconnection support
...
This is now completely generic and should work for other devices also
Fixes #296
2016-05-22 01:19:28 +02:00
cpfeiffer
d5cca84780
Small fixlets
2016-05-20 22:04:30 +02:00
cpfeiffer
0267ddb356
Merge branch 'master' into db-refactoring
2016-05-20 21:49:59 +02:00
cpfeiffer
400ae2bc3b
Fix lint warnings using @TargetApi
2016-05-20 21:49:25 +02:00
cpfeiffer
fa34cf9a17
Merge branch 'master' into db-refactoring
2016-05-20 21:42:30 +02:00
Normano64
31eabe9605
Fixed things based on feedback
2016-05-19 23:58:13 +02:00
Normano64
8a91628322
Detects if Do Not Disturb is in use.
...
Can handle sms and phone calls from priority senders when in Priority
only, but doesn't handle events and reminders.
2016-05-19 16:34:59 +02:00
cpfeiffer
4370be28b6
Remove some imports
2016-05-17 00:51:58 +02:00
cpfeiffer
75703b0dea
Import and Export db are back
2016-05-17 00:51:00 +02:00
cpfeiffer
2d2df64003
Port schema migration to greendao
2016-05-16 23:54:51 +02:00
Andreas Shimokawa
907ad8f27a
correction regarding deletion of old pins
2016-05-16 23:48:18 +02:00
cpfeiffer
4b374e3f7e
Implement changeStoredSamplesType()
2016-05-16 23:45:21 +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
cpfeiffer
876bdac918
More WIP: remove now unused code, better use of generics
2016-05-16 23:36:54 +02:00
cpfeiffer
40a376bbd0
Merge branch 'master' into db-refactoring
2016-05-16 23:01:16 +02:00
cpfeiffer
3e0bc16741
More WIP, but we're getting closer
...
current state:
- storing samples works (tested only mi band)
- charts work
2016-05-16 23:00:04 +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
Andreas Shimokawa
d66f842e9b
Mi Band: Make sure live activity gets stopped when using the back button
2016-05-15 22:24:37 +02:00
cpfeiffer
3a1f91b5a8
Default to low latency mode #287
...
Tested with Mi1A and Mi1S -- works fine and faster than without
low-latency mode.
2016-05-15 00:22:53 +02:00
cpfeiffer
5963843216
Experimental support for #274 (untested yet)
2016-05-15 00:15:31 +02:00
cpfeiffer
6e44ddaee6
WIP: db refactoring
2016-05-15 00:09:34 +02:00
cpfeiffer
8ca821ab8a
More WIP on db refactoring
2016-05-13 23:47:47 +02:00
cpfeiffer
d0c8483d92
More WIP
2016-05-08 23:49:15 +02:00
cpfeiffer
9532fc879f
"Ported" to AbstractSampleProvider
2016-05-08 23:17:05 +02:00
cpfeiffer
21cafa83d8
WIP: some more query work
2016-05-08 22:58:50 +02:00
cpfeiffer
40837996f8
Fix logback initialization, closes #300
2016-05-08 21:39:23 +02:00
cpfeiffer
1a353239c4
Fix log content
2016-05-08 21:38:55 +02:00
Andreas Shimokawa
9b7f2c1e91
try to fix weiredness with pebble reconnects
2016-05-08 17:19:01 +02:00
Andreas Shimokawa
5b21895283
try to get BT alias name by reflection. Useful if you have a lot of Mi Bands
2016-05-07 21:46:20 +02:00
cpfeiffer
cc5941f7eb
Merge branch 'master' into db-refactoring
2016-05-05 10:19:19 +02:00
cpfeiffer
808e12d680
A little more WIP
2016-05-05 10:19:01 +02:00
Andreas Shimokawa
65a95366f4
Mi Band: Allow setting low-latency FW update mode in Mi Band development settings
2016-05-04 13:24:32 +02:00
Andreas Shimokawa
045d5119ff
Do not update summary for checkbox preference
...
Was causing summary to get overwritten by "true" or "false" when changing preferences
2016-05-04 13:07:11 +02:00
Andreas Shimokawa
619a17425f
Mi Band: Display hint about starting Activity Activity instead of App Manager
...
TODO: Fix the string, I have no idea how to properly name the Activity Activity
2016-05-04 12:31:29 +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
b363d08efb
WIP: a little work towards greendao
...
need to think of how to integrate MiBandActivitySample and PebbleActivitySample
into the app. There's GBActivitySample, MiBandSampleProvider, PebbleSampleProvider,
etc.
2016-04-29 23:12:30 +02:00
cpfeiffer
64a6b9a936
Merge branch 'master' into db-refactoring
2016-04-29 22:28:53 +02:00
cpfeiffer
10d7274aa1
Fix testcases (all this should be scrapped and redone with e.g. robolectric)
2016-04-29 21:58:08 +02:00
cpfeiffer
5e02724c4c
Make automatic reconnect after connection loss configurable #293
...
Mi Band: automatically reconnect when the device is back in range
Also: #89
2016-04-28 23:17:13 +02:00
cpfeiffer
eca5d40efe
More javadoc
2016-04-26 00:02:35 +02:00
Andreas Shimokawa
e1551226f6
Reject empty strings in Preferences for numeric inputs
2016-04-25 23:51:58 +02:00
cpfeiffer
47984dba0a
javadoc
2016-04-25 23:45:27 +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
0c715a2669
Wrap access to SharedPreferences with "Prefs"
...
(to centralize quirk handling)
2016-04-25 23:18:55 +02:00
cpfeiffer
65bd1581bc
Fix receivers, display measured heart rate as a toast again, fixes #292
2016-04-24 18:17:04 +02:00
Andreas Shimokawa
3fefb57fdd
Fix colors in alarm activity for dark theme
2016-04-23 23:24:56 +02:00
cpfeiffer
0427294227
Dynamically enable/disable logging #288
2016-04-18 00:20:40 +02:00
cpfeiffer
a45eacf9b8
WIP: schema update, ... #206
2016-04-17 19:52:51 +02:00
cpfeiffer
97cac282c8
Merge branch 'master' into db-refactoring
2016-04-15 23:05:16 +02:00
cpfeiffer
98d7237ec3
Display a different notification icon, when disconnected
...
Better icons welcome :-)
2016-04-15 22:57:13 +02:00
cpfeiffer
e451e8155c
Remember the map so that we can look up the name later, as well, closes #275
2016-04-14 23:55:40 +02:00
cpfeiffer
a8279faa5b
Merge branch 'master' into db-refactoring
2016-04-14 23:28:00 +02:00
cpfeiffer
a460049a1b
Sort by label and blacklist status, hopefully fast enough #275
2016-04-14 23:23:06 +02:00
Andreas Shimokawa
a9e7cdcaa7
use some colors from the theme for charts activity
2016-04-14 17:41:04 +02:00
Andreas Shimokawa
a9b75a63b3
simply derive AbstractGBFragmentActivity from GBActivity instead of FragmentActivity
...
This fixes the Actionbar being invisible
2016-04-14 17:16:43 +02:00
Andreas Shimokawa
46086f0408
allow dark theme in charts activity.
...
The charts however are still the same
2016-04-14 17:04:49 +02:00
Andreas Shimokawa
faa6a9d906
use android:summary="%s" for ListPreferences
2016-04-14 16:44:44 +02:00
Andreas Shimokawa
f76a1ba16f
allow to switch to dark theme im settings
2016-04-14 16:15:58 +02:00
Andreas Shimokawa
367aced03d
also use theme in settings
2016-04-14 15:34:53 +02:00
Andreas Shimokawa
4bcebca744
Work towards dark theme, remove -v21 specific theme definition
2016-04-14 15:21:25 +02:00
cpfeiffer
b25a47c398
Immediately disable hr reading and activity tracking when leaving the tab #273
2016-04-13 23:36:14 +02:00
cpfeiffer
e87a357bed
Show separate curves when the time between two measurements is too long #273
2016-04-13 21:38:35 +02:00
cpfeiffer
ae5d9089d8
Slight improvement to hr charts #178
2016-04-13 21:21:10 +02:00
cpfeiffer
78bf516897
Disabling sleep measurement for continuous measurement is not necessary
...
Looks like they don't interfere, after all. #178
2016-04-12 23:25:12 +02:00
cpfeiffer
f15a97d994
Initial live heartrate measurement in the live activity tab #178
2016-04-12 23:12:50 +02:00
cpfeiffer
7ab31514dc
Rework charts to completely fix crash in charts activity #277
2016-04-11 23:18:12 +02:00
cpfeiffer
82b4394b40
Ignore generated entities
2016-04-10 21:51:47 +02:00
Lem Dulfo
39cba84ab1
Apply gray images on non-connected devices in the list.
2016-04-10 21:11:52 +02:00
Lem Dulfo
70ed14243f
Remove all getActionBar occurences, temporary fix for overlap
2016-04-10 21:11:52 +02:00
Lem Dulfo
83e6e6b85f
Add background image for empty ControlCenter
2016-04-10 21:11:41 +02:00
Lem Dulfo
80a21f2ec2
Move Discovery functionality to FAB
2016-04-10 21:11:41 +02:00
Lem Dulfo
5a3004cbce
AppCompat and FAB, more Material Design
2016-04-10 21:11:41 +02:00
Lem Dulfo
3ef942b5d3
Do not crash on null BT adapter, allows UI work on emulator.
2016-04-10 21:11:41 +02:00
cpfeiffer
802e9a8235
OK, revert to connectGatt(false), connect often does not work with true #249
2016-04-09 09:53:03 +02:00
cpfeiffer
42dda911e4
Fix crash in charts activity, closes #277
2016-04-08 23:02:50 +02:00
cpfeiffer
1e5dbb6a23
OK, just connect(true) is not sufficient #249
...
(we again get connection problems. Let's try this.)
2016-04-07 20:53:25 +02:00
Daniele Gobbetti
a49335fa67
Allow to change stored samples converting only certain old types
2016-04-07 17:52:15 +02:00
Andreas Shimokawa
b1a93c430d
interrupt thread instead of joining to fix ANR
2016-04-07 00:21:21 +02:00
Andreas Shimokawa
e91b5a07bd
Pebble: change delay between reconects to 1,2,4,8,16,32,64 (max) seconds
2016-04-06 22:55:04 +02:00
Andreas Shimokawa
94cec55a20
Merge pull request #276 from roidelapluie/reconnect
...
Pebble: Smarter reconnection attempts
2016-04-06 22:41:07 +02:00
danielegobbetti
d2af3468f0
Add support for new datalog message added in pebble firmware 3.11
...
This adds support for storing deep sleep data.
2016-04-06 21:48:16 +02:00
Julien Pivotto
e42a041448
Pebble: Smarter reconnection attempts
...
Sleep several seconds between reconnection attempts:
One second after first attempt, two after the second, and so on.
refs #89
2016-04-06 12:37:23 +02:00
Daniele Gobbetti
51def0d497
Add light intensity to the known steps datalog message.
...
Add support for record version 6 introduced with firmware 3.11.
There are more data in each record now, but we still do not know what they mean.
Close #270
2016-04-04 23:33:17 +02:00
Daniele Gobbetti
34600e085e
Fix wrong assignment, needed to properly deal with datalog messages longer than 255
2016-04-04 23:13:57 +02:00
cpfeiffer
403f74e59b
Enable heart rate charts #232
...
(And fix some charting issues)
2016-04-04 23:05:20 +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
3e3cf462a6
Attempt to re-enable automatic reconnect (autosensing) #249
...
(now that initializing device works again)
2016-04-03 23:32:15 +02:00
cpfeiffer
59c3970008
Reuse characteristic objects #234
2016-04-03 23:01:58 +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
cpfeiffer
7cda9f1923
Merge branch 'computerlyrik-heartrate-sleep-support'
2016-04-03 21:46:29 +02:00
cpfeiffer
804a85d31f
Small refactoring of BtLE actions
2016-04-03 21:46:24 +02:00
cpfeiffer
b54fe53cd5
Merge branch 'heartrate-sleep-support' of https://github.com/computerlyrik/Gadgetbridge into computerlyrik-heartrate-sleep-support
2016-04-03 21:02:45 +02:00
Andreas Shimokawa
4389c1cca3
Pebble: wait 4 seconds instead of 2 when notifications/calls trigger reconnection
2016-04-03 18:36:30 +02:00
Andreas Shimokawa
7ddfd35c35
Pebble: auto connect on incoming notification or phone call if connection was lost unxpectedly before
2016-04-03 18:30:20 +02:00
cpfeiffer
a4919789ca
Add some progress to firmware updating #271 #234
...
Also: remove the low latency mode for firmware update,
because my Mi1S simply disconnects then.
Still missing in the view: device disconnects
2016-04-03 00:50:45 +02:00
cpfeiffer
7a224243a3
Try to quit Gadgetbridge by stopping the service
2016-04-03 00:49:54 +02:00
cpfeiffer
2d10c11005
Log the length of the bytes written
2016-04-02 22:35:37 +02:00
cpfeiffer
0e49535966
Fix progress during fw update #234
2016-04-02 22:24:33 +02:00
Christian Fischer
f2de21a664
test if heartrate is supported before writing preferences
2016-04-02 16:11:51 +02:00
Christian Fischer
20aa7d9ad9
add preference to set hartrate sleep detection
2016-04-02 16:09:30 +02:00
Christian Fischer
72258c178c
fix in string represantation conversion
2016-04-02 16:08:36 +02:00
cpfeiffer
ea5c6a0848
Log ignored notifications when updateCoordinator is null
2016-03-31 21:57:36 +02:00
cpfeiffer
6f97b8c1e5
Log the date that we receive from the Mi Band
2016-03-31 21:54:09 +02:00
cpfeiffer
66c1b3f178
Relax check for Mi1S device detection #234
2016-03-31 21:39:51 +02:00
cpfeiffer
4631df67ac
Some more logging + add svg launcher again (somehow it was not added again)
2016-03-30 22:53:08 +02:00
cpfeiffer
ffc006c21c
Fix ordering problem with firmwareInfoSent state variable #234
2016-03-30 21:56:00 +02:00
cpfeiffer
cc7f5406ef
Use low latency transfer mode for fw update #234
2016-03-30 21:48:42 +02:00
cpfeiffer
e931cf47d7
Need to pass '0' as parameter to mi band fw metadata info #234
2016-03-29 22:15:14 +02:00
Andreas Shimokawa
b3590fed35
For simplicity hide some internal states from the user
...
Display connecting->connected instead of connecting->connected->initializing->initialized
2016-03-28 23:56:20 +02:00
Andreas Shimokawa
cbc57b4407
Pebble: Fix stupid bug that made Pebble Health unavailable in App Manager ( Fixes #269 )
2016-03-28 23:46:05 +02:00
cpfeiffer
8815f0d134
Small cleanups and fixlets.
2016-03-28 23:02:22 +02:00
Andreas Shimokawa
6ce63276a3
play around with play states, simplify weired nested switch
2016-03-27 19:50:32 +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
cpfeiffer
bfcfe82f17
Improve pairing activity: #254
...
- add hint about rebooting phone
- request enabling bluetooth
2016-03-26 20:46:48 +01:00
cpfeiffer
bff5837930
Sort device infos
2016-03-25 23:54:42 +01:00
cpfeiffer
8165751e57
Refactoring to test the double firmware update procedure #234
...
(while performing the same, known to be working firmware update for Mi1A)
Result: double firmware update procedure works on Mi1A.
Also updated FirmwareTest. Perform all tests not only in the test itself,
but also at runtime before doing the actual update.
Further:
- fix setting of firmwareInfoSent state variable, which prevented installation
of the section firmware
- make one string translatable
2016-03-25 23:45:27 +01:00
cpfeiffer
3714ec82da
Extracted String "HR: ", (= Heart Rate Firmware Version)
2016-03-24 22:23:16 +01:00
cpfeiffer
89eddb13b0
Fixed connection issues by reading the date from the band #249
2016-03-24 22:10:23 +01:00
cpfeiffer
e5b0afb916
Enable low latency during activity sync
2016-03-24 21:26:51 +01:00
cpfeiffer
0e435d6d94
Fix for device item not clickable when info items are visible
2016-03-23 23:34:42 +01:00
cpfeiffer
11ac01f0e8
Set low latency mode during initialization #249
...
This appears to fix the initialization getting stuck sometimes, e.g.
after turning on bluetooth and then connecting.
The band incidentally sends 0x8 when it's stuck (won't accept the UUID_PAIR
request).
2016-03-23 22:50:42 +01:00
cpfeiffer
1348bad4d3
Improved log output
2016-03-23 22:17:01 +01:00
cpfeiffer
9d9ef8a6f8
Some cleanup
2016-03-23 22:06:48 +01:00
cpfeiffer
71461642f7
Fix enabling "Write Log File" option ( closes #261 )
2016-03-22 23:07:11 +01:00
Andreas Shimokawa
df3a06ac9b
Reformat code, make getter of @NonNull members also @NonNull
2016-03-22 21:55:15 +01:00
cpfeiffer
b0ec74696d
Give better feedback when a firmware cannot be installed #234
2016-03-22 16:12:27 +01:00
Andreas Shimokawa
767f359319
Launch Android's Bluetooth settings instead of our activiy on Android >= 6.0
...
BLE scanning does not work on Android 6.0 and for the Pebble it does not add any value anyway.
2016-03-22 13:43:01 +01:00
cpfeiffer
424d9cd142
More work on firmware detection, recognition and validation #234
...
Should be as robust as possible now.
2016-03-21 23:42:34 +01:00
danielegobbetti
1933e2bf10
Localize the title of the configuration activity.
...
Auto open local settings (e.g. clay)
2016-03-21 21:19:32 +01:00
cpfeiffer
275839a7f4
last arg of copyOfRange() is index, not length!
2016-03-21 04:18:45 +01:00
cpfeiffer
f7b71c1f96
Add logging to firmware detection #234
2016-03-21 04:17:12 +01:00
Andreas Shimokawa
76fc7a2aec
always save last device address when connecting, fixes #258
2016-03-20 19:48:54 +01:00
Andreas Shimokawa
dbeded8d04
In Control Center, do not show alarm configuration in context menu if device does not support it
2016-03-20 17:53:55 +01:00
Andreas Shimokawa
4be1926459
reformat code though Android Studio
2016-03-20 15:00:05 +01:00
cpfeiffer
b3410dcebe
Improved testcase #234
2016-03-20 12:18:43 +01:00
cpfeiffer
4f956000c5
Enhanced support for firmware detection, recognition and upgrade #234
...
Also supports double firmware upgrade for Mi1S.
- so far, only hr firmware upgrade is tested for 1S
- adds junit testcases for firmware recognition and handling
2016-03-20 01:07:57 +01:00
cpfeiffer
6d8d6d5bc8
Testcases for firmware checking
2016-03-20 01:07:57 +01:00
Daniele Gobbetti
538961fd2c
Add some style, intercept and display toast in case of JS errors
2016-03-18 17:50:24 +01:00
Daniele Gobbetti
e69fac9704
Do not show the configure menu item for non configurable watch apps.
2016-03-18 16:47:14 +01:00
Andreas Shimokawa
5906c02330
Merge remote-tracking branch 'origin/danielegobbetti-playground'
2016-03-16 22:27:13 +01:00
cpfeiffer
c5a887192d
Remove/revert some temporary test code
2016-03-16 00:27:32 +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
4aaf3dd162
Use hw version to make device names unique, then mac addr
2016-03-16 00:27:32 +01:00
cpfeiffer
91f02ae920
WIP: Lots of work towards double firmware update for Mi 1S #234
2016-03-16 00:27:08 +01:00
danielegobbetti
ea855a4cc2
Also open public URLs with an external browser.
2016-03-13 08:31:50 +01:00
cpfeiffer
3f39928df5
Some more cursor-related improvements (closing)
2016-03-08 23:48:31 +01:00
cpfeiffer
10975feb49
s/moveToFirst/moveToNext/
2016-03-08 23:30:31 +01:00
cpfeiffer
9643fa6062
s/moveToFirst/moveToNext
2016-03-08 23:29:42 +01:00
danielegobbetti
d378b4eb7b
Intercept clay pebblejs://close url
2016-03-08 21:44:12 +01:00
cpfeiffer
7e8281e8d4
Improve exception handling logic a bit
2016-03-08 21:33:12 +01:00
cpfeiffer
87023ebdb3
Don't retrieve the column index again and again in a long loop
...
Also: fix weird iteration logic
2016-03-08 21:33:12 +01:00
Andreas Shimokawa
a89fea9c7d
Pebble: Fix crash when starting pebstyle
...
Also make code for "push" handlers more generic
2016-03-08 12:02:00 +01:00
Andreas Shimokawa
4362f78028
Pebble: Do not display Health on original Pebbles
2016-03-08 11:49:08 +01:00
Andreas Shimokawa
a3ee3c15fc
Pebble: copy pebble-app-js.js out of the pbw upon installation not upon reading the .pbw
...
This eliminates the need to copy the whole file into a byte[], and all file size limts are gone.
2016-03-08 11:41:20 +01:00
Andreas Shimokawa
88982a6174
Merge pull request #235 from Freeyourgadget/feature-configuration
...
Use external browser for configuring pebble apps
2016-03-08 10:41:46 +01:00
cpfeiffer
a96120f91d
Clear the chart when there are no samples
...
(e.g. when switching to another day for which no samples are
available, the chart now becomes empty instead of displaying the
samples from the last day with data.
2016-03-07 23:17:02 +01:00
cpfeiffer
5eb8f57b4c
Some more byte -> int conversions
2016-03-07 22:47:34 +01:00
cpfeiffer
25e58eb414
Upgrade mpandroidchart to 2.2.3
2016-03-07 22:46:03 +01:00
cpfeiffer
be012eca8d
For Mi Band 1A (fw 5.15.7.14) we get 0xa for auth success #180
2016-03-07 21:43:45 +01:00
cpfeiffer
50dd7f5eba
Better check for heartrate support on non-heartrate devices
2016-03-07 21:36:31 +01:00
cpfeiffer
619ea04a63
Fix database creation and updates #246
...
The creation script *must* always do the full creation so that fresh installs
get the correct database (no upgrade scripts will run for them)
2016-03-07 00:39:47 +01:00
danielegobbetti
459f6baf08
Fix missing column in the creation script (upgrades were fine, but new installation weren't).
...
Reindent changelog file.
2016-03-06 17:28:21 +01:00
Andreas Shimokawa
fa6b572172
Merge branch 'feature-configuration' of https://github.com/Freeyourgadget/Gadgetbridge into feature-configuration
2016-03-05 21:26:03 +01:00
cpfeiffer
97faf61c5a
Log db upgrade/downgrade requests
2016-03-04 23:37:42 +01:00
cpfeiffer
dc162a9ac8
Only add column if it doesn't exist yet
...
Column can exist if there down- and upgrades
2016-03-04 23:25:11 +01:00
cpfeiffer
3b3458e196
Show the heart rate measurement tooltip a little longer
2016-03-04 23:08:13 +01:00
Daniele Gobbetti
6d4b98719a
Implement some further JS methods to make additional watchapps happy
2016-03-04 17:44:42 +01:00
Daniele Gobbetti
3920b3f977
Do not override the configured settings with our old stored values (but keep them around)
2016-03-04 17:43:43 +01:00
Andreas Shimokawa
f616e4f571
Pebble: skip .js file if too large instead of breaking installation
...
(Hotfix)
2016-03-03 17:46:58 +01:00
Andreas Shimokawa
3786e0b7f2
fix typo
2016-03-03 16:04:17 +01:00
Andreas Shimokawa
1e44bb03fb
Pebble: convert Boolean to String for app configuration
2016-03-03 16:02:30 +01:00
Andreas Shimokawa
bd7b34985b
reformat code and optimize imports
2016-03-03 15:47:00 +01:00
Andreas Shimokawa
864e0953d9
only allow starting AppManager after device is initalized (else platform cant be determined)
2016-03-03 14:29:46 +01:00
Andreas Shimokawa
902ff39c0b
start app when about to be configured
2016-03-03 14:25:44 +01:00
Andreas Shimokawa
2a7f9226a0
Pebble: send configuration to watch
...
TODO: handle booleans
2016-03-03 14:23:17 +01:00
Andreas Shimokawa
fa924ff9d8
Pebble: fix crash when navigating back from configuration activity
2016-03-03 13:05:51 +01:00
Andreas Shimokawa
860ded1022
refromat code
2016-03-03 11:54:07 +01:00
Andreas Shimokawa
63d938559e
pass GBDevice down to ExternalPebbleJSActivity to determine the platform version (aplite,basalt,chalk)
2016-03-03 11:52:30 +01:00
Daniele Gobbetti
089a59168e
Initial support for using an external browser for configuring pebble apps. This allows existing configuration pages to work without having internet access ourselves.
...
This is a better approach as initially thought in #191 .
What is missing is outlined in the (several) TODOs.
2016-03-02 21:07:27 +01:00
Andreas Shimokawa
652c5575b3
user ckChangeLog to display the Changelog
...
There were other fancier libraries, but this one was so simple to integrate, that I could not resist ;)
2016-03-02 00:37:43 +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
7651c080c2
/ Only execute setAlarmViaAlarmManager when we are running Lollipop+.
2016-03-02 00:05:58 +01:00
0nse
6e7abecb17
/ Use GB.toast instead of Android Toast.
2016-03-02 00:01:41 +01:00
Andreas Shimokawa
fc464d112d
change some more short and byte to int regarding Morpheuz
2016-02-29 23:13:07 +01:00
cpfeiffer
cbe73f71a1
Fix some typos (thanks!) #178
2016-02-29 22:08:34 +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
cpfeiffer
ddde25e5df
Initial firmware update support for Mi1S #234
2016-02-28 02:46:48 +01:00
cpfeiffer
d7822d07a6
Show the measured heart rate as a Toast, for now #178
2016-02-27 23:27:15 +01:00
cpfeiffer
3ff31cd73b
Disable heartrate in charts fow now, fix notification for manual hr
2016-02-27 23:18:44 +01:00
cpfeiffer
d6dfc3b6ec
Fix some ClassCastExceptions in charts since switching to CombinedChart
2016-02-27 15:30:46 +01:00
Andreas Shimokawa
c449181083
Pebble: store appKeys in .json also.
...
Rumour says someone needs it soon...
2016-02-27 11:40:37 +01:00