Commit graph

177 commits

Author SHA1 Message Date
Justin Bassett 5fa1ee05ce Add specific error handling around revoked token. (#251)
* Add specific error handling around revoked token.

* Fix PR Comments.
2020-01-12 04:56:04 -08:00
Justin Bassett 675861d7c0 Add timeout to UI on load. (#249)
* Refactor to isConnected.

* Add timeout to UI on load.
2020-01-10 16:45:01 -08:00
Justin Bassett cf283cf662 Fix migration to pull from the correct preference. (#246) 2020-01-10 19:52:02 +01:00
Justin Bassett f9dfc15ec6 Fix issue when we are on local wifi without local url. (#247) 2020-01-10 19:51:50 +01:00
Justin Bassett 3719a1ca84 Only show error screen if main url fails to load. (#245) 2020-01-10 19:51:33 +01:00
Justin Bassett 3a99f62363 Remove URLs and WiFi when logged out. (#248) 2020-01-10 19:50:34 +01:00
Justin Bassett dfb03e32e0
Open urls that are outside the application correctly. (#236) 2020-01-08 17:55:14 -05:00
Justin Bassett 5f54896057 Support Migrations (#224)
* Add instanceId to data layer.

* Support migrations.

* Formatting

* Make sure version is set.

* Validate migrations working.
2020-01-08 22:51:57 +01:00
Justin Bassett 5d02ec9bc6
Send device_id for HA versions above 0.104.0 (#234) 2020-01-08 15:49:38 -05:00
Justin Bassett 0ee9b29074
Add permissions for Camera and Audio. (#235) 2020-01-08 15:49:19 -05:00
Justin Bassett 2e8cfc9499 Fix integration registration overriding url. (#220) 2020-01-03 21:20:06 +01:00
Justin Bassett ffdc3c3750 Home Network Settings (#209)
* Url management now abstracted to new separate use case.

* Add preferences for URLS.

* Add wifi ssid check.

* Tests now passing!

* Now show error and bring to settings when can't connect.

* Fix PR comments.

* Home SSID tracking now working.
Also go to settings if refresh token fails.

* Fix test.

* isInternal is now optional, we can determine in the repository if needed.

* Rework preferences ordering and disable when not used.

* Extract strings.

* Add validation of URLs.

* Formatting.

* Fix tests.
2020-01-03 11:43:25 +01:00
Justin Bassett 8604f1548f Support remoteUiUrl from the mobile_app integration. (#195)
* Support remoteUiUrl from the mobile_app integration.

* Update testing for new URL methods.

* Respect request into repository.
2019-12-24 16:53:12 +01:00
Patrick Decat e2127a9f20 Upgrade from kotlin 1.3.50 to 1.3.60 to support Java 11 (eliminates 'package javax.annotation.processing does not exist' errors) (#204) 2019-12-24 07:44:08 -05:00
Justin Bassett d69de89110 Add link to companion documentation. (#200) 2019-12-23 20:26:09 +01:00
Justin Bassett e133946f1e Allow user certs imported into android to be accepted. (#194)
* Allow user certs imported into android to be accepted.

* Remove extra use android:usesCleartextTraffic
2019-12-23 13:50:23 +01:00
Justin Bassett ab602bca4f
Set minimum accuracy for location updates. (#181)
* Set minimum accuracy for location updates.

* Redo logic to try up to 5 times.
If we get a location that meets accuracy needs then stop updates.

* Lint fixes.
2019-12-22 13:12:40 -05:00
Justin Bassett 9d6f52fdce
Make sure mobile_app is required. (#188) 2019-12-22 13:12:11 -05:00
Oscar Stenqvist fdd71ceb55 Fix Dead end when entering invalid Home Assistant url during onboarding #105 (#182)
* Fix Dead end when entering invalid Home Assistant url during onboarding #105

* Rename strings & fix CI build error

* Refactoring & Go back to onBoarding first and then show error

* Fixing Build Lint Error

Co-authored-by: HIQOscarStenqvist <55279974+HIQOscarStenqvist@users.noreply.github.com>
2019-12-21 12:47:56 -05:00
Justin Bassett cc831095cc Add Lokalise info. (#183) 2019-12-20 22:40:25 +01:00
Justin Bassett 4f34a9b67f Only send the needed data on update registration. (#180) 2019-12-19 18:37:29 -08:00
Cedrick Flocon 424d24be4d The version code is stuck at 50 (#179) 2019-12-19 14:02:59 -05:00
Cedrick Flocon a9e6dfa214 Use git log to get the change log (#178) 2019-12-19 13:11:10 -05:00
Justin Bassett 715ca9e362 Allow editing of Device Name (#158)
* Migrate preference categories to string resource.
Disable lint for missing translations.

* We now can change the device name.

* Linting Fixes.

* Tests a functional, now to add new tests.

* Fix all the tests for real this time.
Fix clean task being in wrong group.

* Add tests for persisting device registration.

* Extract string, remove summary, use androidx preferences.

* Migrate to injection and constants for registration data that is build time.

* Use SimpleSummaryProvider.

* Revert global missing translation lint error.

* Disable MissingTranslation lint globally.
2019-12-19 16:40:26 +01:00
Bram Kragten 8fb596a75c Fix some styling (#163)
* Fix some styling

Because `colorControlNormal` was set to white, the underline of a inactive textbox would be white. Making it hard to see where to input text.

* Update naming

* Add background color to style

* Update color name
2019-12-19 10:07:22 +01:00
Paulus Schoutsen c5adce616a
Lokalise: Translations update (#175)
* Lokalise: update of app/src/main/res/values/strings.xml

* Lokalise: update of app/src/main/res/values-it/strings.xml

* Lokalise: update of app/src/main/res/values-lv/strings.xml

* Lokalise: update of app/src/main/res/values-nl-rNL/strings.xml

* Lokalise: update of app/src/main/res/values-pl-rPL/strings.xml

* Lokalise: update of app/src/main/res/values-ro/strings.xml
2019-12-19 10:04:54 +01:00
Daniel Shokouhi 5fa7d85895 Small typo (#169) 2019-12-17 15:34:46 -08:00
Cedrick Flocon e881e3b28b For now it's seem to be imposible to keep the state of the webview. let avoid auto recreate on configuration change (#160) 2019-12-17 09:18:10 +01:00
Bram Kragten 969548ad8c Add back Lokalise SDK (#161)
* Add back Lokalise SDK

Copy paste bug was fixed in beta 4.

* Lint
2019-12-16 11:42:04 -08:00
Cedrick Flocon 3d4b8ff499 improve style (#157) 2019-12-16 07:13:22 +01:00
Cedrick Flocon 7ee9dfee4d Url improvement (#156)
* Save url with string

* throw malformed http url exception if the url is not valid

* catch malformed http url exception
2019-12-16 07:07:06 +01:00
Paulus Schoutsen f44bb402ab Add github issue template 2019-12-16 07:04:53 +01:00
Grzegorz Matyszczak b8e4fae356 Remove buttonStyle from Theme.HomeAssistant. Set button style in manual setup fragment explicitly. (#155) 2019-12-15 20:52:43 +01:00
Justin Bassett 7a93113e18 Bugfix/disable location tracking (#152)
* When someone chooses not to track location,
honor that choice before a reboot.

* Add some logging.
2019-12-13 19:27:33 -08:00
Robbie Trencheny 42d380589f
Fix notification icon 2019-12-12 17:11:23 -08:00
Justin Bassett 20cc710490 Basic Notification Support (#140)
* Initial pass on notifications support

* Linting and Dep updates.

* Basic Notification Support complete.

* Fix onboarding flow and test compile issue.

* Fix unit tests

* Bump tool versions.

* All tests pass... Need to clean up still.

* Using correct mockk features.

* Using correct mockk features everywhere.

* More test fixes.
2019-12-12 09:17:26 -08:00
jobhh b8a9737d18 Location permission fixes (#135)
* Fixed bug where ACCESS_BACKGROUND_LOCATION was used below API level 29. Removed ACCESS_COARSE_LOCATION permission since it has no purpose when ACCESS_FINE_LOCATION is used.

* Added a more generic validatePermissions to PermissionManager and renamed haveLocationPermissions to hasLocationPermissions.
2019-12-12 17:34:58 +01:00
Paulus Schoutsen 149ec161f5
Update README.md 2019-12-12 15:47:12 +01:00
Justin Bassett 126b025e40 Add some error handling around getting zones from HA. Failing gracefully. (#142) 2019-12-12 15:11:26 +01:00
Robbie Trencheny 1bdf8d4664
Fix strings to fill untranslated ones with English. Fixes #137. 2019-12-11 15:07:54 -08:00
Robbie Trencheny c0b2c6d5dc
Update strings 2019-12-11 12:05:57 -08:00
Justin Bassett 594936c088 Feature/location settings (#129)
* Initial work on zone based location tracking.

* Tests and enhancements.

* Fix unit tests.

* Fix test cases.

* Initial location preferences work.

* Location settings now function will requests for permissions when needed.

* ktlink formatting.

* Domain tests.

* Data tests

* Extract strings into resources.

* Remove translations until Lokalise SDK is added back.
Failing lint

* Update wording.

* Add icons and toolbar.

* Coloring the settings.
2019-12-11 14:02:31 -06:00
Bram Kragten 0e515a8222 Remove Lokalise SDK (#120)
* Remove Lokalise SDK

* Lint
2019-12-06 08:23:37 -08:00
Justin Bassett a0c9974116 Fix vertical accuracy. (#116)
* Send 0 instead of null for vertical accuracy if we don't have real value.

* Remove nullable fields if they aren't nullable.
2019-12-05 15:11:30 -08:00
Florian Chauveau 96f548a914 fix #102 (#109) 2019-12-04 15:47:41 -05:00
Justin Bassett 2475aa15dd Fix double application registration. (#93) 2019-12-03 20:42:02 -05:00
Cedrick Flocon 29fb20f7e2
Update version name according to the tag (#88) 2019-12-03 23:28:46 +01:00
Cedrick Flocon eb953e789e
Add missing dependency (#87) 2019-12-03 22:47:47 +01:00
Robbie Trencheny 3bc7fdaa11 Add Lokalise SDK (#72)
* Add Lokalise SDK

* Add initial Lokalise strings
2019-12-03 21:56:53 +01:00
Justin Bassett 42ff5acf99 Device Tracking (#74)
* Initial work on requesting updates to location.

* Location now working in background too for Q+.

* Location now sent back to HA.
2019-12-03 19:19:30 +01:00