Commit graph

1425 commits

Author SHA1 Message Date
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
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
Justin Bassett d747afd37c
Disable minimal publishing. (#699)
* Disable minimal publishing.

* Linting.
2020-08-03 16:45:14 -04:00
Colin Cachia 6da051b020
Adding ability to display static entity widget in launcher (#687)
* Adding ability to display static entity widget in launcher

* Code review changes
2020-08-03 16:27:52 -04:00
Home Assistant Bot e1c9c2175b
Lokalise: updates (#697) 2020-08-02 14:47:40 -04:00
Justin Bassett f64fbafd38
Disable Sentry.io for debug builds. (#696) 2020-08-02 14:40:44 -04:00
Justin Bassett fbf53314ea
Request accurate location when we update sensors. (#692) 2020-08-02 14:37:25 -04:00
Justin Bassett 9c3635df29
Ensure the correct class is used for broadcast of location updates. (#695) 2020-08-02 14:34:04 -04:00
Justin Bassett 46661d4518
Fix location tracking (#691)
* Fix location tracking.

* Fix requesting accurate location.
2020-08-01 20:49:10 -04:00
Justin Bassett b2fd541c9c
Migrate to Sentry and remove Crashlytics (#686) 2020-08-01 09:36:37 -04:00
Justin Bassett bf29174a4a
Minimal Android Flavor (#682)
* Initial rip out of most of the Googley stuff.

* Lokalise plugin and dependencies removed.
They would be more useful if we had a large app with many translations.  However, with most of our UI being a PWA the usefulness of it is very limited.

* Both apps now build.... Yay

* Formatting.

* Tests and checks pass.

* Make sure Github Actions are up to date.

* Fix more unit tests.

* ktLint

* Use config class for gradle dependencies.
2020-07-31 07:46:54 -04:00
Justin Bassett f468ecefdc
Bugfix/various fixes (#674) 2020-07-20 21:59:07 -07:00
Justin Bassett 16073dccbf
Allow the firebase instance id be optional. (#673)
This is discouraged but helpful for contributors.  This way we don't need everyone to setup firebase just to help on the app.
2020-07-20 09:13:14 -04:00
Justin Bassett 359bcefef4
Ensure we have permissions before trying to get Wifi data (#669) 2020-07-14 21:49:38 -07:00
Justin Bassett 00324f0747
Fix translation. (#668)
When lokalise integration was down this got missed.
2020-07-13 17:37:21 -04:00
Justin Bassett a99f9ebccc
Only update registration when we are actually connected to HA. (#663)
* Only update registration when we are actually connected to HA.
Various lint warnings.

* Fix ktlint.
2020-07-13 09:25:54 -04:00
Justin Bassett 5ec2efd007
Ensure sensors only start when we are actually logged in. (#662) 2020-07-13 09:16:24 -04:00
Justin Bassett cc70c1a6ac
Ensure thread safety around NsdManager. (#664) 2020-07-13 09:09:56 -04:00
chriss158 a7a46787ef
Fix widget service calls with numbers (#640) (#650)
* Widget service calls will fail, if a number for any field is used.
Because the GSON parser will parse every integer to a double.
This is especially a problem on the service alarm_control_panel.alarm_disarm
which needs a code to disarm the alarm panel.
So every code will be converted to .0 (eg. 1234 would be 1234.0)
Solution: Use Jackson instead of gson
GSON problem described here (not fixed):
https://github.com/google/gson/issues/1084
2020-07-07 15:58:51 -04:00
Neonicus 50d80413ce
Authentication Dialog Enhancement (#633)
* Authentication Dialog Enhancement

* Add "Remember" checkbox

* Add button for password visibility
2020-07-07 15:50:37 -04:00
Home Assistant Bot f419fca874
Lokalise: updates (#657) 2020-07-07 15:09:43 -04:00
Justin Bassett a455afd8a6
Update Production Release Steps. (#655)
Make it all automated!
2020-07-05 22:27:03 -04:00
Justin Bassett ad64855220
First attempt at CI action (#652)
* First attempt at CI action

* Split lints and test steps.

* Only run validate job on PR.

* First attempt at beta deploy via Github Actions

* Try to archive a debug version of application.

* Use static version of NDK.

* Add ENV variables to building the release.

* Ensure all secrets are used!

* Attempt to publish feature branch.

* Make sure all files are in place first.

* Ensure keystore is still accessible during deployment.

* Update README.md for the lack of automation for now.
2020-07-05 17:48:00 -04:00
Justin Bassett 949a826e15
Hot fix removing authentication from settings. (#651)
Was causing crashes.
2020-07-05 10:51:04 -04:00
Neonicus 756556046a
Fix Biometric Unlock & Enhancement (#625)
* Fix Biometric Unlock
* Add Prompt Unlock function directly in WebViewActivity
* Added session timeout in app settings
* App is locked when resumed (after session timed out)
* When the application is locked, the screen is blurred (no quite obnoxious splash screen to look at), which allows the HA frontend to be loaded before or during unlocking
* No button needs to be touched for unlock
* When the unlock prompt is displayed, the back button close the app
* Fix issues #555 and #587
2020-07-05 10:09:17 -04:00
Home Assistant Bot d234ec13e3
Lokalise: updates (#648) 2020-07-04 19:44:33 -04:00
chriss158 eca7b5779f
Fix left empty notifications groups (#643)
* Fix left empty notifications groups

* If user clicked on a notification and this notification was in group, the left empty notification group was not deleted.
* If the notification ran into timeout and therefore was deleted and the notification was in group, the left empty notification group was not deleted.
* If a notification with a tag and a group is used and the user decides to remove the group from notification (using the same tag property), the left empty notification group was not deleted.

* Use NotificationManagerCompat instead of NotificationManager

* To be more compatible, use NotificationManagerCompat all over

* Refactored two openUri call and delete dead handleIntent method

* Fix not working clickAction

* Because of missing cancel current, the clickAction used a false intent
2020-07-04 19:22:53 -04:00
Neonicus 73a0934de3
ShowError Enhancement (#637)
- Fix issue #528
- ShowError now show detailed SSL error
- ShowError now show error description of onReceivedError()
2020-06-21 20:48:41 -04:00
Neonicus 31ecdb7ada
Fix Orientation Change (#636)
- Fix issue #537
- Fix screen orientation change in OnboardingActivity (Discovery fragment, Manual fragment, Authentication fragment & Integration fragment included)
2020-06-18 15:20:24 -04:00
chriss158 e16bc38a74
Additional notification group fixes (#635)
* If only the group and the notification inside should be canceled, then the whole group gets now canceled,
instead of first cancel the notification and then the group. If the group is canceled, all notification inside of the group gets canceled.
With this logic we save one call of cancel method.
2020-06-18 15:10:40 -04:00
Neonicus c352fbce5f
Add CookieManager (#629)
* Add CookieManager

CookieManager added to accept cookies in Webview

Fix #548

* Replace CookieManager by cookieManager

Replace "CookieManager.getInstance().setAcceptThirdPartyCookies(webView, true)" by " cookieManager.setAcceptThirdPartyCookies(webView, true)"
2020-06-18 13:03:52 -04:00
chriss158 18c978b826
Fix notification groups (#627)
* Fix notification groups

* Fixed empty notification group left, if all notification in groups are deleted

* Fixed not working notification grouping, if same tag and group are used before or in same message
2020-06-16 15:22:55 -04:00
Justin Bassett b191334309
Update crashlytics. (#624) 2020-06-11 20:49:30 -04:00
Home Assistant Bot fe789b47e2
Lokalise: updates (#623) 2020-06-11 15:55:46 -04:00
Justin Bassett 247cef3c72
Fix lint issues (#618)
* Increase tool version, enable linting again.

* Fix lint errors.

* Ensure ktlint is working.

* Use correct build tools in travis.
2020-06-11 13:15:50 -04:00
Justin Bassett 0f92172fee
Fix build. (#617) 2020-06-10 16:28:09 -04:00
Tim f87ed32560
Feature/switch to kotlin dsl (#595)
* Switch to using Kotlin in of groovy for the gradle configurations.

* Gradle file cleanup.

* Switch to using Kotlin in of groovy for the gradle configurations.

* Gradle file cleanup.

* Retrofit (and maybe others libs) requires java compile options 1.8, still backwards compatible.

* Prep for release 1.9.0-XXX

* Fix ktLint errors.
2020-06-10 15:16:11 -04:00
hasenbolle 0b0670a04e
Notification improvements (HTML formatting, Grouping, Subject, led color, vibration pattern, persistant, timeout, importance, clickAction rel link fix) (#612)
* Notification improvements

* Renamed property priority to importance, ttl to timeout

* Rename "Default channel" to "General" (#593)

* Set led color for notification (#422)

* Set vibration pattern for notification (#357)

* Set persistent for notification (#403)

* Fix ClickAction with relative Lovelace Link not working (#605, #486)

* Rename notification icon property to icon_url
2020-06-10 15:08:47 -04:00
Neonicus 69453ac6a7
Fix Keyboard in Fullscreen mode with Notch (#613)
Fix "White box appears when keyboard is displayed" in fullscreen mode with notch screen
2020-06-09 20:51:44 -04:00
Justin Bassett f42ab8fa98
Prep for release 1.9.0-XXX (#584) 2020-05-08 10:17:59 -04:00
Aidan Timson 54aa95b0e4
Disable setting if get_panels is not available or fails (#578)
* Disable setting if get_panels is not avaliable or fails

* Unused import
2020-05-04 13:54:16 -04:00
CraftyKoala f2f07b025b
Implementing Android notification channels (#574)
* Implemented a quick solution to utilize channels on android to differentiate notifications.

* Implemented removing of notification channel. Restructured onMessageReceived.
2020-05-04 10:12:05 -04:00
Justin Bassett 8ec9de74eb
Fix crashes that last shortcuts caused. (#576)
* Catch the exceptions because panels call doesn't exists yet.
2020-05-04 10:09:53 -04:00
Aidan Timson d9cd0f502b
Add Panel Shortcuts (#562)
* Add Panel Shortcuts

* Remove unused imports

* Lint

* Cleanup

* Use localised strings for title

* Cleanup logs

* Fix strings

* Change map logic

* Move to connection-status

* Move logic for pinned shortcuts to new activity

* lint

* Reset strings formatting

* Lint

* lint

* Lint

* Remove activity for second fragment and move into directory

* Lint

* Lint

* Lint

* Lexographic
2020-05-04 09:38:39 -04:00
Justin Bassett e28d0fee62
Bugfix/various (#546)
* Catch geocode sensor crashes.

* Remove battery from location sensor.
2020-04-03 08:24:56 -07:00
James Yox 825dd78f1e
Added ChargingBroadcastReceiver which can instantly update plugged in… (#525)
* Added ChargingBroadcastReceiver which can instantly update plugged in status

* Couple formatting changes noticed after pushing. Will squash this message

* Addressed PR Comments

* More PR comments!

* Pulled out logic into SensorUpdater

* Couple thigns I noticed after pushing... because of course I did.

* Removed unnecessary Binds
2020-03-29 14:23:11 -04:00
Jeroen Seegers 4a9c6f0283
Add a seperate battery_state sensor (#530)
* Remove Battery State related information from Battery Level

* Extract determining battery icon to own method

* Update battery icon method with new parameters

* Add second battery sensor, Battery State

* Calculate battery percentage in own method
2020-03-29 08:16:05 -04:00
Justin Bassett f6618527d4
Geocoded Location Fixes (#516)
* Ensure we don't return location in background if not requested.

* Add minimum accuracy to geocoded address.
2020-03-13 22:06:08 -07:00
Justin Bassett 4eae12a586
Make sure sticky settings honored. (#517) 2020-03-13 22:05:37 -07:00
Neonicus ed58752a09
Add Lock/Unlock App with biometric or screenlock credentials (#484) 2020-03-07 08:08:15 -05:00
Tim 43f50f94c7
Add support for additional input triggers for adding ssids. A button has been added and clicking save with a none empty input field will also add the ssid to the list. (#502) 2020-03-06 18:44:32 -05:00
Kevin T. Berstene ecd2af4304
Changed permissions request screen during setup to be scrollable (#500) 2020-03-06 18:41:54 -05:00
Paulus Schoutsen e1d49cbbab
Use same flags for actions as clickAction. (#499) 2020-03-04 19:59:48 -08:00
Justin Bassett 0d829bf451
Fullscreen Video Fix (#491)
Fix for small video size from "Developer Tools> States" when PiP is expanded (back in app)
2020-03-04 13:28:32 -05:00
Justin Bassett 75f9d1e47c
Fullscreen & Keyboard Fix (#492)
Fix fullscreen when virtual keyboard is show
2020-03-04 13:22:45 -05:00
Justin Bassett 5f1c72586b
Support for multiple ssids. (#485)
* Support for multiple ssids.

* Implementation of requested changes.

* Implementation of the official way of showing a custom preference dialog.
2020-03-04 13:16:13 -05:00
Justin Bassett 0302654641
Bump Release Version (#478) 2020-02-26 17:22:14 -05:00
Justin Bassett 1591109dc7
Geocode Sensor. (#476) 2020-02-26 11:19:52 -08:00
Justin Bassett 8a04013cb6
Ensure on click works when sticky is true. (#477) 2020-02-26 11:18:32 -08:00
Neonicus 8d630d31bc
Add fullscreen support for videos & PIP mode (#471)
* Enable Fullscreen Video & Add PIP

Enable fullscreen video
Add PIP

* Enable Fullscreen Video & Add PIP

Enable fullscreen video
Add PIP

* Enable Fullscreen Video & Add PIP

Change from "26" to "Build.VERSION_CODES.O" in onUserLeaveHint()
2020-02-25 20:09:09 -05:00
Home Assistant Bot d344fb5ef6
Lokalise updates (#468) 2020-02-23 20:28:56 -05:00
Justin Bassett a3e59f204a
Fix build. (#469) 2020-02-23 20:28:31 -05:00
Justin Bassett c630e24ace
Ensure we re-register sensors if we can't update them. (#462) 2020-02-23 18:34:00 -05:00
Justin Bassett a5b5e374d5
Feature/notifications updates (#461)
* Support relative URLs for notifications.
Images, clickAction, and actions URI now support relative to HA urls.

* Add authentication support for relative urls.

* Fix issue with tag causing notifications to not cancel.

* Ensure requestCode is unique.
2020-02-23 18:28:38 -05:00
Justin Bassett e540e1df9c
Add better handling for slow connections. (#455)
* Add better handling for slow connections.

* Add ability to auto close alert on connection.

* Fix linting.

* Only cancel alert if we actually connect.
2020-02-23 18:28:07 -05:00
Justin Bassett 652ac084ff
Better handling of action events. (#456)
* Better handling of action events.
Show toast when we fail to send event and keep notification so you can
retry.

* Extract message string.

* Updated error toast message.
2020-02-23 14:21:08 -08:00
Justin Bassett f5c954b814
Allow front end to force credential refresh. (#457) 2020-02-22 21:13:27 -08:00
Kevin T. Berstene d4cc8d367d
Added ability for widget service calls to contain lists. (#443) 2020-02-21 07:30:29 -05:00
Tim ae167560f3
Prevent the dialog from showing when the state of the activity/fragment has already passed onSavedInstanceState. (#450)
* Prevent the dialog from showing when the state of the activity/fragment has already passed onSavedInstanceState.

* Fix ktlint errors.
2020-02-21 07:27:50 -05:00
Justin Bassett 03096668e2
Really fix firebase release notes location (#424) 2020-02-13 22:05:28 -05:00
Justin Bassett 03478310c0
Build/Release Changes (#423)
* Fix app version in settings.

* Dependency Upgrades

* Enable beta -> production promotion via tag in Travis.

* Fix firebase release notes location.

* Add some logging around what we are building.

* TRAVIS_PULL_REQUEST is a number or false....
2020-02-13 21:44:28 -05:00
Robbie Trencheny fb39094210
Bump version 2020-02-13 15:51:01 -08:00
Robbie Trencheny 4e446fb318
Update strings 2020-02-13 15:50:51 -08:00
Justin Bassett 465f7153db
Squash bugs (#416)
* Alert when SSL error happens during onboarding.

* Remove 'ok' string and use android default.

* Remove 'ok' string and use android default.
Fixes: https://github.com/home-assistant/home-assistant-android/issues/323

* Use androidx Alert in AuthenticationFragment.

* Linting.

* Ensure we only optimize devices that can.
2020-02-13 11:21:42 -08:00
Justin Bassett 6657a5c3b7
Feature/new release flow (#413)
* Test automatic deploy to play store.

* New release flow with Google Play Beta Support
2020-02-13 11:35:51 -05:00
Kevin T. Berstene e82a6cc9e3
Added catch blocks for bad custom component service data responses (#407) 2020-02-13 01:22:11 -05:00
Kevin T. Berstene 4f6b93ea4c
Reworked widget appearance and added resizability. (#401) 2020-02-13 00:58:48 -05:00
shbatm d00e75387f
Allow expandable notifications for long text messages. (#393) 2020-02-12 16:31:52 -05:00
Justin Bassett bbe9d469e7
Ensure activity isn't finishing when showing errors. (#380) 2020-02-11 20:45:13 -05:00
Kevin T. Berstene 21de26d435
Handle bad service json (#377) 2020-02-11 20:01:27 -05:00
Justin Bassett 0fa443a4fa
Remove quotes from wifi ssid and add '<not connected>' (#371)
* Remove quotes from wifi ssid and add '<not connected>'

* Linting.
2020-02-11 08:55:07 -08:00
Justin Bassett 427226bd23
Fix regression with notification actions. (#376) 2020-02-11 08:36:30 -08:00
Justin Bassett aacb4ea605
Sensor Support (#336) 2020-02-10 23:49:39 -05:00
Justin Bassett 6030aaa8fc
Multiple Notification Options (#356) 2020-02-10 22:14:16 -05:00
Kevin T. Berstene 876914a918
Added all as an available entity_id for autocompletion (#364) 2020-02-10 22:13:55 -05:00
quthla 5a7b49a7a0
Enable receiving broadcast to update location (#355) 2020-02-10 08:08:01 -05:00
Neonicus 4deffd108a
Add Authentication Dialog for iFrames (#351) 2020-02-09 08:12:40 -05:00
Kevin T. Berstene 2283042393
Added dynamic auto-complete fields for widget configuration (#339) 2020-02-07 20:47:26 -05:00
Justin Bassett 447cd635dd
Lokalise Update. (#346) 2020-02-07 00:11:55 -05:00
Justin Bassett 5113a0ed96
Add support for images and actions no matter what the app is doing. (#341) 2020-02-06 22:02:41 -05:00
Jörg Thalheim 48dd9192bb
implement request_location_update via push notifications (#333) 2020-02-04 09:31:26 -05:00
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