Skip to content

Commit d7b035c

Browse files
mbalfour-amzndependabot[bot]juaneslucerocgalvanwadhawh
authored
Updated demo app to use latest APIs (#90)
* Bump rexml from 3.3.3 to 3.3.6 Bumps [rexml](https://github.com/ruby/rexml) from 3.3.3 to 3.3.6. - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](ruby/rexml@v3.3.3...v3.3.6) --- updated-dependencies: - dependency-name: rexml dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump micromatch from 4.0.7 to 4.0.8 in /scripts/translation-script Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8. - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md) - [Commits](micromatch/micromatch@4.0.7...4.0.8) --- updated-dependencies: - dependency-name: micromatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump axios from 1.7.2 to 1.7.7 in /scripts/translation-script Bumps [axios](https://github.com/axios/axios) from 1.7.2 to 1.7.7. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.7.2...v1.7.7) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Updated to use upload-artifacts/v4 (#82) * Bump serve-static from 1.15.0 to 1.16.2 in /scripts/translation-script (#81) Bumps [serve-static](https://github.com/expressjs/serve-static) from 1.15.0 to 1.16.2. - [Release notes](https://github.com/expressjs/serve-static/releases) - [Changelog](https://github.com/expressjs/serve-static/blob/v1.16.2/HISTORY.md) - [Commits](expressjs/serve-static@v1.15.0...v1.16.2) --- updated-dependencies: - dependency-name: serve-static dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump cookie and aws-amplify in /scripts/translation-script Removes [cookie](https://github.com/jshttp/cookie). It's no longer used after updating ancestor dependency [aws-amplify](https://github.com/aws-amplify/amplify-js). These dependencies need to be updated together. Removes `cookie` Updates `aws-amplify` from 5.3.19 to 6.6.6 - [Release notes](https://github.com/aws-amplify/amplify-js/releases) - [Commits](https://github.com/aws-amplify/amplify-js/compare/[email protected]@6.6.6) --- updated-dependencies: - dependency-name: cookie dependency-type: indirect - dependency-name: aws-amplify dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * [ALS-1806] Removed amplify libraries, updated dependencies, and added/modified unit and E2E test cases (#84) * build: SDK versions and dependencies update * refactor: Remove amplify dependency from the demo app and related code updated test: Unit test cases added for fetch token and refresh token test: Existing test cases updated for amplify removal change ALS-1806 * Merge branch 'refs/heads/main' into ALS-1806 # Conflicts: # app/build.gradle # app/src/main/AndroidManifest.xml # app/src/main/java/com/aws/amazonlocation/ui/main/MainActivity.kt # app/src/main/java/com/aws/amazonlocation/ui/main/explore/ExploreFragment.kt # app/src/main/java/com/aws/amazonlocation/ui/main/setting/AWSCloudInformationFragment.kt # app/src/main/java/com/aws/amazonlocation/ui/main/setting/SettingFragment.kt # app/src/main/java/com/aws/amazonlocation/ui/main/tracking/TrackingUtils.kt # app/src/main/java/com/aws/amazonlocation/utils/MapHelper.kt # app/src/test/java/com/aws/amazonlocation/mock/Responses.kt # build.gradle # gradle.properties # gradle/wrapper/gradle-wrapper.properties # jacoco.gradle * fix: location engine initalization change with fused location ALS-1806 * fix: removed java home from gradle.properties ALS-1806 * fix: tablet design updated for web view sign in fix: E2E test cases updated ALS-1806 * refactor: Removed pinpoint/analytics from app ALS-1806 * fix: workflow fixed for distribution ALS-1806 * refactor: Removed pinpoint/analytics from the app ALS-1806 * fix: removed unused variables ALS-1806 * fix: Simulation restart and from grab map simulation start bug fixed fix: Sign in fail bug fix ALS-1806 * fix: Open data Map style selection with Ca-Central Stack bug fix fix: Grab data map style selection from Southeast Asia Stack bug fix ALS-1806 * fix: Node js version update for workflow ALS-1806 * fix: Disconnection from settings bug fix ALS-1806 * fix: Gemfile updated for github workflow ALS-1806 * fix: Gemfile updated for github workflow ALS-1806 * fix: Gemfile updated for github workflow ALS-1806 * fix: update ruby version for github workflow ALS-1806 * fix: update ruby version for github workflow ALS-1806 * fix: update ruby version for github workflow ALS-1806 * fix: update ruby version for github workflow ALS-1806 * fix: update ruby version for github workflow ALS-1806 * fix: update ruby version for github workflow ALS-1806 * fix: auth credentials refresh from interceptor fix ALS-1806 * fix: map style clear filter selection bug fix ALS-1806 * fix: POI card open on geofence tab bug fix ALS-1806 * fix: E2E test suits renamed fix: ktlint disable commands removed all over the app fix: Few grammatical mistakes addressed and methods renamed fix: unit test cases lat, lng fixes ALS-1806 * fix: rights label updated ALS-1806 * refactor: Added pinpoint with aws kotlin SDK ALS-1869 * fix: session stop and end event fixed ALS-1869 * fix: Unit test case fix and comment updated on basis of that ALS-1806 * fix: test case method and strings renamed and lat and lng position issue solved ALS-1806 --------- Co-authored-by: shah <[email protected]> * feat: V2 sdk implemented for map, place and routes with unit and E2E tests fix: unit and E2E test cases updated ALS-1808 * test: E2E test cases added for V2 map political view refactor : Unused files removed and strings file updated ALS-1808 * test: E2E test cases update ALS-1808 * fix: ap-southeast region removed fix: PAK country removed from political view test: Unit test cases updated ALS-1808 * fix: README file updated fix: Geofence screen bug fixes fix: E2E test cases renamed ALS-1808 * fix: search direction text cutting bug fix and back press in map style bug fix ALS-1808 * fix: region selection and Webview first time not loading fixes ALS-1808 * fix: code optimization ALS-1808 * fix: code optimization ALS-1808 * fix: code optimization ALS-1808 * fix: code optimization ALS-1808 * fix: cty name not showing and toggle disable for satellite and hybrid map fix ALS-1808 * fix: simulation and suggest fixes ALS-1808 * fix: simulation arabic fixes ALS-1808 * Bump rexml from 3.3.7 to 3.3.9 Bumps [rexml](https://github.com/ruby/rexml) from 3.3.7 to 3.3.9. - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](ruby/rexml@v3.3.7...v3.3.9) --- updated-dependencies: - dependency-name: rexml dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * fix: removed unnecessary code to change map style ALS-1808 * fix: dialog show fix ALS-1808 * fix: routes and places sdk upload ALS-1808 * fix: routes and places sdk upload ALS-1808 * fix: PR comment fixes ALS-1808 * Switched to use public version of GeoPlaces and GeoRoutes. --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Mike Balfour <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juan Lucero <[email protected]> Co-authored-by: Chris Galvan <[email protected]> Co-authored-by: wadhawh <[email protected]> Co-authored-by: shah <[email protected]>
1 parent 627ed57 commit d7b035c

File tree

288 files changed

+9612
-32137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

288 files changed

+9612
-32137
lines changed

.github/workflows/build-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ concurrency:
55
on:
66
workflow_dispatch:
77
push:
8-
branches: [ develop, main, master ]
8+
branches: [ develop, main ]
99
jobs:
1010
startSlackNotification:
1111
name: Slack Starting Notification

.github/workflows/test-android-e2e.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ jobs:
4646
profile: Nexus 6
4747
script: |
4848
adb emu geo fix 72.58727 23.02579
49-
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite
50-
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite2
49+
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.MapLoadAndPlaceSearchFlowSuite
50+
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.SearchDirectionFlowSuite
51+
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.MapStylesSettingAndExplorerFlowSuite
5152
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSTrackingAndConnectionTestSuite
5253
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSGeofenceAndConnectionTestSuite
5354

README.md

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ To use this code, you'll need an [AWS account](https://aws.amazon.com/) and reso
77

88
Once configured, you can build and run the app locally or execute automated tests. The project includes unit and end-to-end UI tests.
99

10-
The app supports multiple map styles and providers like [Esri](https://docs.aws.amazon.com/location/latest/developerguide/esri.html), [HERE Technologies](https://docs.aws.amazon.com/location/latest/developerguide/HERE.html), [GrabMaps](https://docs.aws.amazon.com/location/latest/developerguide/grab.html), and [Open Data](https://docs.aws.amazon.com/location/latest/developerguide/open-data.html).
10+
The app supports the following map styles: `Standard`, `Monochrome`, `Hybrid` and `Satellite`
1111

1212
Overall, this repo will help you get started with location-based features on Android using Amazon Location Services.
1313

@@ -29,14 +29,11 @@ Below are the requirements for development, running and testing.
2929
- `PinPointAppId` value will be added to `custom.properties` file against `ANALYTICS_APP_ID`.
3030
- `WebSocketUrl` value will be added to `custom.properties` file against `SIMULATION_WEB_SOCKET_URL`.
3131
- Take region from IdentityPoolId (Character before ':') that value will be added to `custom.properties` file against `DEFAULT_REGION`.
32-
3. Run the [AWS CloudFormation template](https://ap-southeast-1.console.aws.amazon.com/cloudformation/home?region=ap-southeast-1#/stacks/create?stackName=amazon-location-default-unauth-resources&templateURL=https://amazon-location-demo-resources.s3.us-west-2.amazonaws.com/default-unauth-resources-template.yaml) or use the template from `/extra/default-unauth-resources-template.yaml` to create a cloudformation stack on AWS in `ap-southeast-1` region and get `IdentityPoolId`, `WebSocketUrl` from stack output's tab.
33-
- `IdentityPoolId` value will be added to `custom.properties` file against `DEFAULT_IDENTITY_POOL_ID_AP`.
34-
- `WebSocketUrl` value will be added to `custom.properties` file against `SIMULATION_WEB_SOCKET_URL_AP`.
35-
4. Run the [AWS CloudFormation template](https://eu-west-1.console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create?stackName=amazon-location-default-unauth-resources&templateURL=https://amazon-location-demo-resources.s3.us-west-2.amazonaws.com/default-unauth-resources-template.yaml) or use the template from `/extra/default-unauth-resources-template.yaml` to create a cloudformation stack on AWS in `eu-west-1` region and get `IdentityPoolId`, `WebSocketUrl` from stack output's tab.
32+
3. Run the [AWS CloudFormation template](https://eu-west-1.console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create?stackName=amazon-location-default-unauth-resources&templateURL=https://amazon-location-demo-resources.s3.us-west-2.amazonaws.com/default-unauth-resources-template.yaml) or use the template from `/extra/default-unauth-resources-template.yaml` to create a cloudformation stack on AWS in `eu-west-1` region and get `IdentityPoolId`, `WebSocketUrl` from stack output's tab.
3633
- `IdentityPoolId` value will be added to `custom.properties` file against `DEFAULT_IDENTITY_POOL_ID_EU`.
3734
- `WebSocketUrl` value will be added to `custom.properties` file against `SIMULATION_WEB_SOCKET_URL_EU`.
38-
5. After adding all above details in `custom.properties` file in Android studio then open `Build -> Clean project` after this run project.
39-
6. Run the [AWS CloudFormation template](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create?stackName=amazon-location-resources-setup&templateURL=https://amazon-location-resources-setup.s3.amazonaws.com/dev/main-cf-template.yaml) or use the template from `/extra/main-cf-template.yaml` using your own AWS account and get below data.
35+
4. After adding all above details in `custom.properties` file in Android studio then open `Build -> Clean project` after this run project.
36+
5. Run the [AWS CloudFormation template](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create?stackName=amazon-location-resources-setup&templateURL=https://amazon-location-resources-setup.s3.amazonaws.com/dev/main-cf-template.yaml) or use the template from `/extra/main-cf-template.yaml` using your own AWS account and get below data.
4037
- `IdentityPoolId` value will be added to `custom.properties` file against `IDENTITY_POOL_ID`.
4138
- `UserDomain` value will be added to `custom.properties` file against `USER_DOMAIN`.
4239
- `UserPoolClientId` value will be added to `custom.properties` file against `USER_POOL_CLIENT_ID`.
@@ -54,11 +51,11 @@ Create *`custom.properties`* file inside the project root folder and add the det
5451
|--------------------------------------|--------------------------------------------------------|
5552
| DEFAULT_IDENTITY_POOL_ID | IdentityPoolId |
5653
| DEFAULT_REGION | Take region from IdentityPoolId (Character before ':') |
57-
| DEFAULT_IDENTITY_POOL_ID_EU | IdentityPoolId form eu-west-1 region |
58-
| DEFAULT_IDENTITY_POOL_ID_AP | IdentityPoolId form ap-southeast-1 region |
54+
| DEFAULT_IDENTITY_POOL_ID_EU | IdentityPoolId from eu-west-1 region |
55+
| API_KEY_EU_CENTRAL | API key from eu-west-1 region |
56+
| API_KEY_US_EAST | API key from us-east-1 region |
5957
| SIMULATION_WEB_SOCKET_URL | Simulation WebSocketUrl |
60-
| SIMULATION_WEB_SOCKET_URL_EU | Simulation WebSocketUrl form eu-west-1 region |
61-
| SIMULATION_WEB_SOCKET_URL_AP | Simulation WebSocketUrl form ap-southeast-1 region |
58+
| SIMULATION_WEB_SOCKET_URL_EU | Simulation WebSocketUrl from eu-west-1 region |
6259
| ANALYTICS_APP_ID | AnalyticsAppId |
6360
| IDENTITY_POOL_ID | IdentityPoolId |
6461
| USER_DOMAIN | UserDomain |
@@ -72,10 +69,10 @@ Create *`custom.properties`* file inside the project root folder and add the det
7269
DEFAULT_IDENTITY_POOL_ID=xx-xxxx-x:xxxx-xxxx-xxxx-xxxx
7370
DEFAULT_REGION=xx-xxxx-x
7471
DEFAULT_IDENTITY_POOL_ID_EU=xx-xxxx-x:xxxx-xxxx-xxxx-xxxx
75-
DEFAULT_IDENTITY_POOL_ID_AP=xx-xxxx-x:xxxx-xxxx-xxxx-xxxx
72+
API_KEY_US_EAST=xx.xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
73+
API_KEY_EU_CENTRAL=xx.xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
7674
SIMULATION_WEB_SOCKET_URL=xxxxxxxxxxxx-xxx.xxx.xx-xxxx-x.xxxxxxxxxx.com
7775
SIMULATION_WEB_SOCKET_URL_EU=xxxxxxxxxxxx-xxx.xxx.xx-xxxx-x.xxxxxxxxxx.com
78-
SIMULATION_WEB_SOCKET_URL_AP=xxxxxxxxxxxx-xxx.xxx.xx-xxxx-x.xxxxxxxxxx.com
7976
ANALYTICS_APP_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8077
```
8178

@@ -127,50 +124,23 @@ E2E tests can be executed by the following gradle commands. Test suites are conf
127124
Note:
128125
1. Start the emulator before executing the commands.
129126
2. If working on windows(Powershell/cmd) wrap the argument in double quotes.
130-
eg: ./gradlew app:connectedDebugAndroidTest "-Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite"
127+
eg: ./gradlew app:connectedDebugAndroidTest "-Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.MapLoadAndPlaceSearchFlowSuite"
131128
```
132129

133130

134-
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite
135-
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite2
136-
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSTrackingAndConnectionTestSuite
137-
./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSGeofenceAndConnectionTestSuite
131+
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.MapLoadAndPlaceSearchFlowSuite
132+
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.SearchDirectionFlowSuite
133+
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.MapStylesSettingAndExplorerFlowSuite
134+
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSTrackingAndConnectionTestSuite
135+
./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSGeofenceAndConnectionTestSuite
138136

139137
## Resources
140-
> Maps (Name - Style)
141-
- location.aws.com.demo.maps.Esri.DarkGrayCanvas - VectorEsriDarkGrayCanvas
142-
- location.aws.com.demo.maps.Esri.Imagery - RasterEsriImagery
143-
- location.aws.com.demo.maps.Esri.Light - VectorEsriTopographic
144-
- location.aws.com.demo.maps.Esri.LightGrayCanvas - VectorEsriLightGrayCanvas
145-
- location.aws.com.demo.maps.Esri.Navigation - VectorEsriNavigation
146-
- location.aws.com.demo.maps.Esri.Streets - VectorEsriStreets
147-
- location.aws.com.demo.maps.HERE.Explore - VectorHereExplore
148-
- location.aws.com.demo.maps.HERE.Contrast - VectorHereContrast
149-
- location.aws.com.demo.maps.HERE.ExploreTruck - VectorHereExploreTruck
150-
- location.aws.com.demo.maps.HERE.Hybrid - HybridHereExploreSatellite
151-
- location.aws.com.demo.maps.HERE.Imagery - RasterHereExploreSatellite
152-
- location.aws.com.demo.maps.Grab.StandardLight - VectorGrabStandardLight
153-
- location.aws.com.demo.maps.Grab.StandardDark - VectorGrabStandardDark
154-
- location.aws.com.demo.maps.OpenData.StandardLight - VectorOpenDataStandardLight
155-
- location.aws.com.demo.maps.OpenData.StandardDark - VectorOpenDataStandardDark
156-
- location.aws.com.demo.maps.OpenData.VisualizationLight - VectorOpenDataVisualizationLight
157-
- location.aws.com.demo.maps.OpenData.VisualizationDark - VectorOpenDataVisualizationDark
158-
159-
> Place indexes (Name)
160-
- location.aws.com.demo.places.Esri.PlaceIndex
161-
- location.aws.com.demo.places.HERE.PlaceIndex
162-
- location.aws.com.demo.places.Grab.PlaceIndex
163-
164-
> Route calculators (Name)
165-
- location.aws.com.demo.routes.Esri.RouteCalculator
166-
- location.aws.com.demo.routes.HERE.RouteCalculator
167-
- location.aws.com.demo.routes.Grab.RouteCalculator
168-
169138
> Geofence collections (Name)
170139
- location.aws.com.demo.geofences.GeofenceCollection
171140

172141
> Trackers (Name)
173142
- location.aws.com.demo.trackers.Tracker
143+
174144
## Contributing
175145

176146
See [CONTRIBUTING](./CONTRIBUTING.md) for more information.

app/build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ android {
1616
minSdk 24
1717
targetSdk 34
1818
versionCode 44
19-
versionName "1.0.1"
19+
versionName "1.1.0"
2020
testInstrumentationRunner "com.aws.amazonlocation.AmazonLocationRunner"
2121
buildConfigField 'String', 'ATTRIBUTION_LEARN_MORE_HERE_URL',"\"https://legal.here.com/en-gb/terms/general-content-supplier-terms-and-notices\""
2222
buildConfigField 'String', 'ATTRIBUTION_LEARN_MORE_ESRI_URL',"\"https://www.esri.com/en-us/legal/terms/data-attributions\""
23-
buildConfigField 'String', 'GRAB_LEARN_MORE',"\"https://docs.aws.amazon.com/location/latest/developerguide/grab.html\""
2423
buildConfigField 'String', 'BASE_DOMAIN',"\"https://location.aws.com\""
2524
buildConfigField 'String', 'AWS_TERMS_URL',"\"/demo/terms\""
2625
buildConfigField 'String', 'CLOUD_FORMATION_READ_MORE_URL',"\"/demo/help\""
@@ -30,6 +29,8 @@ android {
3029
buildConfigField 'String', 'AWS_PRIVACY_NOTICE',"\"https://aws.amazon.com/privacy/\""
3130
buildConfigField 'String', 'AWS_NEAREST_REGION_CHECK_URL',"\"https://dynamodb.%s.amazonaws.com/\""
3231

32+
buildConfigField 'String', 'API_KEY_EU_CENTRAL',"\"${customConfig.getProperty("API_KEY_EU_CENTRAL")}\""
33+
buildConfigField 'String', 'API_KEY_US_EAST',"\"${customConfig.getProperty("API_KEY_US_EAST")}\""
3334
buildConfigField 'String', 'DEFAULT_IDENTITY_POOL_ID',"\"${customConfig.getProperty("DEFAULT_IDENTITY_POOL_ID")}\""
3435
buildConfigField 'String', 'DEFAULT_REGION',"\"${customConfig.getProperty("DEFAULT_REGION")}\""
3536
buildConfigField 'String', 'IDENTITY_POOL_ID',"\"${customConfig.getProperty("IDENTITY_POOL_ID")}\""
@@ -39,13 +40,11 @@ android {
3940
buildConfigField 'String', 'WEB_SOCKET_URL',"\"${customConfig.getProperty("WEB_SOCKET_URL")}\""
4041
buildConfigField 'String', 'SIMULATION_WEB_SOCKET_URL',"\"${customConfig.getProperty("SIMULATION_WEB_SOCKET_URL")}\""
4142
buildConfigField 'String', 'SIMULATION_WEB_SOCKET_URL_EU',"\"${customConfig.getProperty("SIMULATION_WEB_SOCKET_URL_EU")}\""
42-
buildConfigField 'String', 'SIMULATION_WEB_SOCKET_URL_AP',"\"${customConfig.getProperty("SIMULATION_WEB_SOCKET_URL_AP")}\""
4343
buildConfigField 'String', 'USER_LOGIN_NAME',"\"${customConfig.getProperty("USER_LOGIN_NAME")}\""
4444
buildConfigField 'String', 'USER_LOGIN_PASSWORD',"\"${customConfig.getProperty("USER_LOGIN_PASSWORD")}\""
4545
buildConfigField 'String', 'ANALYTICS_IDENTITY_POOL_ID',"\"${customConfig.getProperty("ANALYTICS_IDENTITY_POOL_ID")}\""
4646
buildConfigField 'String', 'ANALYTICS_APP_ID',"\"${customConfig.getProperty("ANALYTICS_APP_ID")}\""
4747
buildConfigField 'String', 'DEFAULT_IDENTITY_POOL_ID_EU',"\"${customConfig.getProperty("DEFAULT_IDENTITY_POOL_ID_EU")}\""
48-
buildConfigField 'String', 'DEFAULT_IDENTITY_POOL_ID_AP',"\"${customConfig.getProperty("DEFAULT_IDENTITY_POOL_ID_AP")}\""
4948
}
5049
signingConfigs {
5150
release {
@@ -153,11 +152,13 @@ dependencies {
153152
implementation "androidx.navigation:navigation-ui-ktx:2.7.7"
154153
implementation "androidx.fragment:fragment-ktx:1.8.2"
155154

156-
implementation("aws.sdk.kotlin:iot:1.3.29")
155+
implementation("aws.sdk.kotlin:iot:1.3.65")
157156
implementation("com.amazonaws:aws-iot-device-sdk-java:1.3.9")
158-
implementation("aws.sdk.kotlin:location:1.3.29")
159-
implementation("aws.sdk.kotlin:cognitoidentity:1.3.29")
160-
implementation("aws.sdk.kotlin:pinpoint:1.3.29")
157+
implementation("aws.sdk.kotlin:location:1.3.65")
158+
implementation("aws.sdk.kotlin:cognitoidentity:1.3.65")
159+
implementation("aws.sdk.kotlin:pinpoint:1.3.65")
160+
implementation("aws.sdk.kotlin:geoplaces:1.3.65")
161+
implementation("aws.sdk.kotlin:georoutes:1.3.65")
161162
implementation("com.squareup.okhttp3:okhttp:4.12.0")
162163
// Support for Java 8 features
163164
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

app/src/androidTest/java/com/aws/amazonlocation/AppModuleTest.kt

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ import com.aws.amazonlocation.data.repository.LocationSearchImp
88
import com.aws.amazonlocation.domain.repository.AuthRepository
99
import com.aws.amazonlocation.domain.repository.GeofenceRepository
1010
import com.aws.amazonlocation.domain.repository.LocationSearchRepository
11-
import com.aws.amazonlocation.utils.AWSLocationHelper
1211
import com.aws.amazonlocation.utils.BottomSheetHelper
1312
import com.aws.amazonlocation.utils.MapHelper
1413
import com.aws.amazonlocation.utils.PreferenceManager
14+
import com.aws.amazonlocation.utils.providers.GeofenceProvider
15+
import com.aws.amazonlocation.utils.providers.LocationProvider
16+
import com.aws.amazonlocation.utils.providers.PlacesProvider
17+
import com.aws.amazonlocation.utils.providers.RoutesProvider
18+
import com.aws.amazonlocation.utils.providers.TrackingProvider
1519
import dagger.Module
1620
import dagger.Provides
1721
import dagger.hilt.InstallIn
@@ -33,8 +37,8 @@ object AppModuleTest {
3337

3438
@Provides
3539
@Singleton
36-
fun getAWSLocationHelper(mMapHelper: MapHelper, mPreferenceManager: PreferenceManager) =
37-
AWSLocationHelper(mMapHelper, mPreferenceManager)
40+
fun getLocationProvider(mPreferenceManager: PreferenceManager) =
41+
LocationProvider(mPreferenceManager)
3842

3943
@Provides
4044
@Singleton
@@ -46,27 +50,57 @@ object AppModuleTest {
4650
fun getMapHelper(@ApplicationContext appContext: Context) =
4751
MapHelper(appContext)
4852

53+
@Provides
54+
@Singleton
55+
fun getPlacesProvider(mMapHelper: MapHelper,mPreferenceManager: PreferenceManager) =
56+
PlacesProvider(mMapHelper, mPreferenceManager)
57+
58+
@Provides
59+
@Singleton
60+
fun getRoutesProvider(mPreferenceManager: PreferenceManager) =
61+
RoutesProvider(mPreferenceManager)
62+
63+
@Provides
64+
@Singleton
65+
fun getGeofenceProvider() = GeofenceProvider()
66+
67+
@Provides
68+
@Singleton
69+
fun getTrackingProvider() = TrackingProvider()
70+
4971
@Provides
5072
@Singleton
5173
fun providesCommonRepositoryImp(
5274
@ApplicationContext appContext: Context,
53-
mAWSLocationHelper: AWSLocationHelper
75+
mLocationHelper: LocationProvider,
76+
mPlacesProvider: PlacesProvider,
77+
mRoutesProvider: RoutesProvider,
78+
mGeofenceProvider: GeofenceProvider,
79+
mTrackingProvider: TrackingProvider,
5480
): AuthRepository =
55-
AuthImp(RemoteDataSourceImpl(appContext, mAWSLocationHelper))
81+
AuthImp(RemoteDataSourceImpl(appContext, mLocationHelper, mPlacesProvider, mRoutesProvider, mGeofenceProvider, mTrackingProvider))
5682

5783
@Provides
5884
@Singleton
5985
fun providesLocationSearchRepository(
6086
@ApplicationContext appContext: Context,
61-
mAWSLocationHelper: AWSLocationHelper
87+
mLocationProvider: LocationProvider,
88+
mPlacesProvider: PlacesProvider,
89+
mRoutesProvider: RoutesProvider,
90+
mGeofenceProvider: GeofenceProvider,
91+
mTrackingProvider: TrackingProvider,
6292
): LocationSearchRepository =
63-
LocationSearchImp(RemoteDataSourceImpl(appContext, mAWSLocationHelper))
93+
LocationSearchImp(RemoteDataSourceImpl(appContext, mLocationProvider, mPlacesProvider, mRoutesProvider, mGeofenceProvider, mTrackingProvider))
6494

6595
@Provides
6696
@Singleton
6797
fun providesGeofenceRepository(
6898
@ApplicationContext appContext: Context,
69-
mAWSLocationHelper: AWSLocationHelper
99+
mLocationProvider: LocationProvider,
100+
mPlacesProvider: PlacesProvider,
101+
mRoutesProvider: RoutesProvider,
102+
mGeofenceProvider: GeofenceProvider,
103+
mTrackingProvider: TrackingProvider,
70104
): GeofenceRepository =
71-
GeofenceImp(RemoteDataSourceImpl(appContext, mAWSLocationHelper))
105+
GeofenceImp(RemoteDataSourceImpl(appContext, mLocationProvider, mPlacesProvider, mRoutesProvider, mGeofenceProvider, mTrackingProvider))
72106
}

0 commit comments

Comments
 (0)