Commit graph

416 commits

Author SHA1 Message Date
Oleksandr Kapshuk bd3b58c007
Activity recognition sensor added (#784)
* Activity recognition sensor added

* Added all probable activities with their confidence

* Corrected update interval

* ktlint
2020-08-25 10:52:58 -04:00
uvjustin c50c0adf0e
Add Exoplayer view and interface (#739)
* Add Exoplayer view and interface

* Fix play/pause buttons

* Support PictureInPicture

* Migrate dependencies to Config.kt

* Move code from inline to functions

* Add spacing in playback control layout

* Changes per @balloob

* Fix ktlint errors
2020-08-25 10:38:51 -04:00
chriss158 abfceba63b
Fix back stack of mobileAppIntegrationFragment (#804) 2020-08-22 14:49:55 -04:00
Justin Bassett 87647eeab1
Support opening NFC Settings from external bus. (#772)
* Support opening NFC Settings from external bus.

* Support frontend passing tag to write.

* ktlint

* Update to return empty object when tag is written.

* Remove commented code

* ktlintFormat

* Loosen restriction on tags to include more than just UUID.

* Close NFC activity when writing for frontend.
2020-08-22 14:42:34 -04:00
chriss158 7844360760
Fix top button back stack of settings activity (#802)
* Fix back stack of settings activity

* Remove overwrite of onBackPressed because not using super

* Fix lint
2020-08-21 21:39:06 -04:00
Krisjanis Lejejs 1fdb9e062a
Added onDeleted function to Static widget (#797) 2020-08-21 09:05:09 -04:00
chriss158 631b9d1cf5
Add themes selector (#780)
* Add themes selector

* Fix lint

* Fix test

* Remove german translation

* Default theme "system" on >= Pie

* Use useSimpleSummaryProvider for themes preference

* Fix lint

* Fix dark mode wait color text in "unable to connect to home assistant" message

* Fix tint of widget button icon in light mode

* Implement ThemeManager to handle theming

* Fix lint

* Fix WebViewPresenterImplSpec test
2020-08-21 09:04:11 -04:00
Krisjanis Lejejs b4a6a607b1
Added possibility to use multiple attributes for static widgets (#789)
* Added possibility to use multiple attributes for static widgets

* Fixed migration

* Remove empty line

* Fixed catch statement

* Renamed TAG
2020-08-20 09:27:42 -04:00
Krisjanis Lejejs ba621ca00e
Increased connection timeout delay (#795) 2020-08-20 09:20:16 -04:00
Daniel Shokouhi 26de39f9f0
Last reboot sensor (#794) 2020-08-20 08:53:35 -04:00
Oleksandr Kapshuk fd62b0e280
Enhance PhoneStateSensorManager with carrier information sensors (#786)
* Enhance PhoneStateSensorManager with carrier information sensors

* Check for api version while getting available sensors
2020-08-20 08:17:37 -04:00
Daniel Shokouhi c61bf25854
Add steps counter sensor (#792)
* Add steps sensor

* Fix permission and set correct icon
2020-08-19 20:55:38 -04:00
Justin Bassett 8e5f063200
Add a template widget (#790)
* Add backend for requests to get a template.

* Add frontend for template widgets!

* ktlintFormat

* Fix tests.
2020-08-19 20:49:34 -04:00
Krisjanis Lejejs 58312c134e
Added multiple entity state widget options (#771)
* Added entity widget text size, separator options

* Fix kLint

* kLint#2

* Fixed DB migration

* kLint fix

* Improved code quality
2020-08-19 07:48:36 -04:00
Justin Bassett 1372902dae
Fix name-spacing issue (#781)
* Apparently Kotlin does funny things when importing a class with the same name as the current class.

* ktlint.
2020-08-16 23:15:32 -04:00
Justin Bassett 4c91c34ec8
Let widgets use any material icon (#745)
* Functional widgets with all material icons to pick from.

* Load icons in io thread since it takes a hot second.

* Bump DB version.

* ktlint

* Blow away widget prefs since it was a hack anyway.

* Migrate static widgets to room db.

* ktlint and tests.

* Little more cleanup.

* More ktlint.

* Initial attempt at Migrations.

* Add missing Migrations.kt

* Add full migration support from old to new widgets.
2020-08-16 22:18:20 -04:00
chriss158 6bc19488b4
Add easier way to use of emoji in notifications (#741)
* Add easier way to use of emoji in notifications

* Try to exclude org.json:json

* Fix lint
2020-08-16 21:57:47 -04:00
Justin Bassett 47a88000e9
Fix issue with Room DB migrations. (#778)
* Fix issue with Room DB migrations.

* Add migration for sensors.
2020-08-16 15:59:08 -04:00
Daniel Shokouhi 16a0f66a8d
Change order of package for apps that don't provide it (#775)
* Change order of package for apps that don't provide it

* Update app/src/main/java/io/homeassistant/companion/android/sensors/NextAlarmManager.kt

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>

* Lint

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2020-08-16 14:44:40 -04:00
Daniel Shokouhi b24574c46c
Allow certain fields to be copied (#776) 2020-08-16 13:51:01 -04:00
Daniel Shokouhi 0e885e7b80
Attempt to fix SD card path in storage sensor (#770)
* Attempt to fix SD card path in storage sensor

* Update app/src/main/java/io/homeassistant/companion/android/sensors/StorageSensorManager.kt

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2020-08-15 22:45:05 -04:00
Daniel Shokouhi 469be0310d
Fix light sensor crash on older devices (#766) 2020-08-15 07:43:04 -04:00
Justin Bassett 4c6610a9c9
Fix duplicate attributes showing in UI. (#765) 2020-08-15 00:15:05 -04:00
Daniel Shokouhi 370b8bcecc
Add light sensor (#761)
* First commit of light sensor

* Fixes for light sensor

* Lint

* Fix sensor receiver fatal error

* Review comments
2020-08-14 23:31:48 -04:00
Justin Bassett 15735f24c9
Dagger Injection Fixes (#764)
* Fix sensor receiver fatal error

* Fix other missing applicationContext in other locations.

Co-authored-by: Daniel Shokouhi <dshokouhi@gmail.com>
2020-08-14 22:58:09 -04:00
chriss158 705702f087
Fix status bar / navigation bar / app colors on dark mode (#749)
* Fix status bar / navigation bar color on dark mode

* Fix colors on other activities (onboarding activity etc.)

* Fix action bar colors on dark mode

* Fix alert dialog / widget / widget config colors for dark mode

* Align colors for dark mode with dark mode color in home assistant
2020-08-14 22:00:39 -04:00
Daniel Shokouhi f04f846057
Add storage sensor (#750)
* Initial commit of storage sensor

* Lint

* Fix sensor update and update storage sensor
2020-08-14 12:00:31 -04:00
Justin Bassett 8f8bea2878
Try to fix some location issues (#753)
* Make sure we don't sent a crazy inaccurate location.

* Attempt to keep a wakelock when requesting accurate location.

* Lint
2020-08-14 08:42:16 -04:00
Justin Bassett 2e5ee34002
Ensure when sensors are disabled they aren't still polling. (#752) 2020-08-14 08:32:17 -04:00
Home Assistant Bot 34324614c8
Lokalise: updates (#747) 2020-08-13 10:42:08 -04:00
Justin Bassett 28de8583a8
Remove multiple sensor receivers (#746)
* Remove multiple sensor receivers
Remove PermissionManager.kt

* Fix minimal build.
2020-08-13 10:20:03 -04:00
Daniel Shokouhi 8fef3480c6
Add Bluetooth sensor (#743)
* Initial commit of bluetooth sensor

* Remove unit of measurement

* Lint

* Lint
2020-08-13 00:56:40 -04:00
Justin Bassett 15f6e2449e
NFC Fixes (#744)
* Ensure NFC is only enabled for valid Home Assistant Versions.

* Use correct deviceId.

* Fix crash when scanning some tags.
2020-08-12 22:45:08 -04:00
Justin Bassett d016aff47e
Sensor Screen (#742)
* Initial work on settings UI and getting them all to return.

* Basic views + flow done

* No icons in sensor detail.

* Refactor room stuff to make more sense.

* Add permission checking and DB entries for sensors!

* Make sure we have sensors sorted.

* Move LocationBroadcastReceiver.kt into sensors package.

* Move SensorUpdater.kt into sensors package.

* Sensors can now be enabled and disabled and displays data in UI.

* Added Location "Sensors".

* Start a single receiver to handle all sensor based stuff.

* Fix minimal flavor.

* Rework onboarding flow to use Daos

* Add categories to sensors
extract strings
add icon.

* linting

* Fix tests and minimal.

* Fix merge issues.

* Remove unused files.

* Bring phone sensors inline.
2020-08-12 21:34:15 -04:00
Oleksandr Kapshuk a8bd4da0a0
Telephony state support (#731)
* Add support for telephony states #441

* Settings and permissions for call tracking

* Settings and permissions for call tracking impl

* Broadcast receiver for call tracking

* Removed localized strings

* Update AllSensorsUpdaterImpl.kt

Merge fix

* Lint, bugfixes and improvements

* Lint

* Update wording.

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2020-08-12 18:11:28 -04:00
Daniel Shokouhi 6e82d3743c
Battery and next alarm sensor improvements (#740)
* Battery and next alarm sensor improvements

* Lint
2020-08-12 17:43:11 -04:00
Daniel Shokouhi 7b0e28ffa5
Update wifi sensor on state changes (#734)
* Update wifi sensor on state changes

* Lint
2020-08-11 15:29:41 -04:00
Daniel Shokouhi 6e70dffbbb
Fix configure widget theme colors (#732)
* Remove hardcoded colors to be more theme compatible

* Fix onboarding screens
2020-08-11 11:54:42 -04:00
David Luhmer ec9ff0ae6b
Add nfc support (#689) 2020-08-11 10:37:43 -04:00
Daniel Shokouhi 4354e817c6
Initial commit of next alarm sensor (#726)
* Initial commit of next alarm sensor

* Lint

* Review comments

* Remove extra spacing
2020-08-10 23:57:29 -04:00
chriss158 e7e4a25e38
Fix missing message if notification is collapsed (#723) 2020-08-09 12:29:12 -04:00
noam148 ebc7b796e8
Fix auth skip issue (#722) 2020-08-09 12:21:45 -04:00
Justin Bassett 4b886b531c
Make sure title for notifications are optional. (#721) 2020-08-09 11:22:27 -04:00
Daniel Shokouhi 09ea80f5d6
Fix android dark mode (#717)
* Fix android dark mode

* Lint

* Remove extra spaces
2020-08-09 10:25:17 -04:00
chriss158 2b18cf06bd
Fix statusbar not readable when using a light theme (#433) (#716)
* Fix statusbar not readably when using a light theme (#433)

* Color navigation bar with theme color
2020-08-09 10:19:59 -04:00
chriss158 e42d4c211d
Fix statusbar color if theme used rgb color instead of hex color (#714)
* Fix statusbar color if theme used rgb color instead of hex color

* If a theme is using rgb instead of hex for color,
the status wont be colored.
Solution: Try to parse rgb color first. If not possible, parse hex color

* Fix missing imports
2020-08-08 12:42:38 -04:00
chriss158 a150610d51
Notifications - HTML formatting for title, group summary and collapsed notifications (#712) 2020-08-08 12:28:28 -04:00
Daniel Shokouhi ceedaf4cbe
Correct accuracy for location tracking (#706)
* Correct accuracy

* Typo
2020-08-06 22:06:59 -04:00
Daniel Shokouhi 06d97b5e01
Mention app flavors and actions APK (#707) 2020-08-06 19:17:34 -04:00
Colin Cachia 11982f9ae3
Entity State Widget bugfix (#702)
* Merge branch 'master' of F:\Colin\Projects\home-assistant-android-companion-colin-cachia with conflicts.

* Static Widget Bugfixes:
- Safely typing any attribute to String
- Removed showing of N/A when attribute not found
2020-08-04 16:40:50 -04:00