Skip to content

Commit d64ebf6

Browse files
authored
Merge pull request #27 from GeoTecINIT/migrate-ns-couchbase
Migrate ns couchbase
2 parents 94365f2 + 73af31d commit d64ebf6

File tree

8 files changed

+27
-52
lines changed

8 files changed

+27
-52
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ What we plan to offer in the future:
2222

2323
### Android only
2424

25+
> Android SDK 22 (5.1) is required as a minimum due to the dependency of this plugin on [@triniwiz/nativescript-couchbase](https://github.com/triniwiz/nativescript-plugins/tree/master/packages/nativescript-couchbase)
26+
2527
#### Google Play Services conflicts
2628

2729
Given that we rely on [nativescript-geolocation](https://github.com/NativeScript/nativescript-geolocation) and use Google Play Services APIs for activity detection on Android devices, you might find Google Play Services version conflicts with other installed plugins.

demo/app/App_Resources/Android/app.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ android {
1414
ndkVersion "22.1.7171670"
1515
compileSdkVersion 30
1616
defaultConfig {
17-
minSdkVersion 19
17+
minSdkVersion 22
1818
targetSdkVersion 30
1919
generatedDensities = []
2020
}

demo/app/home/home-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function listenToActivityChanges(addListener = false) {
9898
activityRecognizers.forEach((recognizerType) => {
9999
listenToActivityChangesFor(recognizerType, addListener).catch((err) => {
100100
console.error(
101-
`An error occurred while listening to ${recognizerType} res activity changes: ${err}`
101+
`An error occurred while listening to ${recognizerType} res activity changes: ${JSON.stringify(err)}`
102102
);
103103
});
104104
});
@@ -162,7 +162,7 @@ async function prepareGeolocationProvider(
162162
await _preparing;
163163
return true;
164164
} catch (e) {
165-
console.error(`GeolocationProvider couldn't be prepared: ${e}`);
165+
console.error(`GeolocationProvider couldn't be prepared: ${JSON.stringify(e)}`);
166166
return false;
167167
} finally {
168168
_preparing = null;

demo/package-lock.json

Lines changed: 7 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/activity-recognition/recognizers/state/store.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { HumanActivity, Resolution, StartOptions } from "../../index";
2-
import { Couchbase } from "nativescript-couchbase-plugin";
2+
import { CouchBase } from "@triniwiz/nativescript-couchbase";
33

44
export interface RecognizerStateStore {
55
isActive(recognizer: Resolution): Promise<boolean>;
@@ -20,10 +20,10 @@ const DATABASE_NAME = "context-apis";
2020
const DOC_TYPE = "recognizer-state";
2121

2222
class RecognizersStateStoreDb implements RecognizerStateStore {
23-
private database: Couchbase;
23+
private database: CouchBase;
2424

2525
constructor() {
26-
this.database = new Couchbase(DATABASE_NAME);
26+
this.database = new CouchBase(DATABASE_NAME);
2727
}
2828

2929
async isActive(recognizer: Resolution): Promise<boolean> {

src/package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
},
6262
"dependencies": {
6363
"@nativescript/geolocation": "^8.0.2",
64-
"nativescript-couchbase-plugin": "^0.9.6",
64+
"@triniwiz/nativescript-couchbase": "1.2.5",
6565
"nativescript-permissions": "1.3.11",
6666
"rxjs": "^6.5.5"
6767
},
-179 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)