Skip to content

Commit 3cd23ef

Browse files
authored
Merge pull request #28 from what3words/staging
1.0.0
2 parents 8c2348f + c85fc40 commit 3cd23ef

File tree

284 files changed

+11207
-21
lines changed

Some content is hidden

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

284 files changed

+11207
-21
lines changed

.circleci/config.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
version: 2.1
2+
orbs:
3+
gradle: circleci/gradle@3.0.0
4+
android: circleci/android@2.3.0
5+
6+
jobs:
7+
build-assemble:
8+
executor:
9+
name: android/android-machine
10+
tag: 2023.11.1
11+
resource-class: xlarge
12+
steps:
13+
- checkout
14+
- restore_cache:
15+
key: jars-{{ checksum "build.gradle" }}
16+
- run:
17+
name: Set Up
18+
command: |
19+
./gradlew wrapper
20+
- save_cache:
21+
paths:
22+
- ~/.gradle
23+
key: jars-{{ checksum "build.gradle" }}
24+
- run:
25+
name: API Wrapper Sample Assemble builds
26+
command: |
27+
./gradlew api-wrapper-sample:assembleRelease
28+
- run:
29+
name: OCR Sample Assemble builds
30+
command: |
31+
./gradlew ocr-sample:assembleRelease
32+
- run:
33+
name: Auto Suggest Sample builds
34+
command: |
35+
./gradlew autosuggest-sample:assembleRelease
36+
- run:
37+
name: Auto Suggest Sample Voice builds
38+
command: |
39+
./gradlew autosuggest-sample-voice:assembleRelease
40+
- run:
41+
name: Multi Component Sample Assemble builds
42+
command: |
43+
./gradlew multi-component-sample:assembleRelease
44+
- store_artifacts:
45+
path: api-wrapper-sample/build/outputs/apk/release
46+
- store_artifacts:
47+
path: ocr-sample/build/outputs/apk/release
48+
- store_artifacts:
49+
path: autosuggest-sample/build/outputs/apk/release
50+
- store_artifacts:
51+
path: autosuggest-sample-voice/build/outputs/apk/release
52+
- store_artifacts:
53+
path: multi-component-sample/build/outputs/apk/release
54+
build-ui-test:
55+
executor:
56+
name: android/android-machine
57+
tag: 2023.11.1
58+
resource-class: xlarge
59+
steps:
60+
- checkout
61+
- run:
62+
name: Config emulator
63+
command: |
64+
cp -rf multi-component-sample/src/androidTest/resources/custom.png /opt/android/sdk/emulator/resources
65+
cp -rf multi-component-sample/src/androidTest/resources/Toren1BD.posters /opt/android/sdk/emulator/resources
66+
- restore_cache:
67+
key: jars-{{ checksum "build.gradle" }}
68+
- android/create-avd:
69+
avd-name: testDevice
70+
system-image: system-images;android-34;google_apis_playstore;x86_64
71+
install: true
72+
- android/start-emulator:
73+
avd-name: testDevice
74+
no-window: true
75+
camera-back: virtualscene
76+
restore-gradle-cache-prefix: v1a
77+
post-emulator-launch-assemble-command: echo "Emulator Started"
78+
- run:
79+
name: Set Up
80+
command: |
81+
./gradlew wrapper
82+
- save_cache:
83+
paths:
84+
- ~/.gradle
85+
key: jars-{{ checksum "build.gradle" }}
86+
- android/run-tests:
87+
test-command: ./gradlew multi-component-sample:jacocoTestReport
88+
max-tries: 5
89+
- store_test_results:
90+
path: multi-component-sample/build/outputs/androidTest-results
91+
- android/save-gradle-cache:
92+
cache-prefix: v1a
93+
workflows:
94+
build-test:
95+
jobs:
96+
- build-assemble:
97+
context:
98+
- mobile
99+
- build-ui-test:
100+
context:
101+
- mobile

.gitignore

Lines changed: 71 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,85 @@
1+
# [Android] ========================
2+
# Built application files
3+
*.apk
4+
*.ap_
5+
6+
# Files for the Dalvik VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# Generated files
13+
bin/
14+
gen/
15+
116
# Gradle files
217
.gradle/
318
build/
419

520
# Local configuration file (sdk path, etc)
621
local.properties
722

8-
# Log/OS Files
23+
# Proguard folder generated by Eclipse
24+
proguard/
25+
26+
# Log Files
927
*.log
1028

11-
# Android Studio generated files and folders
12-
captures/
13-
.externalNativeBuild/
14-
.cxx/
15-
*.apk
16-
output.json
1729

18-
# IntelliJ
19-
*.iml
30+
## Directory-based project format:
2031
.idea/
21-
misc.xml
22-
deploymentTargetDropDown.xml
23-
render.experimental.xml
2432

25-
# Keystore files
26-
*.jks
27-
*.keystore
33+
## File-based project format:
34+
*.ipr
35+
*.iws
36+
37+
## Plugin-specific files:
38+
39+
# IntelliJ
40+
out/
41+
42+
# mpeltonen/sbt-idea plugin
43+
.idea_modules/
44+
45+
# JIRA plugin
46+
atlassian-ide-plugin.xml
47+
48+
# Crashlytics plugin (for Android Studio and IntelliJ)
49+
com_crashlytics_export_strings.xml
50+
51+
52+
# [Maven] ========================
53+
target/
54+
pom.xml.tag
55+
pom.xml.releaseBackup
56+
pom.xml.versionsBackup
57+
pom.xml.next
58+
release.properties
59+
60+
61+
# [Gradle-Android] ========================
62+
63+
# Ignore Gradle GUI config
64+
gradle-app.setting
65+
66+
# Gradle Signing
67+
signing.properties
68+
trestle.keystore
69+
70+
# Mobile Tools for Java (J2ME)
71+
.mtj.tmp/
72+
73+
# Package Files #
74+
*.war
75+
*.ear
2876

29-
# Google Services (e.g. APIs or Firebase)
30-
google-services.json
77+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
78+
hs_err_pid*
3179

32-
# Android Profiling
33-
*.hprof
80+
# Misc
81+
/.idea/workspace.xml
82+
.DS_Store
83+
/captures
84+
**/*.iml
85+
*.class

.signing/release.jks

2.35 KB
Binary file not shown.

README.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,52 @@
1-
# w3w-android-samples
2-
Multiple example apps using our wrappers and components, isolated and together.
1+
# <img src="https://what3words.com/assets/images/w3w_square_red.png" width="64" height="64" alt="what3words">&nbsp;Samples for what3words libraries and components
2+
3+
This repository contains a set of individual Android Studio projects to help you learn about
4+
how to use what3words Library. Each sample demonstrates different use cases, complexity levels and APIs.
5+
6+
For more information, please [read the documentation](https://developer.what3words.com/public-api).
7+
<br><br>
8+
### Gradle Properties
9+
10+
```groovy
11+
MAPBOX_DOWNLOADS_TOKEN = YOUR_MAPBOX_DOWNLOADS_TOKEN
12+
MAPBOX_ACCESS_TOKEN = YOUR_MAPBOX_ACCESS_TOKEN
13+
MAPS_API_KEY = YOUR_GOOGLE_MAP_API_KEY
14+
PROD_API_KEY = YOUR_W3W_PRODUCTION_KEY
15+
```
16+
17+
To obtain an PROD_API_KEY key, please visit https://what3words.com/select-plan and sign up for an account. That used for what3words library.
18+
19+
MAPBOX_DOWNLOADS_TOKEN and MAPBOX_ACCESS_TOKEN for MapBox access. Please follow the quick start tutorial on the Mapbox developer portal here: https://docs.mapbox.com/android/maps/guides/install/
20+
21+
MAPS_API_KEY for GoogleMap access. Please follow the quick start tutorial on the Mapbox developer portal here: https://developers.google.com/maps/documentation/android-sdk/start
22+
23+
24+
## Samples
25+
------------
26+
27+
| Project | |
28+
|:-----|---------|
29+
| <br><b> API Wrapper Sample </b> <br><br> A sample showing how we using what3words Android Wrapper library in autosuggest textfield search and voice search. <br><br> • Convert from coordinate to 3 words address<br>• Convert from 3 words to coordinate<br>• Search by 3 words <br>• Voice search 3 words<br><br>The library used: **[w3w-android-wrapper](https://github.com/what3words/w3w-android-wrapper)**<br><br> **[More information](api-wrapper-sample/)**<br><br> | <img src="api-wrapper-sample/readme/SampleWrapper.png" width="320" alt="API Wrapper sample demo"> |
30+
| | |
31+
| <br><b> AutoSuggest Sample </b> <br><br> A sample showing how we using what3words Components autosuggest textfield in compose and xml. <br><br> • Using Autosuggestion textfield component in compose/xml<br>• Customize voice search layout<br>• Customize picker, error message view<br>• Config result output by languague, clip to country, etc.. <br>• Config valiation input<br><br>The library used: **[w3w-android-components](https://github.com/what3words/w3w-android-components)**<br><br> **[More information](autosuggest-sample/)**<br><br> | <img src="autosuggest-sample/readme/AutoSuggestSample.png" width="320" alt="API Wrapper sample demo"> |
32+
| | |
33+
| <br><b> AutoSuggest Voice Sample </b> <br><br> A sample voice only showing how we using what3words Components voice and how we customize the voice search. <br><br> • Customize the result output by voice language<br>• Config return result coordinate<br>• Config result output by languague, clip to country, etc..<br><br>The library used: **[w3w-android-components](https://github.com/what3words/w3w-android-components)**, **[w3w-android-wrapper](https://github.com/what3words/w3w-android-wrapper)**<br><br> **[More information](autosuggest-sample-voice/)**<br><br> | <img src="autosuggest-sample-voice/readme/AutoSuggestVoiceSample.png" width="320" alt="API Wrapper sample demo"> |
34+
| | |
35+
| <br><b> Mapbox Sample </b> <br><br> This is a sample show how using the what3words Map Component provides a straightforward way to add what3words to a Mapbox map and display features such as the what3words grid and what3words markers with what3words address.<br><br>• Display the what3words grid on the top of the basemap<br> • Display mapbox map with what3words Map Component <br>• Display what3words markers <br><br>The library used: **[w3w-android-map-components](https://github.com/what3words/w3w-android-map-components)**<br><br> **[More information](mapbox-sample/)**<br><br> | <img src="mapbox-sample/readme/MapBoxSample.png" width="320" alt="API Wrapper sample demo"> |
36+
| | |
37+
| <br><b> Google Map Sample </b> <br><br> This is a sample show how using the what3words Map Component provides a straightforward way to add what3words to a Google Map and display features such as the what3words grid and what3words markers with what3words address.<br><br>• Display the what3words grid on the top of the basemap <br> • Display google map with what3words Map Component <br>• Display what3words markers <br><br>The library used: **[w3w-android-map-components](https://github.com/what3words/w3w-android-map-components)**<br><br> **[More information](maps-googlemaps-sample/)**<br><br> | <img src="maps-googlemaps-sample/readme/GoogleMapSample.png" width="320" alt="API Wrapper sample demo"> |
38+
| | |
39+
| <br><b> OCR Sample </b> <br><br> This is a sample show how using the what3words OCR Component to detect 3 words adrress<br><br>• Launch OCR scanner in screen <br>• Launch OCR scanner as pop up<br>• Config language for detection <br><br>The library used: **[w3w-android-ocr-components](https://github.com/what3words/w3w-android-ocr-components)**<br><br> **[More information](ocr-sample/)**<br><br> | <img src="ocr-sample/readme/OCRSample.png" width="320" alt="API Wrapper sample demo"> |
40+
| | |
41+
| <br><b> Multi Component Sample </b> <br><br>A sample combines fully what3words components such as autosuggest text filed, voice, map, and OCR scanner to demonstrate full flow how using in the real case by showing feature searching by text field, voice, OCR scan and prepopulate to map.<br><br>• Integrate autosuggest textfiled with voice search <br>• Intergrate map component for GoogleMap and Mapbox<br>• Intergrate the OCR scanner<br><br>The library used: **[w3w-android-wrapper](https://github.com/what3words/w3w-android-wrapper)**, **[w3w-android-map-components](https://github.com/what3words/w3w-android-map-components)**, **[w3w-android-ocr-components](https://github.com/what3words/w3w-android-ocr-components)**<br><br> **[More information](multi-component-sample/)**<br><br> | <img src="multi-component-sample/readme/MultiComponentsSample.png" width="320" alt="API Wrapper sample demo"> |
42+
| | |
43+
44+
45+
### Full what3words library repositories:
46+
47+
| Name | Repository |
48+
|----------------------------|----|
49+
| w3w-android-wrapper |https://github.com/what3words/w3w-android-wrapper
50+
| w3w-android-components |https://github.com/what3words/w3w-android-components
51+
| w3w-android-map-components |https://github.com/what3words/w3w-android-map-components
52+
| w3w-android-ocr-components |https://github.com/what3words/w3w-android-ocr-components

api-wrapper-sample/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/build
2+
/release/

0 commit comments

Comments
 (0)