-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ahmad Idrees
committed
Jul 14, 2022
0 parents
commit 1a9a285
Showing
54 changed files
with
1,501 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
## Using Firebase BOM Library in your Android application | ||
|
||
###Add this in your build.gradle | ||
```groovy | ||
implementation '' | ||
``` | ||
###Do not forget to add internet permission in manifest if already not present | ||
```xml | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
``` | ||
###For FCM Notifications, initialize it in onCreate() Method of Application class : | ||
```kotlin | ||
FirebaseFCM.initializeFCM(context, "/topics/$packageName") | ||
``` | ||
|
||
###For FireBase Analytics, create an object FirebaseAnalytics, passing context init : | ||
```kotlin | ||
private val fbAnalytics by lazy { FirebaseAnalytics(this) } | ||
``` | ||
Send eventName & eventStatus init: | ||
|
||
```kotlin | ||
fbAnalytics.sendEventAnalytics(eventName, eventStatus) | ||
``` | ||
|
||
###For FireBase Remote Config, create an object RemoteConfigDate, passing topicName init : | ||
```kotlin | ||
private val remoteConfig = RemoteConfigDate("topicName") | ||
``` | ||
Make your Custom model the way you want to receive model, call getRemoteConfig() to get data: | ||
```kotlin | ||
remoteConfig.getRemoteConfig { | ||
it?.let { | ||
val remoteJson = Gson().toJson(it) | ||
val remoteData = Gson().fromJson(remoteJson, RemoteModel::class.java) | ||
RemoteConfigDate.remoteAdSettings = remoteData | ||
Log.e("RemoteConfigNew*", "${remoteConfig.getRemoteData<RemoteModel>()}") | ||
|
||
if (remoteData.splashNative.isRemoteAdOn()) { | ||
Log.e("RemoteConfigNew*", "${remoteData.splashNative.isRemoteAdOn()}") | ||
} | ||
} | ||
} | ||
``` | ||
Data Class to receive the response: | ||
```kotlin | ||
@Keep | ||
data class RemoteModel( | ||
@SerializedName("splashNative") | ||
val splashNative: RemoteDetailModel = RemoteDetailModel() | ||
) { | ||
override fun toString(): String { | ||
return "splashNative : $splashNative" | ||
} | ||
} | ||
``` | ||
|
||
### License | ||
``` | ||
Copyright (C) 2022 | ||
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:https://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. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'org.jetbrains.kotlin.android' | ||
id 'com.google.gms.google-services' | ||
id 'com.google.firebase.crashlytics' | ||
} | ||
|
||
android { | ||
compileSdk 32 | ||
|
||
defaultConfig { | ||
applicationId "ai.bom.firebase" | ||
minSdk 21 | ||
targetSdk 32 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
|
||
release { | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation project(':firebaseLib') | ||
|
||
implementation 'androidx.core:core-ktx:1.8.0' | ||
implementation 'androidx.appcompat:appcompat:1.4.2' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
{ | ||
"project_info": { | ||
"project_number": "744390342276", | ||
"project_id": "fir-e967c", | ||
"storage_bucket": "fir-e967c.appspot.com" | ||
}, | ||
"client": [ | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:744390342276:android:ac69594aa48e365aee34d1", | ||
"android_client_info": { | ||
"package_name": "ai.bom.firebase" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyCIpEz4fDK_LI2FCj6eJvTY2jQme1dzzws" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:744390342276:android:d471528021ee286dee34d1", | ||
"android_client_info": { | ||
"package_name": "com.all.video.downloader.fast.downloading.video.saver.browser" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyCIpEz4fDK_LI2FCj6eJvTY2jQme1dzzws" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:744390342276:android:dbe485ec01889a00ee34d1", | ||
"android_client_info": { | ||
"package_name": "com.app.remoteconfigdemo" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyCIpEz4fDK_LI2FCj6eJvTY2jQme1dzzws" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:744390342276:android:e2fc5fdc69783cf9ee34d1", | ||
"android_client_info": { | ||
"package_name": "com.app.remoteconfigdemo.debug" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyCIpEz4fDK_LI2FCj6eJvTY2jQme1dzzws" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:744390342276:android:785eb52588d59bc7ee34d1", | ||
"android_client_info": { | ||
"package_name": "smart.app.lock.master.locker.private.pin.pattern.safe.secure" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyCIpEz4fDK_LI2FCj6eJvTY2jQme1dzzws" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "744390342276-juc53gc7jmnb4tvnturfoh9mveh0oacl.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"configuration_version": "1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http:https://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Oops, something went wrong.