Commit graph

1425 commits

Author SHA1 Message Date
Justin Bassett 33ffe4a70c
Actionable Notifications (#332) 2020-02-02 22:50:28 -05:00
Neonicus 779b4ceff9
Fix Fullscreen for notch (#326)
* Fix Fullscreen for notch

Test if notch or not, if notch just hide nav bar

* Fix Fullscreen on screen with notch

* Fix Fullscreen for screen with notch

<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="27">shortEdges</item> 
Is for renders content into the cutout area in both portrait and landscape modes therefore useless since in case of a notch we just hide the navigation bar

* Fix Fullscreen for screen with notch

* Fix Fullscreen for screen with notch

* Fix Fullscreen fo screen with notch

* Fix Fullscreen for screen with notch
2020-01-30 08:19:00 -08:00
Daniel Shokouhi f7a63c085a
Update size of text (#321) 2020-01-29 20:57:15 -08:00
Justin Bassett 417461d4b5
Update Lokalise. (#318) 2020-01-29 16:24:34 -08:00
Robbie Trencheny 154b923929
Microphone is not required (#317)
* Microphone is not required

Fixes Play Store rejection

* Hardware, not software
2020-01-29 11:04:54 -08:00
Justin Bassett d56d64f81f Update translations. (#308) 2020-01-26 21:43:08 -08:00
Neonicus bc03c149e1 Add Fullscreen option (#304) 2020-01-26 19:47:51 -05:00
Justin Bassett a21f0fea72 Fixup the styling on the Widget configuration. (#291)
* Fixup the styling on the Widget configuration.

* Actually pull services and entites for Widgets.

* Sort lists.

* Linting.

* Make sure entity_id is optional.

* Lint
2020-01-24 11:21:31 -08:00
Justin Bassett 497843b686 Dependency updates and 'Ok' to 'OK' changes. (#301) 2020-01-24 11:13:52 -08:00
Justin Bassett d1a846a5f0
Revert "Add Fullscreen option (#293)" (#295)
This reverts commit 922be6f168.
2020-01-23 09:35:42 -05:00
neopilou 922be6f168 Add Fullscreen option (#293) 2020-01-23 08:52:57 -05:00
Justin Bassett ce719e9017 Make sure it's easy to tell which app is debug and which is production. (#290) 2020-01-22 22:36:02 -08:00
Justin Bassett baba03a757 Bugfix/crashlytics fixes (#289)
* Add null checks for HomeAssistantSearcher.
https://github.com/home-assistant/home-assistant-android/issues/288

* Make sure to catch the error if we can't update the device name.
https://github.com/home-assistant/home-assistant-android/issues/287

* Show error before we pop back on the stack.
https://github.com/home-assistant/home-assistant-android/issues/286

* Make sure to catch exceptions and show error before poping stacks.
https://github.com/home-assistant/home-assistant-android/issues/285
https://github.com/home-assistant/home-assistant-android/issues/286

* Linting
2020-01-22 18:45:30 -08:00
Justin Bassett e6d5b5825b Request we be exempt from Doze. (#273)
* Request we be exempt from Doze.

* Add an integration screen.

* Toggles now default based on requesting permissions.
2020-01-22 16:22:17 -08:00
Kevin T. Berstene 9f5a61b0ce Basic widget functionality added (#212)
* Basic widget functionality added

* Requested Fixes: 4 of 6 completed

* Changed widget to be responsive and have a light icon instead of a generic Home Assistant icon

* Fixed issue with latest rebase from upstream master

* Restricted label text to a single line

* Created repository and use case for widget data storage

* Fixed indentation

* Fix for Oreo and later Broadcast Intent restrictions

* Added negative feedback for widget.  Wrapped try blockaround only the relevant commands.

* Removed defunct preferences utilities file

* Removed unnecessary try catch block

* Fixed issue where layout would reset upon screen rotation after activating the widget.

* Moved widget storage logic to repository as requested

* Added multiple widget icons with a drop down menu in the configuration activity.
Added labels to configuration activity.
Made configuration activity scrollable.

* Changed widget feedback to be more immediate and clear.  Changed color of positive feedback.

* Changed callService HashMap to match Integration Repository

* Added testing for Integration callService method

* Changed how icons are stored so regeneration of resources will not randomize the stored icons

* Added basic WidgetUseCaseImpl tests

* Privatized localStorage access in WidgetRepositorImpl, removing it from the WidgetRepository interface
2020-01-22 14:55:51 -08:00
Justin Bassett 195bc9601c Reload UI url more proactively (#275)
* Reload UI if the base url has changed.
AKA changed from remote/local.

* Linting.

* Now we don't rebuild dagger every time we change urls.
Need to fix tests.

* Test and comment.
2020-01-19 13:51:10 -08:00
Justin Bassett cc241e18bc Add the ability to debug on same device as production application. (#271)
* Add the ability to debug on same device as production application.

* Update mock-google-services.json for debug version.
2020-01-18 16:10:11 -08:00
Justin Bassett 1219767ef4 Stop the app from opening browser when logging out. (#274)
* Stop the app from opening browser when logging out.

* Formatting.
2020-01-18 16:08:41 -08:00
Justin Bassett 672a80e773
Fix get theme because of missing fields in DTO. (#270) 2020-01-17 19:15:26 -05:00
Justin Bassett bda966b270
Status Bar Color Match Theme (#268) 2020-01-17 18:33:27 -05:00
Justin Bassett 5db4b2d501
Automatic discovery of HA on local network. (#255) 2020-01-17 18:32:47 -05:00
neopilou 21e038bd2b Android TV Support (#264) 2020-01-16 15:48:32 -05:00
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 3719a1ca84 Only show error screen if main url fails to load. (#245) 2020-01-10 19:51:33 +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 0ee9b29074
Add permissions for Camera and Audio. (#235) 2020-01-08 15:49:19 -05: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
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 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
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
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
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
Marcio Granzotto Rodrigues 7d7fc0bd6e Code formatting and linter (#73)
* add ktlint to the project

* Auto format and fix linter issues

* Add Quality section to README
2019-12-01 09:05:37 +01:00
Cedrick Flocon 47d5c64b5b
Url add hint Example and trim url query parameters and segment (#66) 2019-11-25 19:06:01 +01:00
Cedrick Flocon f222f18465
Display a dialog on javascript confirm (#57) 2019-11-25 18:02:11 +01:00
Bradley Nelson fd4e855285 Error Message on URL Parse Exception (#36)
* Show message on manual url parse error
2019-11-24 23:14:46 +01:00
Cedrick Flocon 09ccc4893d
add group to firebase app distribution (#62) 2019-11-24 19:08:20 +01:00
Cedrick Flocon 433ead291d Logout (#49)
* Logout the use when revokeExternalAuth is called

* callback even if onGetExternalAuth failed

* Add http log

* Open on boarding activity when logout

* fix revoke token field name
2019-11-22 08:30:29 -08:00
Cedrick Flocon 961ecaeb7a
Crashlytics Setup (#33)
* Setup crashlytics

* Fix possible crash when trying to retrieve external authentication
2019-11-19 11:52:55 +01:00
Justin Bassett ea56328a52 Initial work on integrating the mobile_app component. (#25)
* Initial work on integrating the mobile_app component.

* Tests because even if I don't like to write them, I probably should.

* Remove unused dependency for now.

* Fix view related PR comments, migrate to view flipper to make more
consistent with other UI.

* Migrate from error handling at Repository to Presenter for Integration.

* Extract register device data class.

* Extract the mapping of DeviceRegistration to RegisterDeviceRequest.

* Extract ensuring we have a valid, refreshed session.

* Unique localStorage per usage to avoid name collision.
2019-11-15 07:59:41 +01:00
Timmo 24e7999777 Add vibration support (#21) 2019-11-10 22:14:46 +01:00
Cedrick Flocon 3219504a12 [ARCHITECTURE] Let's do some quality (#15)
* extract dependencies

* Update test command and add lint

* Move Retrofit into data module and test authentication service

* Implement authorization repository

* Implementation authentication usecase

* Implementation presenter layer

* Remove old session stuff

* Java time backport

* Dependency with dagger
2019-11-10 13:07:38 -08:00
Florian Gareis 4789d7283f Fix round icon background color (#22) 2019-11-10 11:06:11 +01:00
Bradley Nelson c6f0a49886 Added Adaptive Icons (#17)
* Added Adaptive Icons

* Removed ldpi and mdpi and other changes

* Delete ic_launcher_background.xml
2019-11-09 22:42:50 +01:00
Cedrick Flocon 1ec669db9d [PLAYSTORE] release to playstore (#13)
* change package name

* Use gradle to publish on the store
2019-11-04 15:51:29 -08:00
Cedrick Flocon 3dca2c9704 [CI] Travis with Firebase App Distribution (#11)
* Setup travis ci with Firebase App Distribution

* Encrypt google-services.json and serviceCredentialsFile.json into a tar
2019-11-03 11:33:56 -08:00
Cedrick Flocon e54311ec21 Alpha application (#4)
* Update gitignore

* Remove idea file

* Remove fcm

* Remove test folder

* Clear resources

* Create onboarding activity

* Discovery fragment

* Manual setup fragment

* Authentication fragment

* WebView Activity

* Handle back press

* Save session

* refresh token

* Settings activity

* Clear read me

* Use JSONObject to serialize json.
Check token each time the frontend hit getExternalAuth
Use Android client id
2019-11-02 06:38:40 -07:00
Cedrick Flocon 5cf20a56d2 Cleanup (#3)
* Delete unused icon

* Cleanup build gradle

* Update all dependencies

* Retro compatibility to lollipop

* Cleanup the main activity
2019-10-25 09:53:40 -07:00
Robbie Trencheny aed98be0c5
Initial commit 2019-04-01 22:52:08 -07:00