Commit Graph

63 Commits (921523334447222ba530336d3fbc0e748842b2d2)

Author SHA1 Message Date
cpfeiffer 2fa166e381 Fix potential NPE, setup environment earlier 2016-06-25 18:58:54 +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 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
cpfeiffer 61957d6cb0 WIP: more db work 2016-06-14 20:13:08 +02:00
cpfeiffer 3b87966fe9 Merge branch 'master' into db-refactoring 2016-06-06 22:16:40 +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 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 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
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
cpfeiffer 8ca821ab8a More WIP on db refactoring 2016-05-13 23:47:47 +02:00
cpfeiffer 1a353239c4 Fix log content 2016-05-08 21:38:55 +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 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 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
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
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 4bcebca744 Work towards dark theme, remove -v21 specific theme definition 2016-04-14 15:21:25 +02: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
danielegobbetti 6eb35b955e Prevent race condition on android 6 (?) at the cost of losing the gender data (we cannot display a toast at this point unfortunately). 2016-02-21 16:46:48 +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
Andreas Shimokawa 46bbab7df0 rename IDSenderLookup to LimitedQueue and store Object instead of String 2016-01-09 16:07:22 +01:00
Andreas Shimokawa 9f60bf3561 fix compilation 2015-12-23 22:15:50 +01:00
Daniele Gobbetti 3ee418a45b Implement pushing messages upon watchapp start.
This watchface is used as example: https://github.com/ygalanter/PebStyle because it doesn't initiate a connection like others do.

At the moment this is more a proof of concept^W^W^Wdirty hack then anything else.
2015-12-23 14:22:28 +01:00
Andreas Shimokawa de5f30ae97 WIP: Work towards SMS replies / canned replies, round 3
- put random id/phone number pair into limited lookup list (last 16 sms messages) when sms arrives
- lookup the phone number when replying from the a device

THIS STILL DOES NOT DO ANYTHING USEFUL
2015-12-14 23:31:31 +01:00
cpfeiffer e642971b4c Support for deleting/emptying the activity database 2015-12-08 23:42:58 +01:00
cpfeiffer 159c187e5e On Quit, remove all pending notifications
At least the notifications from #141 don't stay there forever, then.
2015-12-08 21:48:56 +01:00
cpfeiffer 4616dcc965 Handle case where notification.extras is not available #174 2015-11-23 22:09:47 +01:00
cpfeiffer 694b3d897f Some Javadoc 2015-10-26 23:32:03 +01:00
cpfeiffer 4533ae22ee Log otherwise uncaught exceptions (#134) 2015-10-07 23:32:58 +02:00
cpfeiffer 38c3a41279 Improve logging setup, should hopefully fix #107 2015-10-03 23:26:36 +02:00
cpfeiffer 2231dcbce3 Log GB's version 2015-10-03 22:30:11 +02:00
Andreas Shimokawa e3533a2b18 Pebble: Allow muting (blacklisting) Apps from within generic notifications on the watch
Closes #113
2015-09-25 00:53:40 +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
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 567f27b0f4 Some initial fixes found by static analysis #92 2015-08-16 00:17:16 +02:00
cpfeiffer 802f48011d Refactoring of database access
- the db is now exclusively locked for one thread
- the charts read from the db and analyze data in a background thread

+ some small cleanups
2015-08-03 01:21:44 +02:00