@situm/cordova 3.1.1 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG_UNRELEASED.md +2 -4
- package/README.md +320 -170
- package/example/.browserslistrc +16 -0
- package/example/.editorconfig +16 -0
- package/example/.eslintrc.json +46 -0
- package/example/README.md +163 -0
- package/example/android/app/build.gradle +54 -0
- package/example/android/app/capacitor.build.gradle +27 -0
- package/example/android/app/proguard-rules.pro +21 -0
- package/example/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +26 -0
- package/example/android/app/src/main/AndroidManifest.xml +42 -0
- package/example/android/app/src/main/java/com/situm/capacitor_example/MainActivity.java +5 -0
- package/example/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/example/android/app/src/main/res/drawable/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/example/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/example/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/ic_launcher_background.xml +4 -0
- package/example/android/app/src/main/res/values/strings.xml +7 -0
- package/example/android/app/src/main/res/values/styles.xml +22 -0
- package/example/android/app/src/main/res/xml/file_paths.xml +5 -0
- package/example/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +18 -0
- package/example/android/build.gradle +29 -0
- package/example/android/capacitor.settings.gradle +27 -0
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/example/android/gradle.properties +22 -0
- package/example/android/gradlew +244 -0
- package/example/android/gradlew.bat +92 -0
- package/example/android/settings.gradle +5 -0
- package/example/android/variables.gradle +16 -0
- package/example/angular.json +145 -0
- package/example/capacitor.config.json +1 -0
- package/example/capacitor.config.ts +12 -0
- package/example/docs/assets/sdk_preview.png +0 -0
- package/example/docs/assets/wyf_preview.png +0 -0
- package/example/ionic.config.json +7 -0
- package/example/ios/App/App/AppDelegate.swift +49 -0
- package/example/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/example/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/example/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/example/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
- package/example/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/example/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/example/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/example/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
- package/example/ios/App/App/Base.lproj/Main.storyboard +19 -0
- package/example/ios/App/App/Info.plist +55 -0
- package/example/ios/App/App.xcodeproj/project.pbxproj +408 -0
- package/example/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/example/ios/App/App.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/example/ios/App/Podfile +32 -0
- package/example/karma.conf.js +44 -0
- package/example/package-lock.json +17234 -0
- package/example/package.json +73 -0
- package/example/src/app/app.component.html +3 -0
- package/example/src/app/app.component.scss +0 -0
- package/example/src/app/app.component.spec.ts +16 -0
- package/example/src/app/app.component.ts +12 -0
- package/example/src/app/app.routes.ts +8 -0
- package/example/src/app/sdk/sdk.page.html +109 -0
- package/example/src/app/sdk/sdk.page.scss +24 -0
- package/example/src/app/sdk/sdk.page.spec.ts +18 -0
- package/example/src/app/sdk/sdk.page.ts +440 -0
- package/example/src/app/tabs/tabs.page.html +13 -0
- package/example/src/app/tabs/tabs.page.scss +1 -0
- package/example/src/app/tabs/tabs.page.spec.ts +27 -0
- package/example/src/app/tabs/tabs.page.ts +19 -0
- package/example/src/app/tabs/tabs.routes.ts +31 -0
- package/example/src/app/utils/request.permissions.ts +68 -0
- package/example/src/app/wyf/wyf.page.html +22 -0
- package/example/src/app/wyf/wyf.page.scss +8 -0
- package/example/src/app/wyf/wyf.page.spec.ts +18 -0
- package/example/src/app/wyf/wyf.page.ts +47 -0
- package/example/src/assets/icon/favicon.png +0 -0
- package/example/src/assets/icon/situm-logo-whitebg.svg +67 -0
- package/example/src/assets/shapes.svg +1 -0
- package/example/src/constants.ts.example +6 -0
- package/example/src/environments/environment.prod.ts +3 -0
- package/example/src/environments/environment.ts +16 -0
- package/example/src/global.scss +26 -0
- package/example/src/index.html +26 -0
- package/example/src/main.ts +20 -0
- package/example/src/polyfills.ts +55 -0
- package/example/src/test.ts +14 -0
- package/example/src/theme/variables.scss +244 -0
- package/example/src/zone-flags.ts +6 -0
- package/example/tsconfig.app.json +15 -0
- package/example/tsconfig.json +30 -0
- package/example/tsconfig.spec.json +18 -0
- package/package.json +1 -1
- package/plugin.xml +1 -1
- package/src/android/app/build.gradle +1 -1
- package/src/android/situm.gradle +1 -1
- package/www/map-view-controller.js +1 -1
- package/www/map-view.js +3 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
+
# For additional information regarding the format and rule options, please see:
|
|
3
|
+
# https://github.com/browserslist/browserslist#queries
|
|
4
|
+
|
|
5
|
+
# For the full list of supported browsers by the Angular framework, please see:
|
|
6
|
+
# https://angular.io/guide/browser-support
|
|
7
|
+
|
|
8
|
+
# You can see what browsers were selected by your queries by running:
|
|
9
|
+
# npx browserslist
|
|
10
|
+
|
|
11
|
+
Chrome >=79
|
|
12
|
+
ChromeAndroid >=79
|
|
13
|
+
Firefox >=70
|
|
14
|
+
Edge >=79
|
|
15
|
+
Safari >=14
|
|
16
|
+
iOS >=14
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.ts]
|
|
12
|
+
quote_type = single
|
|
13
|
+
|
|
14
|
+
[*.md]
|
|
15
|
+
max_line_length = off
|
|
16
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": ["projects/**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"parserOptions": {
|
|
8
|
+
"project": ["tsconfig.json"],
|
|
9
|
+
"createDefaultProgram": true
|
|
10
|
+
},
|
|
11
|
+
"extends": [
|
|
12
|
+
"plugin:@angular-eslint/recommended",
|
|
13
|
+
"plugin:@angular-eslint/template/process-inline-templates"
|
|
14
|
+
],
|
|
15
|
+
"rules": {
|
|
16
|
+
"@angular-eslint/component-class-suffix": [
|
|
17
|
+
"error",
|
|
18
|
+
{
|
|
19
|
+
"suffixes": ["Page", "Component"]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"@angular-eslint/component-selector": [
|
|
23
|
+
"error",
|
|
24
|
+
{
|
|
25
|
+
"type": "element",
|
|
26
|
+
"prefix": "app",
|
|
27
|
+
"style": "kebab-case"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"@angular-eslint/directive-selector": [
|
|
31
|
+
"error",
|
|
32
|
+
{
|
|
33
|
+
"type": "attribute",
|
|
34
|
+
"prefix": "app",
|
|
35
|
+
"style": "camelCase"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"files": ["*.html"],
|
|
42
|
+
"extends": ["plugin:@angular-eslint/template/recommended"],
|
|
43
|
+
"rules": {}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<p align="center"> <img width="233" src="https://situm.com/wp-content/themes/situm/img/logo-situm.svg" style="margin-bottom:1rem" />
|
|
2
|
+
<h1 align="center">Situm Capacitor & Cordova Example</h1>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<div align="center" style="text-align:center">
|
|
6
|
+
|
|
7
|
+
A sample Capacitor application to start learning the power of [**@situm/cordova**](https://www.npmjs.com/package/@situm/cordova).
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div align="center" style="text-align:center">
|
|
12
|
+
|
|
13
|
+
[](https://opensource.org/licenses/MIT)
|
|
14
|
+
[](https://www.npmjs.com/package/@situm/cordova)
|
|
15
|
+
[](https://www.npmjs.com/package/@situm/cordova)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
## What's in here
|
|
20
|
+
|
|
21
|
+
This folder contains the source code of a Capacitor + Ionic example application using the [**Situm Cordova Plugin**](../README.md). You can also **integrate this plugin on a Cordova project**! Learn how to do it in this [section](#using-situmcordova-on-a-cordova-app).
|
|
22
|
+
|
|
23
|
+
<div align="center" style="display: flex;">
|
|
24
|
+
<img src="./docs/assets/sdk_preview.png" alt="sdk_preview">
|
|
25
|
+
<img src="./docs/assets/wyf_preview.png" alt="wyf_preview">
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
## How to run the app
|
|
29
|
+
|
|
30
|
+
### Step 1: Install the dependencies
|
|
31
|
+
|
|
32
|
+
1. The first step is to download this repo:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git clone https://github.com/situmtech/cordova.git
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Then install the plugin dependencies alongside the `example` app as follows:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
cd cordova/example
|
|
42
|
+
npm install
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
> [!TIP]
|
|
46
|
+
> You might want to try out this configuration if you are facing some issues to build our sample app:
|
|
47
|
+
>
|
|
48
|
+
> - node >= 18.13.X
|
|
49
|
+
> - @ionic/cli 7.1.5
|
|
50
|
+
> - gradle 8.4
|
|
51
|
+
> - java 17.0.6
|
|
52
|
+
|
|
53
|
+
> [!NOTE]
|
|
54
|
+
> Make sure you are using `@ionic/cli` and not the deprecated `ionic` npm package. Otherwise you won't be able to build the app and you will receive the following error:
|
|
55
|
+
|
|
56
|
+
```diff
|
|
57
|
+
- [ERROR] Invalid project type: angular-standalone (project config: ./ionic.config.json).
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 2: Set up your Situm credentials
|
|
61
|
+
|
|
62
|
+
This example provides you with a template on [`src/constants.ts.example`](src/constants.ts.example) to set all your credentials used on the sdk tab just in one file. So rename this file to `constants.ts` and set up your credentials before running the app:
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
export const API_USER = "YOUR_SITUM_API_USER";
|
|
66
|
+
export const API_KEY = "YOUR_SITUM_API_KEY";
|
|
67
|
+
export const BUILDING_IDENTIFIER = "YOUR_BUILDING_IDENTIFIER";
|
|
68
|
+
export const VIEWER_DOMAIN = "https://map-viewer.situm.com";
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> [!NOTE]
|
|
72
|
+
> The credentials will also be set in the [`src/app/wyf/wyf.page.html`](./src/app/wyf/wyf.page.html) automatically in this example app. Make sure you set your credentials inside this file in your integration.
|
|
73
|
+
|
|
74
|
+
### Step 3: Run the app <a name="runapplication"></a>
|
|
75
|
+
|
|
76
|
+
From the `example/` folder, execute the following command to run the app on your device:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# For Android devices
|
|
80
|
+
ionic cap run android
|
|
81
|
+
# For iOS devices
|
|
82
|
+
ionic cap run ios
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
> [!NOTE]
|
|
86
|
+
> iOS only
|
|
87
|
+
>
|
|
88
|
+
> You might need to update the pods of this app by executing inside `example/ios`:
|
|
89
|
+
>
|
|
90
|
+
> $ pod install --repo-update
|
|
91
|
+
>
|
|
92
|
+
> Also check out the project [code signing](https://developer.apple.com/support/code-signing/) before you run the example.
|
|
93
|
+
|
|
94
|
+
You can also run the app from your IDE:
|
|
95
|
+
|
|
96
|
+
- On Android: open `example/android/` with Android Studio.
|
|
97
|
+
- On iOS: open `example/ios/App/App.xcworkspace` with XCode.
|
|
98
|
+
|
|
99
|
+
## Using @situm/cordova on a Cordova app
|
|
100
|
+
|
|
101
|
+
To integrate our plugin in a Cordova project, follow this 3 steps:
|
|
102
|
+
|
|
103
|
+
1. Configure your Content-Security-Policy \<meta\> tag in your `www/index.html` to be able to display our MapView on Android:
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: https://ssl.gstatic.com https://map-viewer.situm.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;" />
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
2. Configure your `config.xml` file to be able to display our MapView on iOS by adding the following \<allow-navigation\> tag:
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<widget>
|
|
113
|
+
...
|
|
114
|
+
<allow-navigation href="https://map-viewer.situm.com/*" />
|
|
115
|
+
</widget>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
3. All ready to use our plugin in a Cordova app!
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
cordova plugin add @situm/cordova
|
|
122
|
+
# For Android
|
|
123
|
+
cordova run android
|
|
124
|
+
# For iOS
|
|
125
|
+
cordova run iOS
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
> [!TIP]
|
|
129
|
+
> You might want to learn [how to create a basic Cordova app using our @situm/cordova plugin](https://situm.com/docs/a-basic-cordova-app/).
|
|
130
|
+
|
|
131
|
+
## Documentation
|
|
132
|
+
|
|
133
|
+
More information on how to use the official [**@situm/cordova**](https://www.npmjs.com/package/@situm/cordova) plugin and the set of APIs, the functions, parameters and results each function accepts and provides can be found in our [SDK API Reference](https://developers.situm.com/sdk_documentation/cordova/jsdoc/latest/situm) and [Wayfinding API Reference](https://developers.situm.com/sdk_documentation/cordova/jsdoc/latest/mapview).
|
|
134
|
+
|
|
135
|
+
### Examples
|
|
136
|
+
|
|
137
|
+
In case you want to learn how to use our plugin, you may want to take a look at our code samples of the basics functionalities:
|
|
138
|
+
|
|
139
|
+
1. [**Basic SDK and Wayfinding functionality**](./src/app/sdk/sdk.page.ts): showcases how to initialize the Situm SDK (refer to the [cordova sdk quickstart guide](https://situm.com/docs/a-basic-cordova-app/) for more information) and how to use some basic features like positioning and obtaining the information of a given building.
|
|
140
|
+
|
|
141
|
+
## Versioning
|
|
142
|
+
|
|
143
|
+
We use [SemVer](http://semver.org/) for versioning.
|
|
144
|
+
|
|
145
|
+
Please refer to [CHANGELOG.md](../CHANGELOG.md) for a list of notables changes for each version of the library.
|
|
146
|
+
|
|
147
|
+
You can also see the [tags on this repository](https://github.com/situmtech/cordova/tags).
|
|
148
|
+
|
|
149
|
+
## Submitting Contributions
|
|
150
|
+
|
|
151
|
+
You will need to sign a Contributor License Agreement (CLA) before making a submission. [Learn more here.](https://situm.com/contributions/)
|
|
152
|
+
|
|
153
|
+
## License
|
|
154
|
+
|
|
155
|
+
This project is licensed under the MIT - see the [LICENSE](../LICENSE) file for details.
|
|
156
|
+
|
|
157
|
+
## More information
|
|
158
|
+
|
|
159
|
+
More info is available at our [Developers Page](https://situm.com/docs/01-introduction/).
|
|
160
|
+
|
|
161
|
+
## Support information
|
|
162
|
+
|
|
163
|
+
For any question or bug report, please send an email to [support@situm.es](mailto:support@situm.es)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
apply plugin: 'com.android.application'
|
|
2
|
+
|
|
3
|
+
android {
|
|
4
|
+
namespace "com.situm.capacitor_example"
|
|
5
|
+
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
6
|
+
defaultConfig {
|
|
7
|
+
applicationId "com.situm.capacitor_example"
|
|
8
|
+
minSdkVersion rootProject.ext.minSdkVersion
|
|
9
|
+
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
10
|
+
versionCode 1
|
|
11
|
+
versionName "1.0"
|
|
12
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
13
|
+
aaptOptions {
|
|
14
|
+
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
|
15
|
+
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
|
16
|
+
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
buildTypes {
|
|
20
|
+
release {
|
|
21
|
+
minifyEnabled false
|
|
22
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
repositories {
|
|
28
|
+
flatDir{
|
|
29
|
+
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
dependencies {
|
|
34
|
+
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
35
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
36
|
+
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
|
|
37
|
+
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
|
|
38
|
+
implementation project(':capacitor-android')
|
|
39
|
+
testImplementation "junit:junit:$junitVersion"
|
|
40
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
41
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
42
|
+
implementation project(':capacitor-cordova-android-plugins')
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
apply from: 'capacitor.build.gradle'
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
def servicesJSON = file('google-services.json')
|
|
49
|
+
if (servicesJSON.text) {
|
|
50
|
+
apply plugin: 'com.google.gms.google-services'
|
|
51
|
+
}
|
|
52
|
+
} catch(Exception e) {
|
|
53
|
+
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
|
54
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
|
|
2
|
+
|
|
3
|
+
android {
|
|
4
|
+
compileOptions {
|
|
5
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
6
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
|
11
|
+
dependencies {
|
|
12
|
+
implementation project(':capacitor-app')
|
|
13
|
+
implementation project(':capacitor-camera')
|
|
14
|
+
implementation project(':capacitor-filesystem')
|
|
15
|
+
implementation project(':capacitor-geolocation')
|
|
16
|
+
implementation project(':capacitor-haptics')
|
|
17
|
+
implementation project(':capacitor-keyboard')
|
|
18
|
+
implementation project(':capacitor-preferences')
|
|
19
|
+
implementation project(':capacitor-status-bar')
|
|
20
|
+
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
|
21
|
+
implementation "androidx.appcompat:appcompat:1.3.1"
|
|
22
|
+
}
|
|
23
|
+
apply from: "../../../src/android/situm.gradle"
|
|
24
|
+
|
|
25
|
+
if (hasProperty('postBuildExtras')) {
|
|
26
|
+
postBuildExtras()
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Add project specific ProGuard rules here.
|
|
2
|
+
# You can control the set of applied configuration files using the
|
|
3
|
+
# proguardFiles setting in build.gradle.
|
|
4
|
+
#
|
|
5
|
+
# For more details, see
|
|
6
|
+
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
7
|
+
|
|
8
|
+
# If your project uses WebView with JS, uncomment the following
|
|
9
|
+
# and specify the fully qualified class name to the JavaScript interface
|
|
10
|
+
# class:
|
|
11
|
+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
12
|
+
# public *;
|
|
13
|
+
#}
|
|
14
|
+
|
|
15
|
+
# Uncomment this to preserve the line number information for
|
|
16
|
+
# debugging stack traces.
|
|
17
|
+
#-keepattributes SourceFile,LineNumberTable
|
|
18
|
+
|
|
19
|
+
# If you keep the line number information, uncomment this to
|
|
20
|
+
# hide the original source file name.
|
|
21
|
+
#-renamesourcefileattribute SourceFile
|
package/example/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
package com.getcapacitor.myapp;
|
|
2
|
+
|
|
3
|
+
import static org.junit.Assert.*;
|
|
4
|
+
|
|
5
|
+
import android.content.Context;
|
|
6
|
+
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
|
7
|
+
import androidx.test.platform.app.InstrumentationRegistry;
|
|
8
|
+
import org.junit.Test;
|
|
9
|
+
import org.junit.runner.RunWith;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Instrumented test, which will execute on an Android device.
|
|
13
|
+
*
|
|
14
|
+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
15
|
+
*/
|
|
16
|
+
@RunWith(AndroidJUnit4.class)
|
|
17
|
+
public class ExampleInstrumentedTest {
|
|
18
|
+
|
|
19
|
+
@Test
|
|
20
|
+
public void useAppContext() throws Exception {
|
|
21
|
+
// Context of the app under test.
|
|
22
|
+
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
|
23
|
+
|
|
24
|
+
assertEquals("com.getcapacitor.app", appContext.getPackageName());
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
+
|
|
4
|
+
<application
|
|
5
|
+
android:allowBackup="true"
|
|
6
|
+
android:icon="@mipmap/ic_launcher"
|
|
7
|
+
android:label="@string/app_name"
|
|
8
|
+
android:roundIcon="@mipmap/ic_launcher_round"
|
|
9
|
+
android:supportsRtl="true"
|
|
10
|
+
android:theme="@style/AppTheme">
|
|
11
|
+
|
|
12
|
+
<activity
|
|
13
|
+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
|
14
|
+
android:name=".MainActivity"
|
|
15
|
+
android:label="@string/title_activity_main"
|
|
16
|
+
android:theme="@style/AppTheme.NoActionBarLaunch"
|
|
17
|
+
android:launchMode="singleTask"
|
|
18
|
+
android:exported="true">
|
|
19
|
+
|
|
20
|
+
<intent-filter>
|
|
21
|
+
<action android:name="android.intent.action.MAIN" />
|
|
22
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
|
23
|
+
</intent-filter>
|
|
24
|
+
|
|
25
|
+
</activity>
|
|
26
|
+
|
|
27
|
+
<provider
|
|
28
|
+
android:name="androidx.core.content.FileProvider"
|
|
29
|
+
android:authorities="${applicationId}.fileprovider"
|
|
30
|
+
android:exported="false"
|
|
31
|
+
android:grantUriPermissions="true">
|
|
32
|
+
<meta-data
|
|
33
|
+
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
34
|
+
android:resource="@xml/file_paths"></meta-data>
|
|
35
|
+
</provider>
|
|
36
|
+
</application>
|
|
37
|
+
|
|
38
|
+
<!-- Permissions -->
|
|
39
|
+
|
|
40
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
41
|
+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
42
|
+
</manifest>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
android:width="108dp"
|
|
4
|
+
android:height="108dp"
|
|
5
|
+
android:viewportHeight="108"
|
|
6
|
+
android:viewportWidth="108">
|
|
7
|
+
<path
|
|
8
|
+
android:fillColor="#26A69A"
|
|
9
|
+
android:pathData="M0,0h108v108h-108z" />
|
|
10
|
+
<path
|
|
11
|
+
android:fillColor="#00000000"
|
|
12
|
+
android:pathData="M9,0L9,108"
|
|
13
|
+
android:strokeColor="#33FFFFFF"
|
|
14
|
+
android:strokeWidth="0.8" />
|
|
15
|
+
<path
|
|
16
|
+
android:fillColor="#00000000"
|
|
17
|
+
android:pathData="M19,0L19,108"
|
|
18
|
+
android:strokeColor="#33FFFFFF"
|
|
19
|
+
android:strokeWidth="0.8" />
|
|
20
|
+
<path
|
|
21
|
+
android:fillColor="#00000000"
|
|
22
|
+
android:pathData="M29,0L29,108"
|
|
23
|
+
android:strokeColor="#33FFFFFF"
|
|
24
|
+
android:strokeWidth="0.8" />
|
|
25
|
+
<path
|
|
26
|
+
android:fillColor="#00000000"
|
|
27
|
+
android:pathData="M39,0L39,108"
|
|
28
|
+
android:strokeColor="#33FFFFFF"
|
|
29
|
+
android:strokeWidth="0.8" />
|
|
30
|
+
<path
|
|
31
|
+
android:fillColor="#00000000"
|
|
32
|
+
android:pathData="M49,0L49,108"
|
|
33
|
+
android:strokeColor="#33FFFFFF"
|
|
34
|
+
android:strokeWidth="0.8" />
|
|
35
|
+
<path
|
|
36
|
+
android:fillColor="#00000000"
|
|
37
|
+
android:pathData="M59,0L59,108"
|
|
38
|
+
android:strokeColor="#33FFFFFF"
|
|
39
|
+
android:strokeWidth="0.8" />
|
|
40
|
+
<path
|
|
41
|
+
android:fillColor="#00000000"
|
|
42
|
+
android:pathData="M69,0L69,108"
|
|
43
|
+
android:strokeColor="#33FFFFFF"
|
|
44
|
+
android:strokeWidth="0.8" />
|
|
45
|
+
<path
|
|
46
|
+
android:fillColor="#00000000"
|
|
47
|
+
android:pathData="M79,0L79,108"
|
|
48
|
+
android:strokeColor="#33FFFFFF"
|
|
49
|
+
android:strokeWidth="0.8" />
|
|
50
|
+
<path
|
|
51
|
+
android:fillColor="#00000000"
|
|
52
|
+
android:pathData="M89,0L89,108"
|
|
53
|
+
android:strokeColor="#33FFFFFF"
|
|
54
|
+
android:strokeWidth="0.8" />
|
|
55
|
+
<path
|
|
56
|
+
android:fillColor="#00000000"
|
|
57
|
+
android:pathData="M99,0L99,108"
|
|
58
|
+
android:strokeColor="#33FFFFFF"
|
|
59
|
+
android:strokeWidth="0.8" />
|
|
60
|
+
<path
|
|
61
|
+
android:fillColor="#00000000"
|
|
62
|
+
android:pathData="M0,9L108,9"
|
|
63
|
+
android:strokeColor="#33FFFFFF"
|
|
64
|
+
android:strokeWidth="0.8" />
|
|
65
|
+
<path
|
|
66
|
+
android:fillColor="#00000000"
|
|
67
|
+
android:pathData="M0,19L108,19"
|
|
68
|
+
android:strokeColor="#33FFFFFF"
|
|
69
|
+
android:strokeWidth="0.8" />
|
|
70
|
+
<path
|
|
71
|
+
android:fillColor="#00000000"
|
|
72
|
+
android:pathData="M0,29L108,29"
|
|
73
|
+
android:strokeColor="#33FFFFFF"
|
|
74
|
+
android:strokeWidth="0.8" />
|
|
75
|
+
<path
|
|
76
|
+
android:fillColor="#00000000"
|
|
77
|
+
android:pathData="M0,39L108,39"
|
|
78
|
+
android:strokeColor="#33FFFFFF"
|
|
79
|
+
android:strokeWidth="0.8" />
|
|
80
|
+
<path
|
|
81
|
+
android:fillColor="#00000000"
|
|
82
|
+
android:pathData="M0,49L108,49"
|
|
83
|
+
android:strokeColor="#33FFFFFF"
|
|
84
|
+
android:strokeWidth="0.8" />
|
|
85
|
+
<path
|
|
86
|
+
android:fillColor="#00000000"
|
|
87
|
+
android:pathData="M0,59L108,59"
|
|
88
|
+
android:strokeColor="#33FFFFFF"
|
|
89
|
+
android:strokeWidth="0.8" />
|
|
90
|
+
<path
|
|
91
|
+
android:fillColor="#00000000"
|
|
92
|
+
android:pathData="M0,69L108,69"
|
|
93
|
+
android:strokeColor="#33FFFFFF"
|
|
94
|
+
android:strokeWidth="0.8" />
|
|
95
|
+
<path
|
|
96
|
+
android:fillColor="#00000000"
|
|
97
|
+
android:pathData="M0,79L108,79"
|
|
98
|
+
android:strokeColor="#33FFFFFF"
|
|
99
|
+
android:strokeWidth="0.8" />
|
|
100
|
+
<path
|
|
101
|
+
android:fillColor="#00000000"
|
|
102
|
+
android:pathData="M0,89L108,89"
|
|
103
|
+
android:strokeColor="#33FFFFFF"
|
|
104
|
+
android:strokeWidth="0.8" />
|
|
105
|
+
<path
|
|
106
|
+
android:fillColor="#00000000"
|
|
107
|
+
android:pathData="M0,99L108,99"
|
|
108
|
+
android:strokeColor="#33FFFFFF"
|
|
109
|
+
android:strokeWidth="0.8" />
|
|
110
|
+
<path
|
|
111
|
+
android:fillColor="#00000000"
|
|
112
|
+
android:pathData="M19,29L89,29"
|
|
113
|
+
android:strokeColor="#33FFFFFF"
|
|
114
|
+
android:strokeWidth="0.8" />
|
|
115
|
+
<path
|
|
116
|
+
android:fillColor="#00000000"
|
|
117
|
+
android:pathData="M19,39L89,39"
|
|
118
|
+
android:strokeColor="#33FFFFFF"
|
|
119
|
+
android:strokeWidth="0.8" />
|
|
120
|
+
<path
|
|
121
|
+
android:fillColor="#00000000"
|
|
122
|
+
android:pathData="M19,49L89,49"
|
|
123
|
+
android:strokeColor="#33FFFFFF"
|
|
124
|
+
android:strokeWidth="0.8" />
|
|
125
|
+
<path
|
|
126
|
+
android:fillColor="#00000000"
|
|
127
|
+
android:pathData="M19,59L89,59"
|
|
128
|
+
android:strokeColor="#33FFFFFF"
|
|
129
|
+
android:strokeWidth="0.8" />
|
|
130
|
+
<path
|
|
131
|
+
android:fillColor="#00000000"
|
|
132
|
+
android:pathData="M19,69L89,69"
|
|
133
|
+
android:strokeColor="#33FFFFFF"
|
|
134
|
+
android:strokeWidth="0.8" />
|
|
135
|
+
<path
|
|
136
|
+
android:fillColor="#00000000"
|
|
137
|
+
android:pathData="M19,79L89,79"
|
|
138
|
+
android:strokeColor="#33FFFFFF"
|
|
139
|
+
android:strokeWidth="0.8" />
|
|
140
|
+
<path
|
|
141
|
+
android:fillColor="#00000000"
|
|
142
|
+
android:pathData="M29,19L29,89"
|
|
143
|
+
android:strokeColor="#33FFFFFF"
|
|
144
|
+
android:strokeWidth="0.8" />
|
|
145
|
+
<path
|
|
146
|
+
android:fillColor="#00000000"
|
|
147
|
+
android:pathData="M39,19L39,89"
|
|
148
|
+
android:strokeColor="#33FFFFFF"
|
|
149
|
+
android:strokeWidth="0.8" />
|
|
150
|
+
<path
|
|
151
|
+
android:fillColor="#00000000"
|
|
152
|
+
android:pathData="M49,19L49,89"
|
|
153
|
+
android:strokeColor="#33FFFFFF"
|
|
154
|
+
android:strokeWidth="0.8" />
|
|
155
|
+
<path
|
|
156
|
+
android:fillColor="#00000000"
|
|
157
|
+
android:pathData="M59,19L59,89"
|
|
158
|
+
android:strokeColor="#33FFFFFF"
|
|
159
|
+
android:strokeWidth="0.8" />
|
|
160
|
+
<path
|
|
161
|
+
android:fillColor="#00000000"
|
|
162
|
+
android:pathData="M69,19L69,89"
|
|
163
|
+
android:strokeColor="#33FFFFFF"
|
|
164
|
+
android:strokeWidth="0.8" />
|
|
165
|
+
<path
|
|
166
|
+
android:fillColor="#00000000"
|
|
167
|
+
android:pathData="M79,19L79,89"
|
|
168
|
+
android:strokeColor="#33FFFFFF"
|
|
169
|
+
android:strokeWidth="0.8" />
|
|
170
|
+
</vector>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
xmlns:aapt="http://schemas.android.com/aapt"
|
|
3
|
+
android:width="108dp"
|
|
4
|
+
android:height="108dp"
|
|
5
|
+
android:viewportHeight="108"
|
|
6
|
+
android:viewportWidth="108">
|
|
7
|
+
<path
|
|
8
|
+
android:fillType="evenOdd"
|
|
9
|
+
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
|
10
|
+
android:strokeColor="#00000000"
|
|
11
|
+
android:strokeWidth="1">
|
|
12
|
+
<aapt:attr name="android:fillColor">
|
|
13
|
+
<gradient
|
|
14
|
+
android:endX="78.5885"
|
|
15
|
+
android:endY="90.9159"
|
|
16
|
+
android:startX="48.7653"
|
|
17
|
+
android:startY="61.0927"
|
|
18
|
+
android:type="linear">
|
|
19
|
+
<item
|
|
20
|
+
android:color="#44000000"
|
|
21
|
+
android:offset="0.0" />
|
|
22
|
+
<item
|
|
23
|
+
android:color="#00000000"
|
|
24
|
+
android:offset="1.0" />
|
|
25
|
+
</gradient>
|
|
26
|
+
</aapt:attr>
|
|
27
|
+
</path>
|
|
28
|
+
<path
|
|
29
|
+
android:fillColor="#FFFFFF"
|
|
30
|
+
android:fillType="nonZero"
|
|
31
|
+
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
|
32
|
+
android:strokeColor="#00000000"
|
|
33
|
+
android:strokeWidth="1" />
|
|
34
|
+
</vector>
|