Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 8042054

Browse files
Merge branch 'master' into feature/expanded-query
2 parents f0615df + 06fcae8 commit 8042054

18 files changed

+122
-62
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
[Firebase iOS SDK Changelog](https://firebase.google.com/support/release-notes/ios)
44
[Firebase Android SDK Changelog](https://firebase.google.com/support/release-notes/android)
55

6+
## 6.6.0 (2018, X Y)
7+
[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/66?closed=1)
8+
9+
610
## 6.5.0 (2018, August 16)
711
[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/65?closed=1)
812

demo-ng/app/tabs/firestore/firestore.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<Button text="login anonymously" (tap)="loginAnonymously()" class="button button-user"></Button>
44
<Label text="After pressing these buttons, check the console log" textWrap="true"></Label>
55

6+
<Button text="Issue 854" (tap)="issue854()" class="button"></Button>
67
<Button text="Add" (tap)="firestoreAdd()" class="button"></Button>
78
<Button text="Set" (tap)="firestoreSet()" class="button"></Button>
89
<Button text="Set (auto id)" (tap)="firestoreSetByAutoID()" class="button"></Button>

demo-ng/app/tabs/firestore/firestore.component.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,23 @@ export class FirestoreComponent {
2626
// AngularFireModule.initializeApp({});
2727
}
2828

29+
public issue854(): void {
30+
const helloRef: firestore.DocumentReference =
31+
firebase.firestore()
32+
.collection("users")
33+
.doc(firebase.auth().currentUser.uid)
34+
.collection("availability")
35+
.doc("hello");
36+
37+
helloRef.get().then(snapshot => console.log(snapshot.data()))
38+
}
39+
2940
public loginAnonymously(): void {
3041
firebase.auth().signInAnonymously()
31-
.then(() => console.log("Logged in"))
42+
.then(() => {
43+
const user = firebase.auth().currentUser;
44+
firebase.firestore().collection("users").doc(user.uid).set(user);
45+
})
3246
.catch(err => console.log("Login error: " + JSON.stringify(err)));
3347
}
3448

@@ -119,10 +133,14 @@ export class FirestoreComponent {
119133
}
120134

121135
public firestoreUpdate(): void {
136+
// get a document reference so we can add a city reference to our favourite dog
137+
const sfDocRef: firestore.DocumentReference = firebase.firestore().collection("cities").doc("SF");
138+
122139
firebase.firestore().collection("dogs").doc("fave")
123140
.update({
124141
name: "Woofieupdate",
125142
last: "updatedwoofie!",
143+
city: sfDocRef,
126144
updateTs: firestore.FieldValue.serverTimestamp(),
127145
updateTsAlt: firebase.firestore().FieldValue().serverTimestamp(),
128146
lastKnownLocation: firebase.firestore().GeoPoint(4.34, 5.67)

demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,9 @@ export class BarcodeScanningComponent extends AbstractMLKitViewComponent {
1313
format: string;
1414
}>;
1515

16-
constructor() {
17-
super();
18-
// let's start with the torch on, just for show
19-
this.torchOn = true;
20-
}
21-
2216
onBarcodeScanResult(event: any): void {
2317
const result: MLKitScanBarcodesOnDeviceResult = event.value;
2418
this.barcodes = result.barcodes;
19+
console.log("this.barcodes: " + JSON.stringify(this.barcodes));
2520
}
2621
}

demo-ng/app/tabs/mlkit/imagelabeling/imagelabeling.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ export class ImageLabelingComponent extends AbstractMLKitViewComponent {
1313
confidence: number;
1414
}>;
1515

16+
constructor() {
17+
super();
18+
// let's start with the torch on, just for show
19+
this.torchOn = true;
20+
}
21+
1622
onImageLabelingResult(scanResult: any): void {
1723
const value: MLKitImageLabelingOnDeviceResult = scanResult.value;
1824
this.labels = value.labels;

demo-ng/firebase.nativescript.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@
1111
"facebook_auth": false,
1212
"google_auth": false,
1313
"admob": false,
14-
"invites": false
14+
"invites": false,
15+
"dynamic_links": false,
16+
"ml_kit": true,
17+
"ml_kit_text_recognition": true,
18+
"ml_kit_barcode_scanning": true,
19+
"ml_kit_face_detection": true,
20+
"ml_kit_image_labeling": true,
21+
"ml_kit_custom_model": true
1522
}

demo-ng/package.json

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
}
1414
},
1515
"dependencies": {
16-
"@angular/animations": "~6.0.0",
17-
"@angular/common": "~6.0.0",
18-
"@angular/compiler": "~6.0.0",
19-
"@angular/core": "~6.0.0",
20-
"@angular/forms": "~6.0.0",
21-
"@angular/http": "~6.0.0",
22-
"@angular/platform-browser": "~6.0.0",
23-
"@angular/platform-browser-dynamic": "~6.0.0",
24-
"@angular/router": "~6.0.0",
25-
"nativescript-angular": "^6.0.0",
16+
"@angular/animations": "~6.1.0",
17+
"@angular/common": "~6.1.0",
18+
"@angular/compiler": "~6.1.0",
19+
"@angular/core": "~6.1.0",
20+
"@angular/forms": "~6.1.0",
21+
"@angular/http": "~6.1.0",
22+
"@angular/platform-browser": "~6.1.0",
23+
"@angular/platform-browser-dynamic": "~6.1.0",
24+
"@angular/router": "~6.1.0",
25+
"nativescript-angular": "^6.1.0",
2626
"nativescript-camera": "^4.0.2",
2727
"nativescript-imagepicker": "^6.0.1",
2828
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-6.5.0.tgz",
@@ -33,27 +33,14 @@
3333
"zone.js": "~0.8.26"
3434
},
3535
"devDependencies": {
36-
"@angular-devkit/core": "~0.6.3",
37-
"@angular/compiler-cli": "~6.0.0",
38-
"@ngtools/webpack": "~6.0.3",
36+
"@angular/compiler-cli": "~6.1.0",
37+
"@ngtools/webpack": "~6.1.0",
3938
"babel-traverse": "6.26.0",
4039
"babel-types": "6.26.0",
4140
"babylon": "6.18.0",
42-
"clean-webpack-plugin": "~0.1.19",
43-
"copy-webpack-plugin": "~4.5.1",
44-
"css-loader": "~0.28.11",
45-
"extract-text-webpack-plugin": "~3.0.2",
4641
"lazy": "1.0.11",
47-
"nativescript-dev-typescript": "~0.7.1",
48-
"nativescript-dev-webpack": "^0.12.0",
49-
"nativescript-worker-loader": "~0.9.0",
50-
"raw-loader": "~0.5.1",
51-
"resolve-url-loader": "~2.3.0",
52-
"typescript": "~2.7.2",
53-
"uglifyjs-webpack-plugin": "~1.2.5",
54-
"webpack": "~4.6.0",
55-
"webpack-bundle-analyzer": "~2.13.0",
56-
"webpack-cli": "~2.1.3",
57-
"webpack-sources": "~1.1.0"
42+
"nativescript-dev-typescript": "~0.7.0",
43+
"nativescript-dev-webpack": "^0.15.1",
44+
"typescript": "~2.7.2"
5845
}
5946
}

demo-ng/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
},
2525
"exclude": [
2626
"node_modules",
27-
"platforms",
27+
"platforms"
2828
]
2929
}

demo/firebase.nativescript.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
"google_auth": true,
1313
"admob": true,
1414
"invites": true,
15+
"dynamic_links": true,
1516
"ml_kit": false
1617
}

docs/ML_KIT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ registerElement("MLKitBarcodeScanner", () => require("nativescript-plugin-fireba
245245
</MLKitBarcodeScanner>
246246
```
247247
248+
Note that `formats` is optional but recommended for better recognition performance. Supported types:
249+
`CODE_128`, `CODE_39`, `CODE_93`, `CODABAR`, `DATA_MATRIX`, `EAN_13`, `EAN_8`, `ITF`, `QR_CODE`, `UPC_A`, `UPC_E`, `PDF417`, `AZTEC`.
250+
248251
### Image labeling
249252
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/mlkit_text_image_labeling.png" height="153px" alt="ML Kit - Image labeling"/>
250253

0 commit comments

Comments
 (0)