1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-07 22:22:00 +02:00
Commit Graph

217 Commits

Author SHA1 Message Date
Andreas Shimokawa
1e398419a8 Watch9: Fix launch of wrong calibration activity
Fixes #1875
2020-05-24 23:25:52 +02:00
mamutcho
10bf452017 Merge branch 'master' of https://codeberg.org/Freeyourgadget/Gadgetbridge
 Conflicts:
	GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java
	app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java
	app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceSupportFactory.java
	app/src/main/res/values-bg/strings.xml
2020-03-13 19:08:34 +02:00
Andreas Shimokawa
cd2c13ebda Remove bracket (compile fix) 2020-03-01 21:41:15 +01:00
fparri
fdc57aed67 Aggiornare 'app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java'
Removed a comment not needed anymore and added a missing bracket
2020-02-28 10:35:12 +01:00
fparri
f0afa0e291 WIP - Added a localization string for the find lost device feature (#1809)
Added a new string to localize the Found it! message shown when using the find lost device feature
2020-02-27 09:22:11 +01:00
License Bot
d6fa5d0dd5 Update license headers 2020-01-09 10:44:32 +01:00
Andreas Shimokawa
21eada4caa Allow to set alarms to unused when long tapping
This helps clearing up a cluttered alarms list on devices like the Mi Band 4

Difference between disabling and setting to usused:
Unsused alarms cant be enabled from the Band, disabled can.

Closes #1747
2019-12-24 01:27:57 +01:00
mkusnierz
45054bbcd9 Extracted some commons for Lenovo watches 2019-10-23 22:07:38 +02:00
mkusnierz
4601d827ae Display calibration button for Watch X Plus
Use calibration activity from Watch9 for now
Partial heart rate history handling (WIP)
2019-10-20 10:34:29 +02:00
Andreas Shimokawa
9bfef4cf4f Make per-device settings more versatile, move more settings
This allows to construct per-device settings by device type very easily

device coordinators just do the following to declare which setting they support,
the settings activity is then composed at runtime.

@Override
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
     return new int[]{
            R.xml.devicesettings_miband3,
            R.xml.devicesettings_swipeunlock,
            R.xml.devicesettings_pairingkey
    };
}
2019-05-22 00:42:22 +02:00
Andreas Shimokawa
db48707764 Add a device specific settings activity, currently used for setting the auth key for Amazfit Bip/Cor
When connecting to a new device, a random key gets generated, which can be
looked up from the device specific settings (accessible via the gear icon in
the device card in the main activity). Old devices keep their 0123456789@ABCDE
key, they have to be re-paired to change that.
During pairing, long-pressing the device candidate in the discovery activity
will also start the device specific settings activity, where the auth key
can be set manually priror to pairing. This is usefull to keep the ability to
pair one device with multiple android devices.

Fixes #1308
2019-04-21 21:25:33 +02:00
Daniele Gobbetti
2a8fe5c3a0 Fix searching in application name when blacklisting.
The filter pattern is forced to lowercase, so also che application names
should be.

Fixes #1482
2019-04-21 21:21:21 +02:00
Daniele Gobbetti
7c918ee191 Add UI to invoke device specific settings Activity
Currently the icon in the card is hidden for all devices, since the
functionality is not implemented yet
2019-04-21 15:59:39 +02:00
License Bot
beedb653e6 Update license headers 2019-02-13 20:43:31 +01:00
Daniele Gobbetti
75d3dffb14 Migrate to androidx support libraries and bump compile SDK version
"Optimize imports" has been run on all source files, there might be
unrelated changes, but these should be harmless.
2019-01-26 16:00:56 +01:00
abettenburg
86e92130d2 Updated PullRequest with recommended improvements 2019-01-12 10:00:33 +01:00
abettenburg
51399066a4 Merge remote-tracking branch 'upstream/master' into black_whitelist_for_notifications
# Conflicts:
#	app/src/main/res/values/strings.xml
2019-01-12 09:55:53 +01:00
Andreas Shimokawa
e9982ccd56 remove supportsAlarmConfiguration() in favor of getAlarmSlotCount()
Coordinator that do not support alarms return 0 anyway.
2019-01-11 23:26:00 +01:00
cpfeiffer
903b50c2c5 Improved DB-based alarms
- got rid of GBAlarm
- added migration for prefs-based alarms
- various cleanups
2019-01-07 01:15:49 +01:00
abettenburg
d6190e6e59 Apps Notification can now be configured to filter notification content based on black- and whitelists
Go to notification blacklist, allow an app if blacklisted, than configure it's behavior with the menu icon on the right hand side.
Should be pretty much self explanatory.

Database Scheme raised to 20
2018-12-03 09:48:16 +01:00
AndrewBedscastle
a0e6ee490e *** WIP *** 2018-11-30 15:36:20 +01:00
Andreas Shimokawa
740cf103f6 Initial support for per-device alarms and raising the number of available alarms
TODO:
- Fix alarm widget (how can we get the deviceId?)
- Get rid of GBAlarm in favour of DAO generated Alarm class
- Find better defaults
- Bonus: migrate old preferece based shared settings
2018-11-24 12:16:47 +01:00
José Rebelo
e62fe36391 Roidmi 3: Fix and enable support 2018-09-28 16:35:09 +01:00
José Rebelo
cc6c57bd4c Add support for LED Color, FM Frequency 2018-08-31 14:03:39 +01:00
License Bot
696653eabf Update contributors list and license headers. 2018-08-29 21:30:23 +02:00
maxirnilian
4ff04870ca Watch 9: Initial support 2018-08-06 18:30:38 +02:00
cpfeiffer
163b547395 Remove level_list_device.xml, just use the DeviceType icon 2018-07-30 22:49:00 +02:00
José Rebelo
a43934651a
Allow devices to not support being found 2018-07-27 14:38:33 +01:00
License Bot
225a600aed Update license headers 2018-06-25 18:35:46 +02:00
Daniele Gobbetti
b81de63b30 Use checkboxes for notification and pebblemsg blacklist
also support dark theme and add a menu entry for accessing blacklist functionality
2018-06-19 18:26:06 +02:00
Daniele Gobbetti
d55d551943 Add overflow menu to blacklist and whitelist all installed applications
Fixes #679
2018-06-18 21:29:12 +02:00
Daniele Gobbetti
4d0020ae1d Add the option the blacklist applications also for Pebble Messages
Fixes #996
2018-06-18 20:38:37 +02:00
cpfeiffer
19c6c4c88a Fix refreshing of summaries 2018-04-13 20:27:31 +02:00
Daniele Gobbetti
5af353d6dc Amazfit Bip: limit the activities to the currently selected device in Control Center
Also don't reverse the results, but sort in the query
2018-04-07 10:16:36 +02:00
Daniele Gobbetti
cd029e4853 Amazfit Bip: fixes to the activities activity
- Prevent the swipe-to-refresh unless we are on top of the list
- Show the most recent activities on top of the list
2018-04-02 15:53:19 +02:00
Andreas Shimokawa
29a05f1d8f refactor onFetchActivityData() into onFetchRecordedData(dataTypes) to make it more generic
This removes misuse of testNewFunctionality() and support fetching GPS data and debug logs
Fetching debug logs (Amazfit Bip/Cor) is now accessible in the debug activity
Fetching GPS data can be done by swiping in the list activity.
TODO: actually refresh list when fetching data is done :P

Also fix some android studio warnings on the go...
2018-03-31 16:21:25 +02:00
Andreas Shimokawa
3d3cc1f40c Merge branch 'master' into bip-wip 2018-03-13 17:27:18 +01:00
License Bot
238bacde9f Update license headers 2018-02-26 14:27:33 +01:00
cpfeiffer
f5318287c4 WIP: Bip GPS fetching, parsing, exporting
Also adjust Mi2 date/time sending wrt DST offsets
2017-10-31 23:16:39 +01:00
Andreas Shimokawa
460c5c9a24 Fix setting smart alarms on Mi Band
Closes #750
2017-08-22 01:01:35 +02:00
Daniele Gobbetti
8cce2d1362 Pebble: allow to blacklist certain calendars
As requested in #736, this adds an entry in the settings menu that allows to blacklist certain calendars.
To avoid confusion, all the former blacklist methods and fields have been renamed to apps_blacklist. The new entries are called calendars_blacklist.
Importing the settings has not been tested with the current changes.
Closes #736

Future improvements TODO: The new setting lives in the Pebble section, i believe in the future the blackslist functionality should be centralized and put in the sidebar.
2017-08-18 10:34:42 +02:00
License Bot
8af9054f2d Update license headers 2017-04-26 00:14:25 +02:00
cpfeiffer
3f8620e026 Use toString() instead of risking a ClassCastException 2017-04-22 21:16:40 +02:00
cpfeiffer
2003d56190 Cleanup package blacklist handling
Didn't find a cause for #664, though.
2017-04-22 16:59:55 +02:00
Daniele Gobbetti
fe626eb11e Remove the checkboxes in the alarms cardview and simplify layout of details activity
- rename the layout file of the alarm item to better organize the files
- add a color selector for the item view, this replicates the old behavior of using the color to highlight enabled days
- remove the nested linearlayouts in the alarm details activity layout and use CheckedTextView instead
2017-04-09 16:01:48 +02:00
Daniele Gobbetti
a77ff03ca5 Add filter functionality to the app blacklist activity 2017-04-09 00:21:43 +02:00
Daniele Gobbetti
48728cbb50 Implement recyclerView in the AppBlackListActivity.
This allows to implement a search functionality (in the future)
2017-04-08 22:26:12 +02:00
Daniele Gobbetti
018c2a971e Show the list of alarms as (material design) cards 2017-04-08 18:44:15 +02:00
Daniele Gobbetti
f80215b37a Use standard recyclerview for app reordering
- allow dragging by using a drag handler (as per best practice)
- remove the custom draglistview dependency
- update to the latest android support libraries
2017-03-31 18:17:53 +02:00
Andreas Shimokawa
9eade33d72 Start VibrationActivity when using "find device" button with Vibratissimo
(The activity was inaccessible)
2017-03-16 17:38:13 +01:00
License Bot
6a842c52fa Update license header in all java files. 2017-03-16 17:36:15 +01:00
Andreas Shimokawa
a6bba1b094 In CCv2 allow to disconnect with long press in any state expect "not connected" 2017-03-13 22:27:59 +01:00
Daniele Gobbetti
0ac77fc0a4 Remove the legacy ControlCenter and its usages. Add New GUI to the changelog. 2017-03-11 19:49:57 +01:00
Daniele Gobbetti
ecd2c166c2 Use constraintlayout for the cardview and few improvements.
Icons are now bigger.
"find device" is in the icon row
2017-03-11 16:50:12 +01:00
Daniele Gobbetti
8117caf73c Merge branch 'master' into new_GUI 2017-03-11 16:44:16 +01:00
License Bot
e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
Translation Bot
3abbe12b53 Merge branch 'master' into new_GUI 2017-03-08 21:42:52 +01:00
cpfeiffer
19b0e5e801 Centralize icons for devices 2017-02-26 22:46:49 +01:00
Daniele Gobbetti
176cf79cc1 Merge branch 'master' into new_GUI
# Conflicts:
#	app/build.gradle
2017-02-26 16:55:54 +01:00
João Paulo Barraca
a3cc84c01d HPlus: add device specific preferences and icon 2017-02-06 01:33:15 +00:00
Daniele Gobbetti
879e47760b Stop discovery also if the user swipes the snackbar away. 2016-10-30 15:21:06 +01:00
Daniele Gobbetti
8c769b15c3 Use snackbar instead of progress dialog to find device. 2016-10-30 15:15:34 +01:00
Daniele Gobbetti
a45f76d3bf Prevent disconnection if device is not connected. 2016-10-30 14:42:08 +01:00
Daniele Gobbetti
8fdb233ef0 Bind connect and disconnect to the whole cards.
Use snackbars to give early feedback to the user (colors are wrong now, waiting for a change in master).
Removed hintTextView for good
2016-10-29 18:20:53 +02:00
Daniele Gobbetti
d467b37493 ControlCenterv2: further steps:
Close drawer before launching activities (feels sloow).
Implement device deletion (untested).
Add app-management icon, remove tap-connected-device-for-primary-activity, hidden (not removed) text hint.
Use level-list for device icon.
Use the new control center when tapping GB notifications.
Added icons to the legacy control center context menu, perhaps it can be embedded in the card?
2016-10-25 17:49:21 +02:00
Daniele Gobbetti
cde09d71bc Fixed KitKat crashes and changed to RelativeLayout. Using CCv2 as default launcher activity.
Added lost-device icon and action, added background to buttons.
Overflow reveal is now animated inside the card.
Bind connect and disconnect actions to device-icon (short press to connect/launch default activity; long press to disconnect).
2016-10-24 17:41:56 +02:00
Daniele Gobbetti
00938baf7d Further refinements:
- disconnect by long-pressing device icon (temporary)
- use level-list to show battery level + charging
- remove padding around cards list
- use style colors for action icons (supports dark theme)
- add secondary text to the themes, even though the color is the same
- replace the info icon with three vertical dots
2016-10-21 17:44:36 +02:00
Daniele Gobbetti
371f0ecdd0 Use a new GUI for the controlcenter.
The existing logic was mostly ported to the new activity, with the exception of device deletion (and all TODOs).
2016-10-21 13:01:30 +02:00
Andreas Shimokawa
c8fb7c5d10 Add icon for Vibratissimo 2016-09-21 19:16:07 +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
cpfeiffer
6843b5aa8f Add icon for Mi Band 2 2016-08-15 00:39:31 +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
Andreas Shimokawa
7690ad3af6 make appmanager usable again 2016-06-15 22:29:30 +02:00
Andreas Shimokawa
b5693bcb45 play around with drag and drop list 2016-06-15 19:56:34 +02:00
Andreas Shimokawa
3418543c31 play around with fragments 2016-06-14 20:04:54 +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
3fefb57fdd Fix colors in alarm activity for dark theme 2016-04-23 23:24:56 +02:00
Lem Dulfo
39cba84ab1 Apply gray images on non-connected devices in the list. 2016-04-10 21:11:52 +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
0e435d6d94 Fix for device item not clickable when info items are visible 2016-03-23 23:34:42 +01: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
4aaf3dd162 Use hw version to make device names unique, then mac addr 2016-03-16 00:27:32 +01:00
cpfeiffer
9ea2977143 Try hard to display a unique device name in ControlCenter
(Makes it a little easier to deal with muliple "MI" devices, for example)
2015-12-28 00:16:00 +01:00
Daniele Gobbetti
78cd11ad93 Hide the last N reserved alarm slots from the Alarm activity.
The original values remain stored in the preferences, they are just not available to the user anymore, further they are not sent to the device.
2015-12-17 17:02:00 +01:00
Andreas Shimokawa
7cf1e0e004 Add system app icon and make use of it (thanks xphnx!) 2015-12-12 11:59:52 +01:00
Andreas Shimokawa
b1954eec3e make use of some new icons 2015-12-11 21:38:43 +01:00
cpfeiffer
81c2f657bd Some lint fixes 2015-11-23 22:46:12 +01:00
cpfeiffer
694b3d897f Some Javadoc 2015-10-26 23:32:03 +01: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
05ee6e46c6 Display battery label in RED when battery is LOW #40 2015-09-02 23:49:48 +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
7923e153e6 Moved the enum to standalone in the model package. 2015-08-27 11:50:31 +02:00
Daniele Gobbetti
dcc988139f Merge remote-tracking branch 'origin/master' into low_battery_notification 2015-08-21 17:34:11 +02:00
Daniele Gobbetti
eb39ce9367 Further improvements:
- append a string on the control center when the device is charging
- battery status string is no more, welcome battery state enum
- the notification will not be shown when the device is charging, even if the level is below threshold
2015-08-21 08:41:57 +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
b25d771ee9 reformat code 2015-06-30 12:09:29 +02:00
Daniele Gobbetti
3068d687bf Adressed some of the observations made re the last commits. 2015-06-30 06:40:46 +02:00
Daniele Gobbetti
900511760c further improvements:
- the day of week are evenly spread across the screen in the alarms detail activity
- the alarms are stored in a single shared preference (as a set) NB: you'll have to reset your alarms if you used a previous version (and also manually clean the shared preferences, but this is not needed)
- the list of alarms gets correctly updated after editing a specific alarm
- the actionbar back button saves the alarm status, the device back button doesn't. I'm not sure if it's a bug or a feature :)
2015-06-30 06:40:46 +02:00
Daniele Gobbetti
dc3ed1659c use parcelable for passing alarms around 2015-06-30 06:40:46 +02:00
Daniele Gobbetti
1caca1439a Initial implementation of setting alarms to the Mi Band.
The code basically works, but there a lot of things to fix / improve.
* The alarms are stored to and read from the Shared Preferences, but there is no persistence within the app (basically they are read and stored at every access)
* The alarm list is not updated when coming back from the alarm detail view (probably related to the point above), but the actual alarm is
* The alarms preference names is sometimes built by concatenating strings, which is not really safe
* There is no check in the alarm constructor whether the stored string is a valid alarm representation
* Even though only 3 alarms can be stored on the device, we could have more in the app and let the user choose which to sync
* In the alarm detail view XML some material* drawables are used, it's possible that these break on android version < 5
* ...
2015-06-30 06:40:14 +02:00
Andreas Shimokawa
4f8a7ea64d Misuse device_candidate_item insead of device_item for AppManager 2015-06-07 22:02:40 +02:00
cpfeiffer
020d8d74d6 Added "Fetch Activity Data" to the context menu.
With some kind of progress reporting during the fetching #45
2015-06-06 19:39:04 +02:00
Andreas Shimokawa
1b2f20160a fix some lint warnings, mostly simplifications 2015-05-12 20:09:35 +02:00
cpfeiffer
39d84831ed Unset dynamic device state (like battery level, etc.) when disconnected 2015-05-10 00:05:29 +02:00
Andreas Shimokawa
3e85efa898 Display battery level if known. Should work on Miband, untested. 2015-05-05 22:52:25 +02:00
Andreas Shimokawa
d09b5442cf Put FW/HW info inside its own TextView to cleanup the device list 2015-05-05 11:16:57 +02:00
cpfeiffer
9df661bd96 Initial (ugly) support for device discovery and pairing (#3) 2015-05-05 00:48:54 +02:00
Andreas Shimokawa
f143c9ec54 androidstudio vs. eclipse :/ 2015-05-01 01:49:43 +02:00
cpfeiffer
8b3b4d0882 #46 make all strings localizable 2015-05-01 01:26:30 +02:00
Andreas Shimokawa
4a697edced add icon for activity tracker type apps. Thanks xphnx! 2015-04-10 22:26:52 +02:00
Andreas Shimokawa
2c50f95a92 update Pebble icon, add Miband icon 2015-04-01 22:12:49 +02:00
Andreas Shimokawa
9d74cee093 add icons for pebble and watchfaces. Store app type in GBDeviceApp. Store device type in GBDevice. 2015-03-31 23:34:19 +02:00
Andreas Shimokawa
0ccb818f58 Added AppManager, does not do anything useful yet. Only lists installed Apps. 2015-03-25 22:23:45 +01:00
Andreas Shimokawa
2e7f45433a display connection status in the device list 2015-03-22 23:38:51 +01:00
Andreas Shimokawa
4e465928e6 List all suported devices and connect on tap. Remove the connect button. 2015-03-21 18:18:07 +01:00