Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
start/.gradle/5.1.1/gc.properties
start/.gradle/5.1.1/executionHistory/executionHistory.bin
start/.gradle/5.1.1/executionHistory/executionHistory.lock
start/.gradle/5.1.1/fileChanges/last-build.bin
start/.gradle/5.1.1/fileHashes/fileHashes.bin
start/.gradle/5.1.1/fileHashes/fileHashes.lock
start/.gradle/5.4.1/gc.properties
start/.gradle/5.4.1/executionHistory/executionHistory.bin
start/.gradle/5.4.1/executionHistory/executionHistory.lock
start/.gradle/5.4.1/fileChanges/last-build.bin
start/.gradle/5.4.1/fileContent/fileContent.lock
start/.gradle/5.4.1/fileHashes/fileHashes.bin
start/.gradle/5.4.1/fileHashes/fileHashes.lock
start/.gradle/5.4.1/fileHashes/resourceHashesCache.bin
start/.gradle/5.4.1/javaCompile/classAnalysis.bin
start/.gradle/5.4.1/javaCompile/jarAnalysis.bin
start/.gradle/5.4.1/javaCompile/javaCompile.lock
start/.gradle/5.4.1/javaCompile/taskHistory.bin
start/.gradle/buildOutputCleanup/buildOutputCleanup.lock
start/.gradle/buildOutputCleanup/cache.properties
start/.gradle/buildOutputCleanup/outputFiles.bin
start/.gradle/vcs-1/gc.properties
*.iml
.gradle
/local.properties
/.idea
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties/
53 changes: 35 additions & 18 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 30
defaultConfig {
applicationId "com.example.android.eggtimernotifications"
applicationId "dev.filipebezerra.android.eggtimernotifications"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
Expand All @@ -34,30 +35,46 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

// Enables data binding.
buildFeatures {
dataBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Kotlin support
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0-rc01'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// AndroidX
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "androidx.core:core-ktx:1.3.2"
implementation "androidx.fragment:fragment-ktx:$fragment_version"
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.work:work-runtime-ktx:$work_version"

// Firebase
implementation platform("com.google.firebase:firebase-bom:26.2.0")
implementation "com.google.firebase:firebase-messaging-ktx:21.0.1"

// Testing
testImplementation "junit:junit:4.13.1"
androidTestImplementation "androidx.test:runner:1.3.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
// optional - Test helpers for LiveData
testImplementation "androidx.arch.core:core-testing:$arch_version"
// Testing Fragments in Isolation
debugImplementation "androidx.fragment:fragment-testing:$fragment_version"
// Test helpers
androidTestImplementation "androidx.work:work-testing:$work_version"

//for fcm
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-iid:19.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'android.arch.work:work-runtime:1.0.1'
// Third-party
implementation 'com.jakewharton.timber:timber:4.7.1'
}
47 changes: 47 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "662070897175",
"project_id": "egg-timer-59de8",
"storage_bucket": "egg-timer-59de8.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:662070897175:android:3becb7029d5f23f260ca52",
"android_client_info": {
"package_name": "dev.filipebezerra.android.eggtimernotifications"
}
},
"oauth_client": [
{
"client_id": "662070897175-vnfjeoi2oguro0dbvt48ktvbfru7kt34.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "dev.filipebezerra.android.eggtimernotifications",
"certificate_hash": "8c2424ba513d384fd4ec9f1dfa6099b0b36e677d"
}
},
{
"client_id": "662070897175-pd3g3r728ecgd20o2m3dil14br2k9kha.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBB6hjA-ebIWIonwu0quEzYLaZG3v_4CM8"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "662070897175-pd3g3r728ecgd20o2m3dil14br2k9kha.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
85 changes: 55 additions & 30 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,50 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2019 Google Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.eggtimernotifications">
package="dev.filipebezerra.android.eggtimernotifications"
>

<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />

<application
android:name=".EggTimerApplication"
android:allowBackup="true"
android:icon="@drawable/egg_icon"
android:label="@string/app_name"
android:roundIcon="@drawable/egg_notification"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".MainActivity">
android:theme="@style/AppTheme"
>
<activity
android:name="dev.filipebezerra.android.eggtimernotifications.MainActivity"
android:taskAffinity=""
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="dev.filipebezerra.android.eggtimernotifications.important.ImportantActivity"
android:excludeFromRecents="true"
android:taskAffinity=""
/>

<receiver
android:name=".receiver.AlarmReceiver"
android:enabled="true"
android:exported="false">
</receiver>
android:name="dev.filipebezerra.android.eggtimernotifications.receiver.AlarmReceiver"
android:enabled="true"
android:exported="false"
/>
<receiver
android:name=".receiver.SnoozeReceiver"
android:enabled="true"
android:exported="false">
</receiver>
android:name="dev.filipebezerra.android.eggtimernotifications.receiver.SnoozeReceiver"
android:enabled="true"
android:exported="false"
/>

<service
android:name=".service.EggTimerFirebaseMessagingService"
android:exported="false"
>
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<!--
Set custom default icon. This is used when no icon is set for incoming notification messages.
See README(https://goo.gl/l4GJaQ) for more.
-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:value="@drawable/common_google_signin_btn_icon_dark"
/>
<!--
Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message. See README(https://goo.gl/6BKBk7) for more.
-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:value="@color/colorAccent"
/>
<!-- FCM Default Channel -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/breakfast_notification_channel_id"
/>
</application>

</manifest>

This file was deleted.

Loading