Andreas Shimokawa
14f8929439
Pebble: fix decoding strings in appmessages from the pebble
...
This fixes sending SMS from "Dialer for Pebble"
2015-12-14 00:05:14 +01:00
Andreas Shimokawa
e5cf22bda6
WIP: Work towards SMS replies / canned replies, round 2
...
- parse the reply string in PebbleProtocol
- put replies into GBDeviceEvents
- display a toast in AbstractDeviceSupport, containing the reply
THIS STILL DOES NOT DO ANYTHING USEFUL
2015-12-13 22:43:53 +01:00
Andreas Shimokawa
53fb63781e
WIP: Work towards SMS replies / canned replies
...
- Implement the PebbleProtocol side (2.x and 3.x)
- Add Preferences for canned replies
This can be tested by enabling untested features in Pebble Settings
It lets you see and select the replies set up in "Canned Repies" on the Pebble
You will get a "NOT IMPLENTED" message on your Pebble.
THIS DOES NOT ACTUALLY DO ANYTHING USEFUL YET.
2015-12-13 12:03:57 +01:00
cpfeiffer
f258e62633
Refactoring: centralize GBDevice creation
...
- created and provided by DeviceHelper
- passed from UI to service
- without UI, service uses DeviceHelper directly
=> Cleaner and less duplicated code
2015-12-13 00:43:07 +01:00
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
Andreas Shimokawa
4528aaf22f
Pebble: Allow installing apps compiled with SDK 2.x also on the balast platform (pebble time, pebble time steel)
2015-12-11 21:11:55 +01:00
cpfeiffer
854a7ee1ac
Avoid NPE when DeviceInfo is null
...
(when a notification comes in while we're connected, but not initialized yet)
2015-12-09 17:55:46 +01:00
cpfeiffer
794ae6d800
Well, we better return something usefull instead of just false :-]
...
Please try again #178
2015-12-09 17:54:54 +01:00
cpfeiffer
6d7428ad29
Require initialized state for some more actions
2015-12-09 00:03:39 +01:00
cpfeiffer
e642971b4c
Support for deleting/emptying the activity database
2015-12-08 23:42:58 +01:00
cpfeiffer
0d63e5b770
User Info is probably the same for MI 1A and 1S #178
...
Can you please test whether this fixes the connection problems?
2015-12-08 21:48:56 +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
Andreas Shimokawa
8b87e97f51
fix crash in FileUTils.copyURItoFile() if source and destination are the same file.
...
This allows to install pbw files from the pbw-cache manually though a file manager.
2015-12-08 18:59:37 +01:00
Andreas Shimokawa
f59382e3c8
Pebble: Show correct icon for activity tracker and watchfaces in app installer (language and fw icons still missing)
2015-12-08 18:32:17 +01:00
Andreas Shimokawa
18726eca33
Pebble: Correct setting the timezone on firmware 3.x (pebble expects the "ID" eg. Europe/Berlin)
2015-12-08 14:59:24 +01:00
Andreas Shimokawa
62c196eb1d
Pebble: determine pbw type early for correct display in pbw-cache on firmware 3.x
2015-12-08 13:23:07 +01:00
Andreas Shimokawa
3ac00a004f
Pebble: Support installing .pbl (language files) on firmware 3.x
2015-12-08 12:07:14 +01:00
cpfeiffer
7f8ba83aab
This might fix the missing progress bar #155
...
setVisibility(Public) is only available since Lollipop.
2015-12-07 23:09:19 +01:00
Andreas Shimokawa
1c3e0b628b
Pebble: store app details in pbw-cache and display them in app manager on firmware 3.x
...
Improves #93
2015-12-07 18:16:23 +01:00
Andreas Shimokawa
f20e11d517
Pebble: Increase maximum notification body length from 255 to 512 bytes on firmware 3.x
2015-12-07 12:25:34 +01:00
cpfeiffer
134eeacaea
Whitelisted 5.15.7.14
2015-12-07 01:22:27 +01:00
cpfeiffer
365ce61cb6
Support for firmware upgrade/downgrade on Mi 1A.
...
I hope I didn't break firmware upgrades on some Mi 1 models
other than mine (my hardware revision is 2).
Upgrades for Mi 1S are currently disabled, we need some brave
souls who can help us test this.
Closes #173
Also see: #169
2015-12-07 01:14:06 +01:00
cpfeiffer
6b053c4240
Make method protected, for future use
2015-12-07 01:13:47 +01:00
cpfeiffer
aa60ce4b56
Disable some notifications also for update-firmware operation
...
(introduce a common superclass to do that)
2015-12-07 01:13:47 +01:00
cpfeiffer
579546c9f8
Display a toast when bonded
2015-12-07 01:13:47 +01:00
cpfeiffer
b056e1b2a0
tiny log addition
2015-12-07 01:13:47 +01:00
cpfeiffer
8cd6bf09a4
Fix NPE when an error occurs during activity synchronization
...
(activityDataStruct is null after handleActivityFetchFinish())
Also remove superfluous log statement -- toasts are logged as well.
2015-12-07 01:13:47 +01:00
Andreas Shimokawa
b05cfc6aac
Pebble: fix crash on firmware 3.x when pebble requests a pbw that is not in Gadgetbridge's cache
2015-12-06 17:56:46 +01:00
Andreas Shimokawa
79f92b8495
Fix installing pbw files from different URIs than local files on Firmware 3.x. Fixes #183
2015-12-06 17:22:07 +01:00
Andreas Shimokawa
9ebb320e10
fix installing pbz/pbw files from content provides (eg. download manager)
...
This still does not fix pbw isntallation problems with FW 3.x since the content does not get copied to the pbw cache yet when content providers are involved
2015-12-06 16:48:43 +01:00
Andreas Shimokawa
05a8436f7c
Treat notifications from Signal as chat messages
2015-12-06 16:10:46 +01:00
Andreas Shimokawa
39e09946cd
fix missing assignment *cough*
2015-12-06 15:39:34 +01:00
Andreas Shimokawa
112dfa184a
Catch securtiy exception if contacts can't be read on Android 6.0. Closes #182
2015-12-06 15:32:48 +01:00
Andreas Shimokawa
bc108ba095
Pebble: support installing 3.x apps on OG Pebble
2015-12-05 16:06:42 +01:00
Andreas Shimokawa
aca0149b45
use DeviceHelper in DeviceSupportFactory to determine supported device from bt addresses
...
This fixes a bug when Pebble was detected as Mi when unpaired.
Since we were not able to read the device name, it was considered MI by duplicated and
faulty code. Fixes #177 .
2015-12-01 11:39:34 +01:00
cpfeiffer
40d7f3b19f
Improved log output for progress actions
2015-11-30 23:42:59 +01:00
cpfeiffer
4b42a9a4f6
Improved log output for abort actions
2015-11-30 23:42:59 +01:00
cpfeiffer
8585572197
Improved log output for plain actions
2015-11-30 23:42:59 +01:00
Andreas Shimokawa
17ba49374c
Fix copy&paste error in K9Receiver.java, update CHANGELOG.md
2015-11-27 23:45:27 +01:00
Andreas Shimokawa
c768107db8
Catch permission errors in K-9 Mail receiver. Closes #175 .
2015-11-27 22:42:47 +01:00
cpfeiffer
bd0716ba58
Some more lint warnings fixed
2015-11-23 23:04:46 +01:00
cpfeiffer
95dc67c98d
Back to sdk level 19 ( #173 )
2015-11-23 22:49:11 +01:00
cpfeiffer
81c2f657bd
Some lint fixes
2015-11-23 22:46:12 +01:00
cpfeiffer
4616dcc965
Handle case where notification.extras is not available #174
2015-11-23 22:09:47 +01:00
cpfeiffer
394a0905dc
Avoid potential, but very unlikely NPE
2015-11-23 21:59:13 +01:00
cpfeiffer
a53f1c21eb
Simplification
2015-11-23 21:39:08 +01:00
cpfeiffer
34e08f6de8
Avoid potential NPE. Check for null first.
2015-11-18 23:21:56 +01:00
cpfeiffer
1e6db708d2
Fix NPE.
...
Now that is a really crappy API in Android that returns an array with null values.
closes #167
2015-11-18 23:18:01 +01:00
Andreas Shimokawa
1734e58f70
Pebble: Initial try to interpret sleep
2015-11-15 10:30:28 +01:00
cpfeiffer
ebbb71ae9d
Update MPAndroidChart to 2.1.6
2015-11-13 23:57:04 +01:00
cpfeiffer
f349846f4a
Another small change to BTLE device connection #156
2015-11-13 23:53:48 +01:00
cpfeiffer
2e267a4c2b
Temporary workaround for totally wrong sleep stats
...
The reason being that we filter samples by activity kind
and then calculate the total sleep time using a delta between two
consecutive sample timestamps. But due to filtering of samples, not
all samples are consecutive. Instead of we have "holes" and add those
to your sleep time.
The data in the db is correct though (it always is), it's just the
display in the app that is wrong.
2015-11-09 23:56:46 +01:00
cpfeiffer
d9722c6db2
Translate strings, remove unused variable
2015-11-09 23:56:46 +01:00
cpfeiffer
58cfd0fef9
For a start, connect with "false" #156
...
My connection problems went away with this. Let's see how it works out.
2015-11-03 20:23:48 +01:00
cpfeiffer
c27459b6cc
It's recommended to cancel discovery before connecting
2015-11-01 23:32:25 +01:00
cpfeiffer
952a383856
Use batched database commits for Mi Band activity samples
2015-11-01 21:41:36 +01:00
cpfeiffer
d4f070f0aa
Simplify external dir handling again -- prefer the primary dir
...
The primary external dir is often a user-partition on the internal
storage medium. This one is safe in multi-user environments.
The "removable storage" (sdcard) on the other hand can be read by
everyone. If the former is not available or not writable, use the
latter.
closes #153
2015-11-01 20:49:50 +01:00
cpfeiffer
8920f5e95b
Test fixing problem with non-writable getExternalFilesDir() #153
2015-10-29 00:46:52 +01:00
cpfeiffer
1f599c660f
Improved file and error handling
2015-10-28 23:54:08 +01:00
cpfeiffer
694b3d897f
Some Javadoc
2015-10-26 23:32:03 +01:00
cpfeiffer
39c7a853c8
Improve error logging: #153
2015-10-26 22:45:43 +01:00
cpfeiffer
54c316778b
Add exception to GB.toast() to get it logged
2015-10-25 00:13:32 +02:00
cpfeiffer
4200e77016
Disable activity data fetching when not supported
...
Closes #149
2015-10-24 23:28:55 +02:00
Andreas Shimokawa
f287c04ad9
Pebble: simplify Misfit data parsing, since all assumptions seem to be wrong :/
2015-10-24 11:12:40 +09:00
Andreas Shimokawa
4b9304b897
fix
2015-10-23 23:55:23 +09:00
Andreas Shimokawa
59f4766bc5
no comment
2015-10-23 23:18:36 +09:00
Andreas Shimokawa
e809c490dc
add method for batch inserts in ActivityDatabaseHandler. Closes #150
2015-10-23 22:13:12 +09:00
Andreas Shimokawa
4aff3c8e8e
Pebble: try to improve Misfit steps parsing. Should be really close now.
2015-10-22 23:56:45 +09:00
cpfeiffer
c350f04fa9
Make "Locate device" work with newer firmware and MI1A. ( #136 )
...
Separate the different notification logic into distinct strategy classes.
2015-10-22 00:53:27 +02:00
cpfeiffer
88fb81f921
Make onStartCommand() synchronized, to be sure
...
(or does Android take care of not calling this concurrently?)
2015-10-22 00:52:45 +02:00
cpfeiffer
ac120dc7d6
Small improvement to connect()
2015-10-22 00:32:16 +02:00
cpfeiffer
3b94a96060
Fix some warnings
2015-10-21 23:29:37 +02:00
Andreas Shimokawa
44a36a5f1d
Pebble: First try to receive at least steps from the Misfit pebble watchapp
2015-10-21 23:11:59 +09:00
cpfeiffer
aa5749cd40
Some improvements to live activity.
...
Still rather inaccurate due to missing timing information.
2015-10-21 00:36:18 +02:00
cpfeiffer
52f3ca5253
Always name things positively. Negating things is bad for comprehension :-)
2015-10-19 23:36:10 +02:00
cpfeiffer
5a3990b9d2
Guard logging with LOG.isDebugEnabled()
2015-10-19 20:56:56 +02:00
Carsten Pfeiffer
4096e50681
Merge pull request #146 from sarg/master
...
Fix DeviceInfo checksum function.
2015-10-19 20:56:49 +02:00
Daniele Gobbetti
cee03debbb
- add code to send the confirmation of the activity data transfer after a timeout.
...
==> This is currently commented out because it was done to solve #141 but while doing this #143 popped out.
- send a stop_sync message to the band if the data doesn't fit the buffer. This way the data remains on the band.
2015-10-19 16:17:03 +02:00
Daniele Gobbetti
6460b391d9
Be dump the content of the notification to the debug log
2015-10-19 15:16:21 +02:00
Sergey Trofimov
94cbf2f301
Fix DeviceInfo checksum function.
2015-10-19 15:02:56 +03:00
cpfeiffer
4e0fed8857
Improvements to how and when alarms are sent to the device
...
They are now sent whenever the Alarms activity is finished.
Display "All alarms disabled" when no alarm is enabled.
Unrelated: pass exceptions to GB.toast() where applicable.
2015-10-18 23:52:59 +02:00
cpfeiffer
86d17c7792
Pass the exception to GB.toast()
2015-10-18 23:43:27 +02:00
cpfeiffer
ef15bf8ce8
Prevent firmware update for Mi Band 1A for now #136
2015-10-18 22:57:04 +02:00
cpfeiffer
dcd776e09a
Attempt to fix never finishing activity data fetching #142
...
(by disabling unrelated notifications)
2015-10-18 22:27:52 +02:00
cpfeiffer
7a44ea9596
Small comment
2015-10-18 21:33:07 +02:00
Sergey Trofimov
d57c6166b9
Fix pairing with MI1A
2015-10-18 21:54:22 +03:00
Sergey Trofimov
7591d4a8af
Fix typo
2015-10-18 18:29:41 +03:00
Sergey Trofimov
a1fd31c260
Show toast when no valid DeviceSupport found for pairing.
2015-10-18 09:34:51 +03:00
Sergey Trofimov
1c1f8e8535
Make DeviceSupportFactory recognize device names starting with MI
2015-10-18 09:20:18 +03:00
cpfeiffer
b43e96318a
Also support pulldown to sync in ControlCenter #138
...
Should factor out some common code between ChartsActivity
and ControlCenter, though.
2015-10-18 01:39:25 +02:00
cpfeiffer
1e56e540fa
Remove hardcoded equals("MI") in favor of DeviceCoordintator #136
2015-10-18 01:01:13 +02:00
cpfeiffer
45fc2c181c
Add pulldown to sync and tabs in the charts activity #138
2015-10-17 17:10:14 +02:00
Andreas Shimokawa
a9186791dc
register/unregister receivers at runtime instead of enabling/disabling them via packagemanger
2015-10-16 00:23:16 +09:00
cpfeiffer
4533ae22ee
Log otherwise uncaught exceptions ( #134 )
2015-10-07 23:32:58 +02:00
Andreas Shimokawa
262271dbd0
Pebble: calculate CRC for language files (.pbl) since they do not have a manifest
...
It should fix installation of all .pbl files (tested with Spanish, German, French and the inofficial Japanese language pack)
This also marks the return of the infamous STM32CRC, this time with hopefully fixed tail code.
2015-10-07 22:29:30 +09:00
Andreas Shimokawa
cd7acf6572
Pebble: Do not reboot after language file installation (does not seem to be necessary)
...
NOTE: This still does not work since crc calculation is missing
2015-10-07 00:44:29 +09:00
Andreas Shimokawa
5860c4f4f9
Pebble: WIP support for flashing language files (.pbl)
...
NOTES:
- YOU SHOULD NOT TRY THIS YET ;)
- This was only tested with the unoffical japansese language pack
- Problably needs proper crc calculation (I just hardcoded the one for the japanese language pack)
2015-10-06 23:56:01 +09:00
Andreas Shimokawa
d21b5e68b5
Pebble: Cleanup AppMessage handlers
2015-10-04 22:53:11 +09:00
Andreas Shimokawa
a4a59f5df4
fix hexdump() when using an offset with -1 as length (= full length)
2015-10-04 22:42:21 +09:00