Skip to content

Commit

Permalink
Merge pull request #23 from AdityaBavadekar/dev
Browse files Browse the repository at this point in the history
Added emoji dataset file and added AppCheck
  • Loading branch information
AdityaBavadekar authored Feb 19, 2023
2 parents fba4e3b + 41cdbcd commit 1429deb
Show file tree
Hide file tree
Showing 416 changed files with 12,018 additions and 1,537 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Android CI

on:
push:
branches: [ "master","dev"]
branches: [ "master"]
paths-ignore: ["**.md",".gitignore"]
pull_request:
branches: [ "master"]
Expand Down
6 changes: 6 additions & 0 deletions .idea/copyright/Aditya_Bavadekar.xml

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

7 changes: 7 additions & 0 deletions .idea/copyright/profiles_settings.xml

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

7 changes: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ android {
compileSdk Versions.COMPILE_SDK
namespace "com.adityaamolbavadekar.messenger"

def timestamp = System.currentTimeMillis()
Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())

Expand All @@ -44,7 +45,7 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

buildConfigField "String", "DATE", "\"${new Date()}\""
buildConfigField "Long", "TIMESTAMP", "Long.parseLong(\"${System.currentTimeMillis()}\")"
buildConfigField "Long", "TIMESTAMP", "Long.parseLong(\"${timestamp}\")"

buildConfigField "String", "FCM_MESSAGING_SERVER_KEY", "\"${properties.getProperty("FCM_MESSAGING_SERVER_KEY")}\""
buildConfigField "String", "MESSENGER_URL", "\"https://github.com/AdityaBavadekar/Messenger\""
Expand Down Expand Up @@ -93,7 +94,7 @@ android {

variant.outputs.each { output ->
output.outputFileName = output.outputFileName.replace(".apk", "-${variant.versionName}.apk")
print("${output.outputFileName} [Versions code : ${variant.versionCode},Version name : ${variant.versionName}] " + "\n")
print("${output.outputFileName} [Versions code : ${variant.versionCode}, Version name : ${variant.versionName}, BuildTimestamp : ${timestamp}] " + "\n")
}
}

Expand Down Expand Up @@ -131,6 +132,7 @@ dependencies {
implementation Dependencies.FIREBASE_STORAGE
implementation Dependencies.FRAGMENT_KTX
implementation Dependencies.GLIDE
testImplementation 'org.junit.jupiter:junit-jupiter'
kapt Dependencies.GLIDE_COMPILER
implementation Dependencies.JSOUP
implementation Dependencies.KOTLIN
Expand All @@ -141,6 +143,7 @@ dependencies {
implementation Dependencies.MATERIAL
implementation Dependencies.NAVIGATION_FRAGMENT
implementation Dependencies.NAVIGATION_UI
implementation Dependencies.OSS_LICENSES
implementation Dependencies.PAGING
implementation Dependencies.PHOTOVIEW
implementation Dependencies.PINLOG
Expand Down
16 changes: 16 additions & 0 deletions app/lint.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2023 Aditya Bavadekar
~
~ 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.
-->

<lint>
<issue id="UselessParent" severity="ignore" />
<issue id="UseCompoundDrawables" severity="ignore" />
Expand Down
19 changes: 15 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
~
~ Copyright 2022 Aditya Bavadekar
~ Copyright 2023 Aditya Bavadekar
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -13,7 +12,6 @@
~ 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"
Expand All @@ -37,7 +35,7 @@
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />

<uses-permission android:name="android.permission.USE_CREDENTIALS" /> <!-- For conversation 'shortcuts' on the home screen -->
<uses-permission android:name="android.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> <!-- For Security -->
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.CAMERA" />
Expand Down Expand Up @@ -232,12 +230,25 @@
android:theme="@style/Messenger.ShakePresenterTheme"
android:windowSoftInputMode="stateHidden" />

<activity
android:name=".ui.UpdatePresenter"
android:exported="false"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:theme="@style/Messenger.ShakePresenterTheme"
android:windowSoftInputMode="stateHidden" />

<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Messenger.NoActionBarBarSplashScreen" />

<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:exported="false"
android:theme="@style/MessengerTheme.Material3" />

<provider
android:name=".installation.InstallationProvider"
android:authorities="com.adityaamolbavadekar.messenger.installation.applicationInitProvider"
Expand Down
9 changes: 5 additions & 4 deletions app/src/main/java/com/adityaamolbavadekar/messenger/App.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
*
* Copyright 2022 Aditya Bavadekar
* Copyright 2023 Aditya Bavadekar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,17 +12,18 @@
* 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.
*
*/

package com.adityaamolbavadekar.messenger

import android.app.Application
import com.adityaamolbavadekar.messenger.database.conversations.ApplicationDatabase
import com.adityaamolbavadekar.messenger.managers.PrefsManager
import com.adityaamolbavadekar.messenger.utils.Constants
import com.adityaamolbavadekar.messenger.utils.logging.InternalLogger
import com.adityaamolbavadekar.messenger.utils.startup.AppStartup
import com.adityaamolbavadekar.pinlog.PinLog
import com.google.firebase.FirebaseApp

class App : Application(),Thread.UncaughtExceptionHandler {

Expand All @@ -32,6 +32,7 @@ class App : Application(),Thread.UncaughtExceptionHandler {
}

override fun onCreate() {
FirebaseApp.initializeApp(this) // If called from another thread or process
AppStartup.onApplicationCreated(this)
super.onCreate()
AppStartup.startApplicationInitialisation()
Expand All @@ -44,7 +45,7 @@ class App : Application(),Thread.UncaughtExceptionHandler {
e
)
PrefsManager(this.applicationContext).saveCrashInfo()
PinLog.CrashReporter().sendCrashReportWithEmail(t, e, arrayOf(), null, null)
PinLog.CrashReporter().sendCrashReportWithEmail(t, e, arrayOf(Constants.SUPPORT_EMAIL), null, null)
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
*
* Copyright 2022 Aditya Bavadekar
* Copyright 2023 Aditya Bavadekar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +12,6 @@
* 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.
*
*/

package com.adityaamolbavadekar.messenger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
*
* Copyright 2022 Aditya Bavadekar
* Copyright 2023 Aditya Bavadekar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +12,6 @@
* 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.
*
*/

package com.adityaamolbavadekar.messenger.account
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
*
* Copyright 2022 Aditya Bavadekar
* Copyright 2023 Aditya Bavadekar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +12,6 @@
* 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.
*
*/

package com.adityaamolbavadekar.messenger.account
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
*
* Copyright 2022 Aditya Bavadekar
* Copyright 2023 Aditya Bavadekar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +12,6 @@
* 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.
*
*/

package com.adityaamolbavadekar.messenger.account
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
*
* Copyright 2022 Aditya Bavadekar
* Copyright 2023 Aditya Bavadekar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,14 +12,14 @@
* 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.
*
*/

package com.adityaamolbavadekar.messenger.constants


object PreferenceKeys {


/*app crash data*/
const val APP_DID_CRASH = "app.crash.happened"
const val APP_LAST_CRASH_TIMESTAMP = "app.crash.timestamp"
Expand Down Expand Up @@ -62,6 +61,12 @@ object PreferenceKeys {
const val ABOUT_OPEN_SOURCE_LICENCES = "about.open_source"
const val ABOUT_TERMS = "about.terms"
const val ABOUT_POLICY = "about.policy"
const val APP_UPDATE_CHECKED = "app.update.lastChecked"
const val APP_UPDATE_VERSION_NAME = "app.update.versionName"
const val APP_UPDATE_VERSION_CODE = "app.update.versionCode"
const val APP_UPDATE_TIMESTAMP = "app.update.timestamp"
const val APP_UPDATE_LINK = "app.update.link"
const val CONTACTS_SYNC = "app.contacts.sync"
const val IME_KEYBOARD_HEIGHT = "messenger.value.ime.height"
const val DEV_MODE_ENABLE_FROM_SETTINGS = "app.dev.enabled"
/*app data*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
*
* Copyright 2022 Aditya Bavadekar
* Copyright 2023 Aditya Bavadekar
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +12,6 @@
* 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.
*
*/

package com.adityaamolbavadekar.messenger.contact
Expand Down
Loading

0 comments on commit 1429deb

Please sign in to comment.