Skip to content

Commit 373426b

Browse files
committed
initial project with some change
0 parents  commit 373426b

Some content is hidden

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

55 files changed

+1553
-0
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

.idea/.gitignore

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

.idea/.name

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

.idea/compiler.xml

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

.idea/deploymentTargetDropDown.xml

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

.idea/gradle.xml

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

.idea/kotlinc.xml

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

.idea/migrations.xml

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

.idea/misc.xml

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

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle.kts

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
plugins {
2+
alias(libs.plugins.androidApplication)
3+
alias(libs.plugins.jetbrainsKotlinAndroid)
4+
// Google Services
5+
id("com.google.gms.google-services")
6+
}
7+
8+
android {
9+
namespace = "id.syafii.examplefcm"
10+
compileSdk = 34
11+
12+
defaultConfig {
13+
applicationId = "id.syafii.examplefcm"
14+
minSdk = 24
15+
targetSdk = 34
16+
versionCode = 1
17+
versionName = "1.0"
18+
19+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
20+
vectorDrawables {
21+
useSupportLibrary = true
22+
}
23+
}
24+
25+
buildTypes {
26+
release {
27+
isMinifyEnabled = false
28+
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
29+
}
30+
}
31+
compileOptions {
32+
sourceCompatibility = JavaVersion.VERSION_1_8
33+
targetCompatibility = JavaVersion.VERSION_1_8
34+
}
35+
kotlinOptions {
36+
jvmTarget = "1.8"
37+
}
38+
buildFeatures {
39+
compose = true
40+
}
41+
composeOptions {
42+
kotlinCompilerExtensionVersion = "1.5.1"
43+
}
44+
packaging {
45+
resources {
46+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
47+
excludes += "META-INF/DEPENDENCIES"
48+
}
49+
}
50+
51+
}
52+
53+
dependencies {
54+
55+
implementation(libs.androidx.core.ktx)
56+
implementation(libs.androidx.lifecycle.runtime.ktx)
57+
implementation(libs.androidx.activity.compose)
58+
implementation(platform(libs.androidx.compose.bom))
59+
implementation(libs.androidx.ui)
60+
implementation(libs.androidx.ui.graphics)
61+
implementation(libs.androidx.ui.tooling.preview)
62+
implementation(libs.androidx.material3)
63+
implementation(libs.firebase.messaging.ktx)
64+
testImplementation(libs.junit)
65+
androidTestImplementation(libs.androidx.junit)
66+
androidTestImplementation(libs.androidx.espresso.core)
67+
androidTestImplementation(platform(libs.androidx.compose.bom))
68+
androidTestImplementation(libs.androidx.ui.test.junit4)
69+
debugImplementation(libs.androidx.ui.tooling)
70+
debugImplementation(libs.androidx.ui.test.manifest)
71+
72+
// Firebase with BoM Library
73+
implementation(platform("com.google.firebase:firebase-bom:32.7.2"))
74+
implementation ("com.google.auth:google-auth-library-oauth2-http:1.19.0")
75+
76+
}

app/google-services.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"project_info": {
3+
"project_number": "287622994368",
4+
"project_id": "examplefcm-38208",
5+
"storage_bucket": "examplefcm-38208.appspot.com"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:287622994368:android:906b1f43741a9ab56dd025",
11+
"android_client_info": {
12+
"package_name": "id.syafii.examplefcm"
13+
}
14+
},
15+
"oauth_client": [],
16+
"api_key": [
17+
{
18+
"current_key": "AIzaSyADS_tAjK-TU_JnKgI4BBDG9G6jV9yIpuM"
19+
}
20+
],
21+
"services": {
22+
"appinvite_service": {
23+
"other_platform_oauth_client": []
24+
}
25+
}
26+
}
27+
],
28+
"configuration_version": "1"
29+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package id.syafii.examplefcm
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("id.syafii.examplefcm", appContext.packageName)
23+
}
24+
}

app/src/main/AndroidManifest.xml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
7+
<application
8+
android:allowBackup="true"
9+
android:dataExtractionRules="@xml/data_extraction_rules"
10+
android:fullBackupContent="@xml/backup_rules"
11+
android:icon="@mipmap/ic_launcher"
12+
android:label="@string/app_name"
13+
android:roundIcon="@mipmap/ic_launcher_round"
14+
android:supportsRtl="true"
15+
android:theme="@style/Theme.ExampleFCM"
16+
tools:targetApi="31">
17+
<activity
18+
android:name=".SplashScreenActivity"
19+
android:exported="true"
20+
android:label="@string/app_name"
21+
android:theme="@style/Theme.ExampleFCM">
22+
<intent-filter>
23+
<action android:name="android.intent.action.MAIN" />
24+
25+
<category android:name="android.intent.category.LAUNCHER" />
26+
</intent-filter>
27+
</activity>
28+
29+
<activity
30+
android:name=".MainActivity"
31+
android:exported="false"
32+
android:screenOrientation="portrait"
33+
android:launchMode="singleInstance"
34+
android:windowSoftInputMode="adjustResize"/>
35+
36+
<service
37+
android:name=".utils.FcmService"
38+
android:exported="false">
39+
<intent-filter>
40+
<action android:name="com.google.firebase.MESSAGING_EVENT" />
41+
</intent-filter>
42+
</service>
43+
44+
</application>
45+
46+
</manifest>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type": "service_account",
3+
"project_id": "examplefcm-38208",
4+
"private_key_id": "fc7bf1e80a70a9b370a126478675441de3880972",
5+
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC9Pm4aCYgy7zO7\ndLyt7PDeD0YWQS/Cx8m8CzFMhLoF+TXAg5T6o70bM5YgyYLxVoF6ZWXfQMCSbXom\n1hSxmSLKb5j1ehMriR0pcmoDxQ4Mm6xtU22s2r6385kPGGG0jlTFlivkPDDAgC8X\nbywcQ42tNmIucl345w/QkGTTjaaRBwZDqbq2cYayXWWkczT4AcNTVyZByWH5u8zp\niAfxyrnnRu6ly/589blmxGyvQGGEAmP67lpo9TsqSjEnYQZLP4TDYDsVozt09oWt\nldL6k3wPTM4pd45eSXGR9qgSdsV+Fow/luD1UYRQAaUI1CyGdss5SMdKbbL5XMQ3\n9K30BsF/AgMBAAECggEARnkYvFZ/Y2RjsfO7jdN2MWOjuIbm99S5we6zGak1syLG\nix4VHS9brWUNC8GvIxuRVRiskrKE5CKjwhGoHCkIZTWg0w12VRiXBQfIBgZcgIJ6\neC4A4kWFj3BGN/Je9EOquvf8+V4W06EIqGPsm8vmVzIw5tYNO7MkVwlmmsed11SP\ni6MHarNGvCkUoDfwYCkbwq+AVnGb9D+D0HIDQVaF8Rghyn5S/eq/BotuKIzIvMbp\nYnmjpIGtnOTtdtIHWehaCbfqfER3Mwk+PvhSpzRe89g0V1aNEXXLtdtTMXZdlR/i\n0fMxQK3ZRZIBG2JHGylj/AnUM6EZJ9nfiuhGoLAOqQKBgQDrNQDFCqdtVnBTrn09\n+F8Xq/tmcltvzP8bxBXMEwoNG8Cdhcjc5w/6XH1jxtSw5Vsx0X6kXaeaADj13nId\n3sXcJGgt5/GBEu6O+dQUSBpgEzGaCGR8BHeCH2ROPsqUrMeKTlAJnFMi6wnW9kPq\n2Xu/p2d4CNZyLd2q705F+U4wKQKBgQDN+TqzCNQou2XKRH/yegFhaAqY8+WFfBRb\nV9QtST+9uUcLucE14UxcGx+9Phao1f/DBwaIQu+UegHEMhkJdKT1q5/8OcNLADUL\nWTC2HdO1z2YMkAW9l0C9Hhw/8O6qwz9zy+x3ogJ0w5XHgIaHFxeDEk88hGvQN7CC\nqGJALB55ZwKBgA5rl3p9JrqrXAOlZQRRn/Lhlm43gKegF9vp77QtTqZzFyIRO7lf\naTleRknBvPSDe03YnD0TiN0GOnfIhZKTP+o5STHXUJUrRfj6FCiSKxvM0XOyJAb+\ndx1BM3MgombvGOS/3GRaczZm1pmZS5ywbMfZSZywXgVuDnMWbOQZXtPRAoGAMx2O\nu6+NNy6KbE/jkMFGZm3zc1HTu/S2+JQrS7HJ58N7JiXLFRv8Xz87+TLXXL7+4d90\nd4xk+Gvu1Em6fOY9qdoVsfqDxLEgeNiBhjCQwaXepW94fTx0DHrUd+nK0QXzUUFi\nRa4m/eMr4H684/mPFDAPCe2y89FeNI6lE1ffmDECgYAmutxgrcCJ+WHpwEgzO6zl\nCWlg5xDm7EfDysPnNVcQcY2KTgGhjCQieZR06p+yCM00i/QokMT6B67Hj7RSVBSM\n3TXfLivm1htvGOxcHcfWZqRd0YkQN4UPQ3WbqL2M3+umhhxXAibraBn2x2ROBNaM\nhDkUQPWyHr9TmeHnk6XV8Q==\n-----END PRIVATE KEY-----\n",
6+
"client_email": "firebase-adminsdk-92kaq@examplefcm-38208.iam.gserviceaccount.com",
7+
"client_id": "105473257963047176281",
8+
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
9+
"token_uri": "https://oauth2.googleapis.com/token",
10+
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
11+
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-92kaq%40examplefcm-38208.iam.gserviceaccount.com",
12+
"universe_domain": "googleapis.com"
13+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package id.syafii.examplefcm
2+
3+
import android.os.Bundle
4+
import androidx.activity.ComponentActivity
5+
import androidx.activity.compose.setContent
6+
import androidx.compose.foundation.layout.fillMaxSize
7+
import androidx.compose.material3.MaterialTheme
8+
import androidx.compose.material3.Surface
9+
import androidx.compose.material3.Text
10+
import androidx.compose.runtime.Composable
11+
import androidx.compose.ui.Modifier
12+
import androidx.compose.ui.tooling.preview.Preview
13+
import id.syafii.examplefcm.ui.theme.ExampleFCMTheme
14+
15+
class MainActivity : ComponentActivity() {
16+
override fun onCreate(savedInstanceState: Bundle?) {
17+
super.onCreate(savedInstanceState)
18+
setContent {
19+
ExampleFCMTheme {
20+
// A surface container using the 'background' color from the theme
21+
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
22+
Greeting("Android")
23+
}
24+
}
25+
}
26+
}
27+
}
28+
29+
@Composable
30+
fun Greeting(name: String, modifier: Modifier = Modifier) {
31+
Text(
32+
text = "Hello $name!",
33+
modifier = modifier
34+
)
35+
}
36+
37+
@Preview(showBackground = true)
38+
@Composable
39+
fun GreetingPreview() {
40+
ExampleFCMTheme {
41+
Greeting("Android")
42+
}
43+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy