-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support external push provider
closes #7
- Loading branch information
Showing
107 changed files
with
2,835 additions
and
533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
apps/demo-angular/src/plugin-demos/firebase-messaging-core.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<ActionBar title="firebase-messaging-core" class="action-bar"> </ActionBar> | ||
<StackLayout class="p-20"> | ||
<ScrollView class="h-full"> | ||
<StackLayout> | ||
<Button text="Test firebase-messaging-core" (tap)="demoShared.testIt()" class="btn btn-primary"></Button> | ||
</StackLayout> | ||
</ScrollView> | ||
</StackLayout> |
17 changes: 17 additions & 0 deletions
17
apps/demo-angular/src/plugin-demos/firebase-messaging-core.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component, NgZone } from '@angular/core'; | ||
import { DemoSharedFirebaseMessagingCore } from '@demo/shared'; | ||
import {} from '@nativescript/firebase-messaging-core'; | ||
|
||
@Component({ | ||
selector: 'demo-firebase-messaging-core', | ||
templateUrl: 'firebase-messaging-core.component.html', | ||
}) | ||
export class FirebaseMessagingCoreComponent { | ||
demoShared: DemoSharedFirebaseMessagingCore; | ||
|
||
constructor(private _ngZone: NgZone) {} | ||
|
||
ngOnInit() { | ||
this.demoShared = new DemoSharedFirebaseMessagingCore(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
apps/demo-angular/src/plugin-demos/firebase-messaging-core.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; | ||
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; | ||
import { FirebaseMessagingCoreComponent } from './firebase-messaging-core.component'; | ||
|
||
@NgModule({ | ||
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: FirebaseMessagingCoreComponent }])], | ||
declarations: [FirebaseMessagingCoreComponent], | ||
schemas: [NO_ERRORS_SCHEMA], | ||
}) | ||
export class FirebaseMessagingCoreModule {} |
34 changes: 34 additions & 0 deletions
34
apps/demo-vue/app/plugin-demos/firebase-messaging-core.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<Page> | ||
<ActionBar> | ||
<Label text="firebase-messaging-core"/> | ||
</ActionBar> | ||
|
||
<GridLayout> | ||
<Button class="info" :text="message"/> | ||
</GridLayout> | ||
</Page> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from "nativescript-vue"; | ||
import { DemoSharedFirebaseMessagingCore } from '@demo/shared'; | ||
import { } from '@nativescript/firebase-messaging-core'; | ||
export default Vue.extend({ | ||
computed: { | ||
message() { | ||
return "Test firebase-messaging-core"; | ||
} | ||
} | ||
}); | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.info { | ||
font-size: 20; | ||
horizontal-align: center; | ||
vertical-align: center; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Observable, EventData, Page } from '@nativescript/core'; | ||
import { DemoSharedFirebaseMessagingCore } from '@demo/shared'; | ||
import {} from '@nativescript/firebase-messaging-core'; | ||
|
||
export function navigatingTo(args: EventData) { | ||
const page = <Page>args.object; | ||
page.bindingContext = new DemoModel(); | ||
} | ||
|
||
export class DemoModel extends DemoSharedFirebaseMessagingCore {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page"> | ||
<Page.actionBar> | ||
<ActionBar title="firebase-messaging-core" icon="" class="action-bar"> | ||
</ActionBar> | ||
</Page.actionBar> | ||
<StackLayout class="p-20"> | ||
<ScrollView class="h-full"> | ||
<StackLayout> | ||
<Button text="Test firebase-messaging-core" tap="{{ testIt }}" class="btn btn-primary"/> | ||
|
||
</StackLayout> | ||
</ScrollView> | ||
</StackLayout> | ||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export interface IFirebaseOptions { | ||
apiKey?: string; | ||
gcmSenderId?: string; | ||
androidClientId?: string; | ||
appGroupId?: string; | ||
bundleId?: string; | ||
clientId?: string; | ||
databaseURL?: string; | ||
deepLinkURLScheme?: string; | ||
googleAppId?: string; | ||
projectId?: string; | ||
storageBucket?: string; | ||
trackingId?: string; | ||
} | ||
export interface FirebaseConfig { | ||
automaticDataCollectionEnabled?: boolean; | ||
automaticResourceManagement?: boolean; | ||
name?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*", "node_modules/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# @nativescript/firebase-messaging-core | ||
|
||
```javascript | ||
ns plugin add @nativescript/firebase-messaging-core | ||
``` | ||
|
||
## Usage | ||
|
||
// TODO | ||
|
||
## License | ||
|
||
Apache License Version 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export declare const enum AuthorizationStatus { | ||
AUTHORIZED = 0, | ||
DENIED = 1, | ||
NOT_DETERMINED = 2, | ||
PROVISIONAL = 3, | ||
EPHEMERAL = 4, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export const enum AuthorizationStatus { | ||
AUTHORIZED, | ||
DENIED, | ||
NOT_DETERMINED, | ||
PROVISIONAL, | ||
EPHEMERAL, | ||
} |
Oops, something went wrong.