8000 feat: google-mobile-ads · NativeScript/plugins@cfba838 · GitHub
[go: up one dir, main page]

Skip to content

Commit cfba838

Browse files
committed
feat: google-mobile-ads
1 parent 5b4822a commit cfba838

Some content is hidden

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

66 files changed

+39402
-9
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [@nativescript/fingerprint-auth](packages/fingerprint-auth/README.md)
1818
- [@nativescript/geolocation](packages/geolocation/README.md)
1919
- [@nativescript/google-maps](packages/google-maps/README.md)
20+
- [@nativescript/google-mobile-ads](packages/google-mobile-ads/README.md)
2021
- [@nativescript/google-signin](packages/google-signin/README.md)
2122
- [@nativescript/haptics](packages/haptics/README.md)< 8000 /span>
2223
- [@nativescript/imagepicker](packages/imagepicker/README.md)

apps/demo-angular/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"@nativescript/social-share": "file:../../dist/packages/social-share",
3737
"@nativescript/theme-switcher": "file:../../dist/packages/theme-switcher",
3838
"@nativescript/twitter": "file:../../dist/packages/twitter",
39-
"@nativescript/zip": "file:../../dist/packages/zip"
39+
"@nativescript/zip": "file:../../dist/packages/zip",
40+
"@nativescript/google-mobile-ads": "file:../../dist/packages/google-mobile-ads"
4041
},
4142
"devDependencies": {
4243
"@nativescript/android": "~8.8.0",

apps/demo-angular/src/app-routing.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const routes: Routes = [
2626
{ path: 'fingerprint-auth', loadChildren: () => import('./plugin-demos/fingerprint-auth.module').then((m) => m.FingerprintAuthModule) },
2727
{ path: 'geolocation', loadChildren: () => import('./plugin-demos/geolocation.module').then((m) => m.GeolocationModule) },
2828
{ path: 'google-maps', loadChildren: () => import('./plugin-demos/google-maps.module').then((m) => m.GoogleMapsModule) },
29+
{ path: 'google-mobile-ads', loadChildren: () => import('./plugin-demos/google-mobile-ads.module').then((m) => m.GoogleMobileAdsModule) },
2930
{ path: 'google-signin', loadChildren: () => import('./plugin-demos/google-signin.module').then((m) => m.GoogleSigninModule) },
3031
{ path: 'haptics', loadChildren: () => import('./plugin-demos/haptics.module').then((m) => m.HapticsModule) },
3132
{ path: 'imagepicker', loadChildren: () => import('./plugin-demos/imagepicker.module').then((m) => m.ImagepickerModule) },

apps/demo-angular/src/home.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ export class HomeComponent {
6363
{
6464
name: 'google-maps',
6565
},
66+
{
67+
name: 'google-mobile-ads',
68+
},
6669
{
6770
name: 'google-signin',
6871
},
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="google-mobile-ads" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test google-mobile-ads" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedGoogleMobileAds } from '@demo/shared';
3+
import {} from '@nativescript/google-mobile-ads';
4+
5+
@Component({
6+
selector: 'demo-google-mobile-ads',
7+
templateUrl: 'google-mobile-ads.component.html',
8+
})
9+
export class GoogleMobileAdsComponent {
10+
demoShared: DemoSharedGoogleMobileAds;
11+
12+
constructor(private _ngZone: NgZone) {}
13+
14+
ngOnInit() {
15+
this.demoShared = new DemoSharedGoogleMobileAds();
16+
}
17+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { GoogleMobileAdsComponent } from './google-mobile-ads.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: GoogleMobileAdsComponent }])],
7+
declarations: [GoogleMobileAdsComponent],
8+
schemas: [NO_ERRORS_SCHEMA],
9+
})
10+
export class GoogleMobileAdsModule {}

apps/demo-angular/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
"@nativescript/google-maps": ["packages/google-maps/index.d.ts"],
4242
"@nativescript/google-maps/angular": ["packages/google-maps/angular/index.ts"],
4343
"@nativescript/contacts": ["packages/contacts/index.d.ts"],
44-
"@nativescript/*": ["../../dist/packages/*"]
44+
"@nativescript/*": ["../../dist/packages/*"],
45+
"@nativescript/google-mobile-ads": ["../../packages/google-mobile-ads/index.d.ts"],
46+
"@nativescript/google-mobile-ads/angular": ["../../packages/google-mobile-ads/angular/index.ts"]
4547
}
4648
},
4749
"files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"],

apps/demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"@nativescript/social-share": "file:../../packages/social-share",
4040
"@nativescript/theme-switcher": "file:../../packages/theme-switcher",
4141
"@nativescript/twitter": "file:../../packages/twitter",
42-
"@nativescript/zip": "file:../../packages/zip"
42+
"@nativescript/zip": "file:../../packages/zip",
43+
"@nativescript/google-mobile-ads": "file:../../packages/google-mobile-ads"
4344
},
4445
"devDependencies": {
4546
"@nativescript/android": "~8.8.0",

apps/demo/src/main-page.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
1+
2+
<Button text="google-mobile-ads" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/><Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
23
<Page.actionBar>
34
<ActionBar title="Plugin Demos" icon="" class="action-bar"/>
45
</Page.actionBar>

0 commit comments

Comments
 (0)
0