Skip to content

Commit

Permalink
update admob
Browse files Browse the repository at this point in the history
  • Loading branch information
dyazincahya committed Aug 19, 2023
1 parent 6a0ea31 commit f869861
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 58 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cSpell.words": ["Admob"]
}
6 changes: 3 additions & 3 deletions App_Resources/Android/app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ android {

defaultConfig {
minSdkVersion 26
targetSdkVersion 31
targetSdkVersion 33

// Version Information
versionCode 6
versionName "1.0.6"
versionCode 7
versionName "1.0.7"

generatedDensities = []
}
Expand Down
40 changes: 40 additions & 0 deletions App_Resources/Android/src/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "996189842385",
"project_id": "whatsapp-sender-f8293",
"storage_bucket": "whatsapp-sender-f8293.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:996189842385:android:60a9685124543555f4cef0",
"android_client_info": {
"package_name": "com.kang.cahya.apps.whatsappsender"
}
},
"oauth_client": [
{
"client_id": "996189842385-vuqb2g1vbdvhse6adcd8t4falfi5g5sh.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA9MgRnyIDX_E8wEAbqU23zeWRqSjCqfuM"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "996189842385-vuqb2g1vbdvhse6adcd8t4falfi5g5sh.apps.googleusercontent.com",
"client_type": 3
}
]
}
},
"admob_app_id": "ca-app-pub-1640120316722376~9613851970"
}
],
"configuration_version": "1"
}
4 changes: 4 additions & 0 deletions App_Resources/Android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true">
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-1640120316722376~9613851970"
/>

<activity
android:name="com.tns.NativeScriptActivity"
Expand Down
35 changes: 30 additions & 5 deletions app/about/about-page.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Page
navigatingTo="onNavigatingTo"
xmlns="http://schemas.nativescript.org/tns.xsd">
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:ui="@nativescript/firebase-admob">

<ActionBar>
<Label text="About"></Label>
Expand All @@ -14,6 +15,14 @@
<Label text="Jangan lupa berikan Rating 5 Bintang di playstore sebagai salah satu bentuk dukungan pada aplikasi ini :)" textWrap="true" class="desc" />
<Button text="Give 5 Star in Playstore Now" tap="rateNow" class="rate-button" />

<StackLayout>
<ui:BannerAd
height="100"
width="320"
unitId="ca-app-pub-1640120316722376/2612533193"
layoutChanged="LARGE_BANNER"/>
</StackLayout>

<Label text="#ABOUT" textWrap="true" class="header" marginTop="20" horizontalAlignment="right" />

<Label text="Name" textWrap="true" class="title" />
Expand All @@ -26,19 +35,35 @@
<Label text="23 Juny 2023" textWrap="true" class="desc" />

<Label text="Current Version" textWrap="true" class="title" marginTop="10" />
<Label text="v1.0.5" textWrap="true" class="desc" />
<Label text="v1.0.7" textWrap="true" class="desc" />

<Label text="Developer" textWrap="true" class="title" marginTop="10" />
<Label text="x-labs.my.id by KANG-CAHYA.COM" textWrap="true" class="desc" />

<StackLayout>
<ui:BannerAd
height="100"
width="320"
unitId="ca-app-pub-1640120316722376/3114277833"
layoutChanged="LARGE_BANNER"/>
</StackLayout>

<Label text="#CREDIT" textWrap="true" fontSize="28" color="#E0E0E0" marginTop="20" horizontalAlignment="right" />

<Label text="Font Icon" textWrap="true" class="title" marginTop="10" />
<Label text="fontawesome.com" textWrap="true" class="desc" />

<Label text="Icon" textWrap="true" class="title" marginTop="10" />
<Label text="flaticon.com" textWrap="true" class="desc" />
<Label text="flaticon.com/authors/murmur" textWrap="true" class="desc" />
<Label text="Icon Apps" textWrap="true" class="title" marginTop="10" />
<Label text="flaticon.com/free-icons/direction" textWrap="true" class="desc" />
<Label text="flaticon.com/authors/murmur" textWrap="true" class="desc" />

<StackLayout>
<ui:BannerAd
height="100"
width="320"
unitId="ca-app-pub-1640120316722376/5781622016"
layoutChanged="LARGE_BANNER"/>
</StackLayout>
</StackLayout>
</ScrollView>
</Page>
8 changes: 6 additions & 2 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Application } from '@nativescript/core'
import { Application } from "@nativescript/core";
import { firebase } from "@nativescript/firebase-core";
import { Admob } from "@nativescript/firebase-admob";

Application.run({ moduleName: 'app-root' })
Application.run({ moduleName: "app-root" });
firebase().initializeApp();
Admob.init();

/*
Do not place any code after the application has been started as it will not
Expand Down
10 changes: 9 additions & 1 deletion app/history/history-page.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Page
loaded="onLoaded"
navigatingTo="onNavigatingTo"
xmlns="http://schemas.nativescript.org/tns.xsd">
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:ui="@nativescript/firebase-admob">

<ActionBar>
<Label text="HISTORY"></Label>
Expand All @@ -26,5 +27,12 @@
<Label row="1" class="page__content-icon fas" text="&#xf1da;"></Label>
<Label row="2" class="page__content-placeholder" text="No data!"></Label>
</GridLayout>
<StackLayout row="3">
<ui:BannerAd
height="100"
width="320"
unitId="ca-app-pub-1640120316722376/6711560304"
layoutChanged="LARGE_BANNER"/>
</StackLayout>
</GridLayout>
</Page>
12 changes: 10 additions & 2 deletions app/home/home-page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
actionBarHidden="true"
loaded="onLoaded"
navigatingTo="onNavigatingTo"
xmlns="http://schemas.nativescript.org/tns.xsd">
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:ui="@nativescript/firebase-admob">

<StackLayout height="100%" width="100%">
<GridLayout rows="20,*,auto,*,auto,10,auto,10,auto,*" marginRight="10" marginLeft="10">
<GridLayout rows="20, *, auto, *, auto, 10, auto, 10, auto, 10, auto, *" marginRight="10" marginLeft="10">
<Image src="res://logo" height="50%" row="2" textAlignment="center" loadMode="async" />
<GridLayout columns="*,auto" row="4" class="label-select-country" tap="changeCountry">
<Label text="{{ countryFlag + ' ' + countryDialCode + ' ' + countryName }}" col="0" />
<Label text="&#xf0d7;" class="fas" col="1" />
</GridLayout>
<TextField hint="{{ hint_text }}" class="input-number" keyboardType="phone" text="{{ phone_number }}" textAlignment="center" maxLength="15" row="6" />
<Button text="Start to send message" class="btn-whatsapp" row="8" tap="openApps" />
<StackLayout row="10">
<ui:BannerAd
height="100"
width="320"
unitId="ca-app-pub-1640120316722376/6636334844"
layoutChanged="LARGE_BANNER"/>
</StackLayout>
</GridLayout>
</StackLayout>
</Page>
81 changes: 37 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f869861

Please sign in to comment.