diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..374806c
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: https://saweria.co/amirisback
diff --git a/.github/workflows/detekt-analysis.yml b/.github/workflows/detekt-analysis.yml
new file mode 100644
index 0000000..25c264d
--- /dev/null
+++ b/.github/workflows/detekt-analysis.yml
@@ -0,0 +1,103 @@
+# This workflow performs a static analysis of your Kotlin source code using
+# Detekt.
+#
+# Scans are triggered:
+# 1. On every push to default and protected branches
+# 2. On every Pull Request targeting the default branch
+# 3. On a weekly schedule
+# 4. Manually, on demand, via the "workflow_dispatch" event
+#
+# The workflow should work with no modifications, but you might like to use a
+# later version of the Detekt CLI by modifing the $DETEKT_RELEASE_TAG
+# environment variable.
+name: Scan with Detekt
+
+on:
+ # Triggers the workflow on push or pull request events but only for default and protected branches
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+ schedule:
+ - cron: '27 4 * * 1'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+env:
+ # Release tag associated with version of Detekt to be installed
+ # SARIF support (required for this workflow) was introduced in Detekt v1.15.0
+ DETEKT_RELEASE_TAG: v1.15.0
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "scan"
+ scan:
+ name: Scan
+ # The type of runner that the job will run on
+ runs-on: ubuntu-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v2
+
+ # Gets the download URL associated with the $DETEKT_RELEASE_TAG
+ - name: Get Detekt download URL
+ id: detekt_info
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ DETEKT_DOWNLOAD_URL=$( gh api graphql --field tagName=$DETEKT_RELEASE_TAG --raw-field query='
+ query getReleaseAssetDownloadUrl($tagName: String!) {
+ repository(name: "detekt", owner: "detekt") {
+ release(tagName: $tagName) {
+ releaseAssets(name: "detekt", first: 1) {
+ nodes {
+ downloadUrl
+ }
+ }
+ }
+ }
+ }
+ ' | \
+ jq --raw-output '.data.repository.release.releaseAssets.nodes[0].downloadUrl' )
+ echo "::set-output name=download_url::$DETEKT_DOWNLOAD_URL"
+
+ # Sets up the detekt cli
+ - name: Setup Detekt
+ run: |
+ dest=$( mktemp -d )
+ curl --request GET \
+ --url ${{ steps.detekt_info.outputs.download_url }} \
+ --silent \
+ --location \
+ --output $dest/detekt
+ chmod a+x $dest/detekt
+ echo $dest >> $GITHUB_PATH
+
+ # Performs static analysis using Detekt
+ - name: Run Detekt
+ continue-on-error: true
+ run: |
+ detekt --input ${{ github.workspace }} --report sarif:${{ github.workspace }}/detekt.sarif.json
+
+ # Modifies the SARIF output produced by Detekt so that absolute URIs are relative
+ # This is so we can easily map results onto their source files
+ # This can be removed once relative URI support lands in Detekt: https://git.io/JLBbA
+ - name: Make artifact location URIs relative
+ continue-on-error: true
+ run: |
+ echo "$(
+ jq \
+ --arg github_workspace ${{ github.workspace }} \
+ '. | ( .runs[].results[].locations[].physicalLocation.artifactLocation.uri |= if test($github_workspace) then .[($github_workspace | length | . + 1):] else . end )' \
+ ${{ github.workspace }}/detekt.sarif.json
+ )" > ${{ github.workspace }}/detekt.sarif.json
+
+ # Uploads results to GitHub repository using the upload-sarif action
+ - uses: github/codeql-action/upload-sarif@v1
+ with:
+ # Path to SARIF file relative to the root of the repository
+ sarif_file: ${{ github.workspace }}/detekt.sarif.json
+ checkout_path: ${{ github.workspace }}
diff --git a/.github/workflows/generate-apk-aab.yml b/.github/workflows/generate-apk-aab.yml
new file mode 100644
index 0000000..8f3f91a
--- /dev/null
+++ b/.github/workflows/generate-apk-aab.yml
@@ -0,0 +1,52 @@
+name: Generate APK / AAB
+
+on:
+ # Triggers the workflow on push or pull request events but only for default and protected branches
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+
+ - name: Set Up JDK
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+
+ - name: Change wrapper permissions
+ run: chmod +x ./gradlew
+
+ - name: Run tests
+ run: ./gradlew test
+
+ # Run Build Project
+ - name: Build project
+ run: ./gradlew build
+
+ # Create APK Debug
+ - name: Build apk debug project (APK)
+ run: ./gradlew assembleDebug
+
+ # Create APK Release
+ - name: Build apk release project (APK)
+ run: ./gradlew assemble
+
+ # Create Bundle AAB Release
+ # Noted for main module build [module-name]:bundleRelease
+ - name: Build app bundle release (AAB)
+ run: ./gradlew app:bundleRelease
+
+ # Upload Artifact Build
+ # Noted For Output [module-name]/build/outputs/
+ - name: Upload build APK / AAB
+ uses: actions/upload-artifact@v2
+ with:
+ name: App bundle(s) and APK(s) generated
+ path: app/build/outputs/
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3ed3dcb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,35 @@
+*.iml
+/.gradle
+.gradle
+.idea
+/local.properties
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+.DS_Store
+build
+/build
+/captures
+.externalNativeBuild
+
+built application files
+.apk
+.ap_
+
+files for the dex VM
+*.dex
+
+Java class files
+*.class
+
+generated files
+bin/
+gen/
+.externalNativeBuild/
+
+Local configuration file (sdk path, etc)
+local.properties
+app/version.properties
+
+# SonarQube
+.sonar/
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..0f529ac
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2020 Muhammad Faisal Amir
+
+ 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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d838d2a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,244 @@
+![ScreenShoot Apps](docs/image/ss_banner.png?raw=true)
+
+## About This Project
+[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-frogo--android--sdk-brightgreen.svg?style=flat-square)](https://android-arsenal.com/details/1/8317)
+[![](https://jitpack.io/v/frogobox/frogo-android-sdk.svg?style=flat-square)](https://jitpack.io/#frogobox/frogo-android-sdk)
+SDK for anything your problem to make easier developing android apps
+
+## Version Release
+This Is Latest Release
+
+ $version_release = 2.0.8
+
+What's New??
+
+ * Update build gradle kts version library *
+
+## Download this project
+
+### Step 1. Add the JitPack repository to your build file (build.gradle : Project)
+
+#### Groovy Gradle
+
+ // Add it in your root build.gradle at the end of repositories:
+
+ allprojects {
+ repositories {
+ ...
+ maven { url 'https://jitpack.io' }
+ }
+ }
+
+#### Kotlin DSL Gradle
+
+```kotlin
+// Add it in your root build.gradle.kts at the end of repositories:
+
+allprojects {
+ repositories {
+ ...
+ maven { url = uri("https://jitpack.io") }
+ }
+}
+```
+
+### Step 2. Add the dependency (build.gradle : Module)
+
+ #### Groovy Gradle
+
+ dependencies {
+ // library frogo-sdk
+ implementation 'com.github.frogobox:frogo-android-sdk:2.0.8'
+ }
+
+ #### Kotlin DSL Gradle
+
+ dependencies {
+ // library frogo-sdk
+ implementation("com.github.frogobox:frogo-android-sdk:2.0.8")
+ }
+
+### Step 3. Function from this SDK
+
+#### All Class SDK
+```kotlin
+FrogoActivity
+FrogoApiCallback
+FrogoApiClient
+FrogoApiModel
+FrogoComposeActivity
+FrogoConstant
+FrogoDate
+FrogoFragment
+FrogoFunc
+FrogoLiveEvent
+FrogoLocalCallback
+FrogoMusic
+FrogoNavigation
+FrogoPreference
+```
+
+#### FrogoActivity
+```kotlin
+fun setupDetailActivity(title: String)
+
+fun setupChildFragment(frameId: Int, fragment: Fragment)
+
+fun showToast(message: String)
+
+fun setupEventEmptyView(view: View, isEmpty: Boolean)
+
+fun setupEventProgressView(view: View, progress: Boolean)
+
+fun checkExtra(extraKey: String): Boolean
+
+fun baseFragmentNewInstance(
+ fragment: FrogoFragment<*>,
+ argumentKey: String,
+ extraDataResult: Model
+)
+
+fun verifySignature()
+
+fun readSignature()
+
+fun verifyInstallerId()
+
+fun verifyUnauthorizedApps()
+
+fun verifyStores()
+
+fun verifyDebug()
+
+fun verifyEmulator()
+
+fun showApkSignatures()
+```
+
+#### FrogoFragment
+```kotlin
+fun setupChildFragment(frameId: Int, fragment: Fragment)
+
+fun checkArgument(argsKey: String): Boolean
+
+fun setupEventEmptyView(view: View, isEmpty: Boolean)
+
+fun setupEventProgressView(view: View, progress: Boolean)
+
+fun showToast(message: String)
+
+fun baseNewInstance(argsKey: String, data: Model)
+```
+#### FrogoFunc
+
+```kotlin
+fun createFolderPictureVideo()
+
+fun getVideoFilePath(): String
+
+fun createDialogDefault(
+ context: Context,
+ title: String,
+ message: String,
+ listenerYes: () -> Unit,
+ listenerNo: () -> Unit
+)
+
+fun noAction(): Boolean
+
+fun randomNumber(start: Int, end: Int): Int
+
+fun isNetworkAvailable(context: Context): Boolean?
+
+fun fetchRawData(mContext: Context, sourceRaw: Int): ArrayList
+
+fun fetchRawData(mContext: Context, sourceRaw: Int, shuffle: Boolean): ArrayList
+
+fun getJsonFromAsset(context: Context, filename: String): String?
+
+fun getArrayFromJsonAsset(context: Context, filename: String): MutableList
+
+fun getDrawableString(context: Context, nameResource: String): Int
+
+fun getRawString(context: Context, nameResource: String): Int
+```
+
+#### FrogoMusic
+
+```kotlin
+fun playMusic(context: Context, musicFile: Int)
+
+fun stopMusic()
+
+fun pauseMusic()
+```
+
+#### FrogoDate
+
+```kotlin
+fun getTimeStamp(): String
+
+fun getTimeNow(): String
+
+fun getCurrentDate(format: String): String
+
+fun dateTimeToTimeStamp(date: String?): Long
+
+fun getCurrentUTC(): String
+
+fun timetoHour(date: String?): String
+
+fun dateTimeTZtoHour(date: String?): String
+
+fun DateTimeMonth(date: String?): String
+
+fun dateTimeSet(date: String?): String
+
+fun dateTimeProblem(date: String?): String
+
+fun getTimeAgo(time: Long): String?
+
+fun compareDate(newDate: String): String?
+
+fun messageDate(newDate: String): String?
+
+fun getDataChat(time: Long): String?
+
+fun convertClassificationDate(string: String?): String
+
+fun convertDateNewFormat(string: String?): String
+
+fun convertLongDateNewFormat(string: String?): String
+
+fun revertFromLongDateNewFormat(string: String?): String
+
+fun convertTargetDate(string: String?): String
+
+fun diffTime(timeStart: String, timeEnd: String): Long
+```
+
+#### FrogoComposeActivity
+
+ In Progress Development
+
+
+## Colaborator
+Very open to anyone, I'll write your name under this, please contribute by sending an email to me
+
+- Mail To faisalamircs@gmail.com
+- Subject : Github _ [Github-Username-Account] _ [Language] _ [Repository-Name]
+- Example : Github_amirisback_kotlin_admob-helper-implementation
+
+Name Of Contribute
+- Muhammad Faisal Amir
+- Waiting List
+- Waiting List
+
+Waiting for your contribute
+
+## Attention !!!
+- Please enjoy and don't forget fork and give a star
+- Don't Forget Follow My Github Account
+
+
+![ScreenShoot Apps](docs/image/mad_score.png?raw=true)
diff --git a/_config.yml b/_config.yml
new file mode 100644
index 0000000..c419263
--- /dev/null
+++ b/_config.yml
@@ -0,0 +1 @@
+theme: jekyll-theme-cayman
\ No newline at end of file
diff --git a/action.yml b/action.yml
new file mode 100644
index 0000000..7a3e21a
--- /dev/null
+++ b/action.yml
@@ -0,0 +1,16 @@
+name: 'Frogo-Android-SDK'
+description: 'SDK for anything your problem to make easier developing android apps'
+author: 'Frogobox'
+branding:
+ icon: archive
+ color: green
+inputs:
+ myInput:
+ description: 'Input to use'
+ required: false
+ default: 'world'
+runs:
+ using: 'docker'
+ image: 'Dockerfile'
+ args:
+ - ${{ inputs.myInput }}
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
new file mode 100644
index 0000000..3a01354
--- /dev/null
+++ b/app/build.gradle.kts
@@ -0,0 +1,113 @@
+plugins {
+ id("com.android.application")
+ id("org.jetbrains.kotlin.android")
+ id("kotlin-kapt")
+}
+
+android {
+
+ compileSdk = ProjectSetting.PROJECT_COMPILE_SDK
+
+ defaultConfig {
+ applicationId = ProjectSetting.PROJECT_APP_ID
+ minSdk = ProjectSetting.PROJECT_MIN_SDK
+ targetSdk = ProjectSetting.PROJECT_TARGET_SDK
+ versionCode = ProjectSetting.PROJECT_VERSION_CODE
+ versionName = ProjectSetting.PROJECT_VERSION_NAME
+
+ multiDexEnabled = true
+ vectorDrawables.useSupportLibrary = true
+
+ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
+
+ // Declaration build config
+ buildConfigField("String", "DATABASE_NAME", ProjectSetting.DB)
+
+ // Naming APK // AAB
+ setProperty("archivesBaseName", "${ProjectSetting.NAME_APK}(${versionName})")
+
+ // Declaration apps name debug mode
+ val debugAttribute = "Development"
+ val nameAppDebug = "${ProjectSetting.NAME_APP} $debugAttribute"
+ resourceConfigurations += setOf("en", "id")
+
+ // Inject app name for debug
+ resValue("string", "app_name", nameAppDebug)
+
+ }
+
+ signingConfigs {
+ create("release") {
+ // You need to specify either an absolute path or include the
+ // keystore file in the same directory as the build.gradle file.
+ // [PROJECT FOLDER NAME/app/[COPY YOUT KEY STORE] .jks in here
+ storeFile = file(ProjectSetting.PLAYSTORE_STORE_FILE)
+ storePassword = ProjectSetting.PLAYSTORE_STORE_PASSWORD
+ keyAlias = ProjectSetting.PLAYSTORE_KEY_ALIAS
+ keyPassword = ProjectSetting.PLAYSTORE_KEY_PASSWORD
+ }
+ }
+
+ buildTypes {
+ getByName("release") {
+ isMinifyEnabled = false
+
+ proguardFiles(
+ getDefaultProguardFile("proguard-android-optimize.txt"),
+ "proguard-rules.pro"
+ )
+
+ // Generated Signed APK / AAB
+ signingConfig = signingConfigs.getByName("release")
+
+ // Inject app name for release
+ resValue("string", "app_name", ProjectSetting.APP_NAME)
+
+ }
+ }
+
+ buildFeatures {
+ viewBinding = true
+ compose = true
+ }
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
+ }
+
+ composeOptions {
+ kotlinCompilerExtensionVersion = Dependency.COMPOSE_VERSION
+ }
+
+ tasks.withType {
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_11.toString()
+ }
+ }
+
+}
+
+dependencies {
+
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Dependency.KOTLIN_VERSION}")
+
+ implementation(project(":frogosdk"))
+
+ implementation("androidx.core:core-ktx:1.7.0")
+ implementation("androidx.appcompat:appcompat:1.4.1")
+
+ implementation("androidx.work:work-runtime-ktx:2.7.1")
+ implementation("androidx.constraintlayout:constraintlayout:2.1.3")
+
+ implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
+ implementation("androidx.activity:activity-compose:1.4.0")
+
+ implementation("androidx.compose.ui:ui:${Dependency.COMPOSE_VERSION}")
+ implementation("androidx.compose.material:material:${Dependency.COMPOSE_VERSION}")
+ implementation("androidx.compose.ui:ui-tooling-preview:${Dependency.COMPOSE_VERSION}")
+
+ implementation("com.google.code.gson:gson:2.8.9")
+ implementation("com.google.android.material:material:1.5.0")
+
+}
\ No newline at end of file
diff --git a/app/frogoboxmedia.jks b/app/frogoboxmedia.jks
new file mode 100644
index 0000000..049f261
Binary files /dev/null and b/app/frogoboxmedia.jks differ
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..ff59496
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -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.kts.
+#
+# For more details, see
+# http://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
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..dc01b17
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/frogobox/appsdk/BaseActivity.kt b/app/src/main/java/com/frogobox/appsdk/BaseActivity.kt
new file mode 100644
index 0000000..3cc293d
--- /dev/null
+++ b/app/src/main/java/com/frogobox/appsdk/BaseActivity.kt
@@ -0,0 +1,26 @@
+package com.frogobox.appsdk
+
+import android.os.Bundle
+import androidx.viewbinding.ViewBinding
+import com.frogobox.sdk.core.FrogoActivity
+
+/*
+ * Created by faisalamir on 02/08/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+abstract class BaseActivity : FrogoActivity() {
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/frogobox/appsdk/MainActivity.kt b/app/src/main/java/com/frogobox/appsdk/MainActivity.kt
new file mode 100644
index 0000000..e03ed70
--- /dev/null
+++ b/app/src/main/java/com/frogobox/appsdk/MainActivity.kt
@@ -0,0 +1,24 @@
+package com.frogobox.appsdk
+
+import android.os.Bundle
+import com.frogobox.appsdk.databinding.ActivityMainBinding
+import com.frogobox.sdk.view.FrogoAboutUsActivity
+
+class MainActivity : BaseActivity() {
+
+ override fun setupViewBinding(): ActivityMainBinding {
+ return ActivityMainBinding.inflate(layoutInflater)
+ }
+
+ override fun setupViewModel() {
+ }
+
+ override fun setupUI(savedInstanceState: Bundle?) {
+ binding.apply {
+ tv.text = "Frogo Android SDK"
+ tv.setOnClickListener {
+ baseStartActivity()
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..2b068d1
--- /dev/null
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..07d5da9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..0f5e9cc
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..a571e60
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..61da551
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c41dd28
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..db5080a
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..6dba46d
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..da31a87
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..15ac681
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..b216f2d
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..f25a419
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..e96783c
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..4faecfa
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #6200EE
+ #3700B3
+ #03DAC5
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..177c624
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ ComposeActivity
+
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..fac9291
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..d907dd5
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000..72958eb
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,10 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+ id("com.android.application") version "7.1.2" apply false
+ id("com.android.library") version "7.1.2" apply false
+ id("org.jetbrains.kotlin.android") version Dependency.KOTLIN_VERSION apply false
+}
+
+tasks.register("clean", Delete::class) {
+ delete(rootProject.buildDir)
+}
\ No newline at end of file
diff --git a/buildSrc/.gitignore b/buildSrc/.gitignore
new file mode 100644
index 0000000..7a6cde1
--- /dev/null
+++ b/buildSrc/.gitignore
@@ -0,0 +1,2 @@
+/build
+.gradle
\ No newline at end of file
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
new file mode 100644
index 0000000..c5b36aa
--- /dev/null
+++ b/buildSrc/build.gradle.kts
@@ -0,0 +1,9 @@
+import org.gradle.kotlin.dsl.`kotlin-dsl`
+
+repositories {
+ mavenCentral()
+}
+
+plugins {
+ `kotlin-dsl`
+}
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/Dependency.kt b/buildSrc/src/main/kotlin/Dependency.kt
new file mode 100644
index 0000000..083071e
--- /dev/null
+++ b/buildSrc/src/main/kotlin/Dependency.kt
@@ -0,0 +1,27 @@
+/*
+ * Created by faisalamir on 19/09/21
+ * FrogoRecyclerView
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+
+object Dependency {
+
+ // dependencies version
+
+ const val KOTLIN_VERSION = "1.5.31"
+ const val COMPOSE_VERSION = "1.0.5"
+
+ const val KOIN_VERSION = "3.1.4"
+ const val ROOM_VERSION = "2.4.1"
+
+ const val ACTIVITY_KTX_VERSION = "1.2.3"
+ const val FRAGMENT_KTX_VERSION = "1.3.5"
+
+}
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/ProjectSetting.kt b/buildSrc/src/main/kotlin/ProjectSetting.kt
new file mode 100644
index 0000000..e075168
--- /dev/null
+++ b/buildSrc/src/main/kotlin/ProjectSetting.kt
@@ -0,0 +1,47 @@
+/*
+ * Created by faisalamir on 19/09/21
+ * FrogoRecyclerView
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+
+object ProjectSetting {
+ // project settings
+ const val NAME_APP = "Frogo SDK"
+ val NAME_APK = NAME_APP.toLowerCase().replace(" ", "-")
+
+ val NAME_DB = NAME_APP.toLowerCase().replace(" ", "_")
+ val DB = "\"$NAME_DB.db\""
+
+ const val APP_DOMAIN = "com"
+ const val APP_PLAY_CONSOLE = "frogobox"
+ const val APP_NAME = "appsdk"
+
+ const val LIBRARY_NAME = "sdk"
+
+ const val VERSION_MAJOR = 2
+ const val VERSION_MINOR = 0
+ const val VERSION_PATCH = 8
+
+ const val PROJECT_COMPILE_SDK = 31
+ const val PROJECT_MIN_SDK = 21
+ const val PROJECT_TARGET_SDK = PROJECT_COMPILE_SDK
+
+ const val PROJECT_APP_ID = "$APP_DOMAIN.$APP_PLAY_CONSOLE.$APP_NAME"
+ const val PROJECT_LIB_ID = "$APP_DOMAIN.$APP_PLAY_CONSOLE.$LIBRARY_NAME"
+ const val PROJECT_VERSION_CODE = (VERSION_MAJOR * 100) + (VERSION_MINOR * 10) + (VERSION_PATCH * 1)
+ const val PROJECT_VERSION_NAME = "$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"
+
+ // Key Store
+ const val PLAYSTORE_STORE_FILE = "frogoboxmedia.jks"
+ const val PLAYSTORE_STORE_PASSWORD = "amirisback"
+ const val PLAYSTORE_KEY_ALIAS = "frogoisback"
+ const val PLAYSTORE_KEY_PASSWORD = "amirisback"
+
+}
\ No newline at end of file
diff --git a/docs/image/mad_score.png b/docs/image/mad_score.png
new file mode 100644
index 0000000..ca3430b
Binary files /dev/null and b/docs/image/mad_score.png differ
diff --git a/docs/image/ss_banner.png b/docs/image/ss_banner.png
new file mode 100644
index 0000000..6718090
Binary files /dev/null and b/docs/image/ss_banner.png differ
diff --git a/frogosdk/.gitignore b/frogosdk/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/frogosdk/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/frogosdk/build.gradle.kts b/frogosdk/build.gradle.kts
new file mode 100644
index 0000000..b9d456b
--- /dev/null
+++ b/frogosdk/build.gradle.kts
@@ -0,0 +1,148 @@
+plugins {
+ id("com.android.library")
+ id("org.jetbrains.kotlin.android")
+ id("kotlin-kapt")
+ `maven-publish`
+}
+
+android {
+
+ compileSdk = ProjectSetting.PROJECT_COMPILE_SDK
+
+ defaultConfig {
+ minSdk = ProjectSetting.PROJECT_MIN_SDK
+ targetSdk = ProjectSetting.PROJECT_TARGET_SDK
+
+ multiDexEnabled = true
+ vectorDrawables.useSupportLibrary = true
+
+ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
+
+ consumerProguardFile("consumer-rules.pro")
+ }
+
+ buildTypes {
+ getByName("release") {
+ isMinifyEnabled = false
+
+ proguardFiles(
+ getDefaultProguardFile("proguard-android-optimize.txt"),
+ "proguard-rules.pro"
+ )
+ }
+ }
+
+ buildFeatures {
+ viewBinding = true
+ compose = true
+ }
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
+ }
+
+ composeOptions {
+ kotlinCompilerExtensionVersion = Dependency.COMPOSE_VERSION
+ }
+
+ tasks.withType {
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_11.toString()
+ }
+ }
+
+}
+
+dependencies {
+
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Dependency.KOTLIN_VERSION}")
+
+ implementation("androidx.appcompat:appcompat:1.4.1")
+ implementation("androidx.core:core-ktx:1.7.0")
+ implementation("androidx.preference:preference-ktx:1.2.0")
+ implementation("androidx.constraintlayout:constraintlayout:2.1.3")
+ implementation("androidx.legacy:legacy-support-v4:1.0.0")
+
+ implementation("androidx.compose.ui:ui:${Dependency.COMPOSE_VERSION}")
+ implementation("androidx.compose.material:material:${Dependency.COMPOSE_VERSION}")
+ implementation("androidx.compose.ui:ui-tooling-preview:${Dependency.COMPOSE_VERSION}")
+
+ implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
+ implementation("androidx.activity:activity-compose:1.4.0")
+
+ implementation("androidx.activity:activity-ktx:${Dependency.ACTIVITY_KTX_VERSION}")
+ implementation("androidx.fragment:fragment-ktx:${Dependency.FRAGMENT_KTX_VERSION}")
+
+ implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1")
+ implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
+ implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.4.1")
+
+ implementation("androidx.room:room-runtime:${Dependency.ROOM_VERSION}")
+ implementation("androidx.room:room-ktx:${Dependency.ROOM_VERSION}")
+ implementation("androidx.room:room-rxjava2:${Dependency.ROOM_VERSION}")
+ implementation("androidx.room:room-guava:${Dependency.ROOM_VERSION}")
+
+ implementation("com.google.code.gson:gson:2.8.9")
+ implementation("com.google.android.material:material:1.5.0")
+
+ implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2")
+ implementation("com.squareup.okhttp3:logging-interceptor:4.9.3")
+
+ implementation("com.squareup.retrofit2:retrofit:2.9.0")
+ implementation("com.squareup.retrofit2:converter-gson:2.9.0")
+ implementation("com.squareup.retrofit2:adapter-rxjava:2.9.0")
+ implementation("com.squareup.retrofit2:adapter-rxjava2:2.9.0")
+
+ implementation("io.reactivex.rxjava2:rxandroid:2.1.1")
+ implementation("io.reactivex.rxjava2:rxjava:2.2.21")
+
+ implementation("com.github.javiersantos:PiracyChecker:1.2.8")
+ implementation("com.github.bumptech.glide:glide:4.12.0")
+
+ implementation("com.facebook.stetho:stetho:1.5.1")
+ implementation("com.readystatesoftware.chuck:library:1.1.0")
+
+ api("com.google.dagger:dagger:2.38.1")
+ api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
+ api("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0-native-mt")
+
+ kapt("androidx.lifecycle:lifecycle-compiler:2.4.1")
+ kapt("androidx.room:room-compiler:2.4.2")
+ kapt("com.google.dagger:dagger-compiler:2.37")
+ kapt("com.github.bumptech.glide:compiler:4.12.0")
+
+ implementation("io.insert-koin:koin-core:${Dependency.KOIN_VERSION}") // Koin core features
+ implementation("io.insert-koin:koin-android:${Dependency.KOIN_VERSION}") // Koin main features for Android (Scope,ViewModel ...)
+ implementation("io.insert-koin:koin-android-compat:${Dependency.KOIN_VERSION}") // Koin Java Compatibility
+ implementation("io.insert-koin:koin-androidx-workmanager:${Dependency.KOIN_VERSION}") // Koin for Jetpack WorkManager
+ implementation("io.insert-koin:koin-androidx-compose:${Dependency.KOIN_VERSION}") // Koin for Jetpack Compose
+
+}
+
+afterEvaluate {
+ publishing {
+ publications {
+
+ // Creates a Maven publication called "release".
+ register("release", MavenPublication::class) {
+
+ // Applies the component for the release build variant.
+ // NOTE : Delete this line code if you publish Native Java / Kotlin Library
+ from(components["release"])
+
+ // Library Package Name (Example : "com.frogobox.androidfirstlib")
+ // NOTE : Different GroupId For Each Library / Module, So That Each Library Is Not Overwritten
+ groupId = ProjectSetting.PROJECT_LIB_ID
+
+ // Library Name / Module Name (Example : "androidfirstlib")
+ // NOTE : Different ArtifactId For Each Library / Module, So That Each Library Is Not Overwritten
+ artifactId = ProjectSetting.NAME_APK
+
+ // Version Library Name (Example : "1.0.0")
+ version = ProjectSetting.PROJECT_VERSION_NAME
+
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/frogosdk/consumer-rules.pro b/frogosdk/consumer-rules.pro
new file mode 100644
index 0000000..e69de29
diff --git a/frogosdk/proguard-rules.pro b/frogosdk/proguard-rules.pro
new file mode 100644
index 0000000..ff59496
--- /dev/null
+++ b/frogosdk/proguard-rules.pro
@@ -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.kts.
+#
+# For more details, see
+# http://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
\ No newline at end of file
diff --git a/frogosdk/src/main/AndroidManifest.xml b/frogosdk/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..2cbb85e
--- /dev/null
+++ b/frogosdk/src/main/AndroidManifest.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/FrogoApplication.kt b/frogosdk/src/main/java/com/frogobox/sdk/FrogoApplication.kt
new file mode 100644
index 0000000..fee24ab
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/FrogoApplication.kt
@@ -0,0 +1,42 @@
+package com.frogobox.sdk
+
+import android.app.Application
+import android.content.Context
+import org.koin.android.ext.koin.androidContext
+import org.koin.android.ext.koin.androidLogger
+import org.koin.core.KoinApplication
+import org.koin.core.context.startKoin
+import org.koin.core.logger.Level
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+abstract class FrogoApplication : Application() {
+
+ companion object {
+ lateinit var instance: FrogoApplication
+ fun getContext(): Context = instance.applicationContext
+ }
+
+ abstract fun setupKoinModule(koinApplication: KoinApplication)
+
+ override fun onCreate() {
+ super.onCreate()
+ instance = this
+ startKoin {
+ androidContext(this@FrogoApplication)
+ androidLogger(Level.NONE)
+ setupKoinModule(this)
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoActivity.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoActivity.kt
new file mode 100644
index 0000000..46b5748
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoActivity.kt
@@ -0,0 +1,220 @@
+package com.frogobox.sdk.core
+
+import android.content.Intent
+import android.os.Bundle
+import android.util.Log
+import android.view.Menu
+import android.view.MenuItem
+import android.view.View
+import android.widget.Toast
+import androidx.appcompat.app.AlertDialog
+import androidx.appcompat.app.AppCompatActivity
+import androidx.fragment.app.Fragment
+import androidx.viewbinding.ViewBinding
+import com.github.javiersantos.piracychecker.*
+import com.github.javiersantos.piracychecker.enums.Display
+import com.github.javiersantos.piracychecker.enums.InstallerID
+import com.github.javiersantos.piracychecker.utils.apkSignatures
+import com.google.gson.Gson
+
+
+/*
+ * Created by faisalamir on 28/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+abstract class FrogoActivity : AppCompatActivity(), IFrogoActivity {
+
+ private val TAG: String = FrogoActivity::class.java.simpleName
+
+ protected val frogoActivity by lazy { this }
+
+ protected var piracyCheckerDisplay = Display.DIALOG
+
+ protected lateinit var binding: VB
+
+ abstract fun setupViewBinding(): VB
+
+ abstract fun setupViewModel()
+
+ abstract fun setupUI(savedInstanceState: Bundle?)
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = setupViewBinding()
+ setContentView(binding.root)
+ setupViewModel()
+ setupUI(savedInstanceState)
+ Log.d(TAG, "View Binding : ${binding::class.java.simpleName}")
+ }
+
+ override fun onCreateOptionsMenu(menu: Menu): Boolean {
+ return true
+ }
+
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ return when (item.itemId) {
+ android.R.id.home -> {
+ finish()
+ true
+ }
+ else -> super.onOptionsItemSelected(item)
+ }
+ }
+
+ override fun setupDetailActivity(title: String) {
+ supportActionBar?.title = title
+ supportActionBar?.setDisplayHomeAsUpEnabled(true)
+ Log.d(TAG, "Setup Detail Activity : $title")
+ }
+
+ override fun setupChildFragment(frameId: Int, fragment: Fragment) {
+ supportFragmentManager.beginTransaction().apply {
+ replace(frameId, fragment)
+ commit()
+ }
+ }
+
+ override fun showToast(message: String) {
+ Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
+ Log.d(TAG, "Toast : $message")
+ }
+
+ override fun setupEventEmptyView(view: View, isEmpty: Boolean) {
+ if (isEmpty) {
+ view.visibility = View.VISIBLE
+ } else {
+ view.visibility = View.GONE
+ }
+ }
+
+ override fun setupEventProgressView(view: View, progress: Boolean) {
+ if (progress) {
+ view.visibility = View.VISIBLE
+ } else {
+ view.visibility = View.GONE
+ }
+ }
+
+ override fun checkExtra(extraKey: String): Boolean {
+ return intent?.hasExtra(extraKey)!!
+ }
+
+ override fun baseFragmentNewInstance(
+ fragment: FrogoFragment<*>,
+ argumentKey: String,
+ extraDataResult: Model
+ ) {
+ fragment.baseNewInstance(argumentKey, extraDataResult)
+ }
+
+ protected fun setupCustomTitleToolbar(title: Int) {
+ supportActionBar?.setTitle(title)
+ }
+
+ protected inline fun baseStartActivity() {
+ this.startActivity(Intent(this, ClassActivity::class.java))
+ }
+
+ protected inline fun baseStartActivity(
+ extraKey: String,
+ data: Model
+ ) {
+ val intent = Intent(this, ClassActivity::class.java)
+ val extraData = Gson().toJson(data)
+ intent.putExtra(extraKey, extraData)
+ this.startActivity(intent)
+ }
+
+ protected inline fun baseGetExtraData(extraKey: String): Model {
+ val extraIntent = intent.getStringExtra(extraKey)
+ return Gson().fromJson(extraIntent, Model::class.java)
+ }
+
+ override fun verifySignature() {
+ piracyChecker {
+ display(piracyCheckerDisplay)
+ enableSigningCertificates("478yYkKAQF+KST8y4ATKvHkYibo=") // Wrong signature
+ //enableSigningCertificates("VHZs2aiTBiap/F+AYhYeppy0aF0=") // Right signature
+ }.start()
+ }
+
+ override fun readSignature() {
+ val dialogMessage = StringBuilder()
+ apkSignatures.forEach {
+ Log.e("Signature", it)
+ dialogMessage.append("* ").append(it).append("\n")
+ }
+ AlertDialog.Builder(this)
+ .setTitle("APK")
+ .setMessage(dialogMessage.toString())
+ .show()
+ }
+
+ override fun verifyInstallerId() {
+ piracyChecker {
+ display(piracyCheckerDisplay)
+ enableInstallerId(InstallerID.GOOGLE_PLAY)
+ }.start()
+ }
+
+ override fun verifyUnauthorizedApps() {
+ piracyChecker {
+ display(piracyCheckerDisplay)
+ enableUnauthorizedAppsCheck()
+ //blockIfUnauthorizedAppUninstalled("license_checker", "block")
+ }.start()
+ }
+
+ override fun verifyStores() {
+ piracyChecker {
+ display(piracyCheckerDisplay)
+ enableStoresCheck()
+ }.start()
+ }
+
+ override fun verifyDebug() {
+ piracyChecker {
+ display(piracyCheckerDisplay)
+ enableDebugCheck()
+ callback {
+ allow {
+ // Do something when the user is allowed to use the app
+ }
+ doNotAllow { piracyCheckerError, pirateApp ->
+ // You can either do something specific when the user is not allowed to use the app
+ // Or manage the error, using the 'error' parameter, yourself (Check errors at {@link PiracyCheckerError}).
+
+ // Additionally, if you enabled the check of pirate apps and/or third-party stores, the 'app' param
+ // is the app that has been detected on device. App can be null, and when null, it means no pirate app or store was found,
+ // or you disabled the check for those apps.
+ // This allows you to let users know the possible reasons why license is been invalid.
+ }
+ onError { error ->
+ // This method is not required to be implemented/overriden but...
+ // You can either do something specific when an error occurs while checking the license,
+ // Or manage the error, using the 'error' parameter, yourself (Check errors at {@link PiracyCheckerError}).
+ }
+ }
+ }.start()
+ }
+
+ override fun verifyEmulator() {
+ piracyChecker {
+ display(piracyCheckerDisplay)
+ enableEmulatorCheck(false)
+ }.start()
+ }
+
+ override fun showApkSignatures() {
+ apkSignatures.forEach { Log.d(TAG,"Signature This Apps : $it") }
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiCallback.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiCallback.kt
new file mode 100644
index 0000000..7b14667
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiCallback.kt
@@ -0,0 +1,64 @@
+package com.frogobox.sdk.core
+
+import io.reactivex.Observer
+import io.reactivex.disposables.Disposable
+import retrofit2.HttpException
+import java.net.SocketTimeoutException
+import java.net.UnknownHostException
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+abstract class FrogoApiCallback : Observer {
+
+ abstract fun onSuccess(data: M)
+
+ abstract fun onFailure(code: Int, errorMessage: String)
+
+ override fun onComplete() {
+ }
+
+ override fun onNext(t: M) {
+ onSuccess(t)
+ }
+
+ override fun onSubscribe(d: Disposable) {
+ }
+
+ override fun onError(e: Throwable) {
+ e.printStackTrace()
+ when (e) {
+ is HttpException -> {
+
+ var baseDao: M? = null
+ try {
+ val body = e.response()?.errorBody()
+ } catch (exception: Exception) {
+ onFailure(504, exception.message!!)
+ }
+
+ onFailure(504, "Error Response")
+ }
+
+ is UnknownHostException -> onFailure(
+ -1,
+ "Telah terjadi kesalahan ketika koneksi ke server: ${e.message}"
+ )
+ is SocketTimeoutException -> onFailure(
+ -1,
+ "Telah terjadi kesalahan ketika koneksi ke server: ${e.message}"
+ )
+ else -> onFailure(-1, e.message ?: "Unknown error occured")
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiClient.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiClient.kt
new file mode 100644
index 0000000..ed3e1dc
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiClient.kt
@@ -0,0 +1,63 @@
+package com.frogobox.sdk.core
+
+import android.content.Context
+import android.util.Log
+import com.readystatesoftware.chuck.ChuckInterceptor
+import okhttp3.OkHttpClient
+import okhttp3.logging.HttpLoggingInterceptor
+import retrofit2.Retrofit
+import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
+import retrofit2.converter.gson.GsonConverterFactory
+import java.util.concurrent.TimeUnit
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+
+object FrogoApiClient {
+
+ val TAG = FrogoApiClient::class.java.simpleName
+
+ inline fun create(url: String): T {
+
+ Log.d(TAG, "Create Retrofit Request without Client")
+
+ return Retrofit.Builder()
+ .baseUrl(url)
+ .addConverterFactory(GsonConverterFactory.create())
+ .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
+ .build().create(T::class.java)
+ }
+
+ inline fun create(url: String, context: Context): T {
+
+ Log.d(TAG, "Create Retrofit Request with Client")
+
+ val mLoggingInterceptor = HttpLoggingInterceptor()
+ mLoggingInterceptor.level = HttpLoggingInterceptor.Level.BODY
+
+ val mClient = OkHttpClient.Builder()
+ .addInterceptor(mLoggingInterceptor)
+ .addInterceptor(ChuckInterceptor(context))
+ .readTimeout(30, TimeUnit.SECONDS)
+ .connectTimeout(30, TimeUnit.SECONDS)
+ .build()
+
+ return Retrofit.Builder()
+ .baseUrl(url)
+ .addConverterFactory(GsonConverterFactory.create())
+ .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
+ .client(mClient)
+ .build().create(T::class.java)
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiModel.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiModel.kt
new file mode 100644
index 0000000..c11daa2
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoApiModel.kt
@@ -0,0 +1,22 @@
+package com.frogobox.sdk.core
+
+import com.google.gson.annotations.SerializedName
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+data class FrogoApiModel(
+ @SerializedName("code") val code: Int,
+ @SerializedName("message") val message: String,
+ @SerializedName("status") val status: String,
+ @SerializedName("data") val data: T? = null
+)
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoComposeActivity.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoComposeActivity.kt
new file mode 100644
index 0000000..f743093
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoComposeActivity.kt
@@ -0,0 +1,19 @@
+package com.frogobox.sdk.core
+
+import androidx.activity.ComponentActivity
+
+/*
+ * Created by faisalamir on 23/08/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+class FrogoComposeActivity : ComponentActivity(), IFrogoComposeActivity {
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoConstant.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoConstant.kt
new file mode 100644
index 0000000..c67f762
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoConstant.kt
@@ -0,0 +1,60 @@
+package com.frogobox.sdk.core
+
+import android.os.Environment
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+object FrogoConstant {
+
+ val TAG = FrogoConstant::class.java.simpleName
+
+ const val OPTION_GET = "OPTION_GET"
+ const val OPTION_DELETE = "OPTION_DELETE"
+
+ const val DEFAULT_NULL = "null"
+ const val DEFAULT_ERROR_MESSAGE = "Failed"
+ const val FRAGMENT_DIALOG = "dialog"
+
+ const val SPLASH_INTERVAL = 1000
+
+ object Value {
+ const val VALUE_SENSOR_ORIENTATION_DEFAULT_DEGREES = 90
+ const val VALUE_SENSOR_ORIENTATION_INVERSE_DEGREES = 270
+ }
+
+ object Tag {
+ const val TAG_ACTIVITY_EDIT = 300
+ const val TAG_ACTIVITY_CREATE = 301
+ const val TAG_ACTIVITY_DETAIL = 302
+
+ const val TAG_FROM_ACTIVITY = 801
+ const val TAG_FROM_FRAGMENT = 800
+
+ const val TAG_CAMERA_VIDEO = "Camera2VideoFragment"
+ }
+
+ object Ext {
+ const val MP4 = ".mp4"
+ const val PNG = ".png"
+ const val CSV = ".csv"
+ }
+
+ object Dir {
+ private const val BASE_FILE_NAME = "SPEECH_"
+ private const val BASE_DIR_NAME = "BaseMusicPlayer"
+
+ val DIR_NAME = "${Environment.DIRECTORY_PICTURES}/$BASE_DIR_NAME"
+ val VIDEO_FILE_NAME = "$BASE_FILE_NAME${System.currentTimeMillis()}${Ext.MP4}"
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoDate.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoDate.kt
new file mode 100644
index 0000000..3d22313
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoDate.kt
@@ -0,0 +1,320 @@
+package com.frogobox.sdk.core
+
+import android.os.Build
+import android.text.format.DateFormat
+import java.text.ParseException
+import java.text.SimpleDateFormat
+import java.util.*
+import java.util.concurrent.TimeUnit
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+object FrogoDate : IFrogoDate {
+
+ val TAG = FrogoDate::class.java.simpleName
+
+ // Format Second
+ const val SECOND_MILLIS = 1000
+ const val MINUTE_MILLIS = 60 * SECOND_MILLIS
+ const val HOUR_MILLIS = 60 * MINUTE_MILLIS
+ const val DAY_MILLIS = 24 * HOUR_MILLIS
+
+ // Format Date
+ const val DATE_TIME_GLOBAL = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" //
+ const val DATE_TIME_STANDARD = "yyyy-MM-dd HH:mm:ss" // 2018-10-02 12:12:12
+ const val DATE_ENGLISH_YYYY_MM_DD = "yyyy-MM-dd" // 2018-10-02
+ const val DATE_ENGLISH_YYYY_MM_DD_CLEAR = "yyyy MM dd" // 2018 10 02
+ const val DATE_DD_MM_YYYY = "dd-MM-yyyy" // 02-10-2018
+ const val DATE_EEEE_DD_MM_YYYY = "EEEE, dd MMMM yyyy" // 02-10-2018
+ const val DATE_DD_MM_YYYY_CLEAR = "dd MM yyyy" // 02-10-2018
+
+ // Format Time
+ const val TIME_GENERAL_HH_MM_SS = "HH:mm:ss" // 12:12:12
+ const val TIME_GENERAL_HH_MM = "HH:mm" // 12:12
+
+ // Format Day
+ const val DAY_WITH_DATE_TIME_ENGLISH = "EEE, MMM dd yyyy HH:mm" // Mon, Aug 12 2018 12:12
+ const val DAY_WITH_DATE_TIME_LOCALE = "EEE, dd MMM yyyy HH:mm" // Sen, 12 Agt 2019 12:12
+ const val DAY_WITH_DATE_TIME_ENGLISH_FULL =
+ "EEEE, MMMM dd yyyy HH:mm" // Monday, August 12 2018 12:12
+ const val DAY_WITH_DATE_TIME_LOCALE_FULL =
+ "EEEE, dd MMMM yyyy HH:mm" // Senin, 12 Agustus 2018 12:12
+
+ override fun getTimeStamp(): String {
+ val simpleDateFormat = SimpleDateFormat(DATE_TIME_STANDARD, Locale.getDefault())
+ return simpleDateFormat.format(Date())
+ }
+
+ override fun getTimeNow(): String {
+ val simpleDateFormat = SimpleDateFormat(TIME_GENERAL_HH_MM_SS, Locale.getDefault())
+ return simpleDateFormat.format(Date())
+ }
+
+ override fun getCurrentDate(format: String): String {
+ val simpleDateFormat = SimpleDateFormat(format, Locale.getDefault())
+ return simpleDateFormat.format(Date())
+ }
+
+ override fun dateTimeToTimeStamp(date: String?): Long {
+ var timestamp: Long = 0
+ val tz = TimeZone.getTimeZone("UTC")
+ val df = SimpleDateFormat(DATE_TIME_GLOBAL, Locale.getDefault())
+ df.timeZone = tz
+
+ if (date != null) {
+ try {
+ timestamp = df.parse(date).time / 1000
+ } catch (e: ParseException) {
+ e.printStackTrace()
+ }
+
+ } else {
+ timestamp = Date().getTime() / 1000
+ }
+ return timestamp
+ }
+
+ override fun getCurrentUTC(): String {
+ val time = Calendar.getInstance().time
+ val outputFmt = SimpleDateFormat(TIME_GENERAL_HH_MM_SS, Locale.getDefault())
+ outputFmt.timeZone = TimeZone.getTimeZone("UTC")
+ return outputFmt.format(time)
+ }
+
+ override fun timetoHour(date: String?): String {
+ val tz = TimeZone.getTimeZone("UTC")
+ val df = SimpleDateFormat(TIME_GENERAL_HH_MM_SS, Locale.getDefault())
+ df.timeZone = tz
+
+ return DateFormat.format(TIME_GENERAL_HH_MM_SS, df.parse(date)).toString()
+ }
+
+ override fun dateTimeTZtoHour(date: String?): String {
+ val tz = TimeZone.getTimeZone("UTC")
+ val df = SimpleDateFormat(DATE_TIME_GLOBAL, Locale.getDefault())
+ df.timeZone = tz
+
+ return DateFormat.format("hh:mm aa", df.parse(date)).toString()
+ }
+
+ override fun DateTimeMonth(date: String?): String {
+ val tz = TimeZone.getTimeZone("UTC")
+ val df = SimpleDateFormat(DATE_TIME_STANDARD, Locale.getDefault())
+ df.timeZone = tz
+
+ return DateFormat.format("MMM yyyy", df.parse(date)).toString()
+ }
+
+ override fun dateTimeSet(date: String?): String {
+ return if (date != null) {
+ try {
+ val tz = TimeZone.getTimeZone("UTC")
+ val df = SimpleDateFormat(DATE_TIME_STANDARD, Locale.getDefault())
+ df.timeZone = tz
+
+ DateFormat.format("MM/yyyy", df.parse(date)).toString()
+ } catch (ex: ParseException) {
+ ""
+ }
+ } else {
+ ""
+ }
+ }
+
+ override fun dateTimeProblem(date: String?): String {
+ return if (date != null) {
+ try {
+ val tz = TimeZone.getTimeZone("UTC")
+ val df = SimpleDateFormat(DATE_ENGLISH_YYYY_MM_DD, Locale.getDefault())
+ df.timeZone = tz
+
+ DateFormat.format("MM/yyyy", df.parse(date)).toString()
+ } catch (ex: ParseException) {
+ ""
+ }
+ } else {
+ ""
+ }
+ }
+
+ override fun getTimeAgo(time: Long): String? {
+
+ var time = time
+ if (time < 1000000000000L) {
+ // if timestamp given in seconds, convert to millis
+ time *= 1000
+ }
+
+ val now = System.currentTimeMillis()
+ if (time <= 0) {
+ return null
+ }
+
+ val diff = now - time
+ return if (diff < MINUTE_MILLIS) {
+ "Just Now"
+ } else if (diff < 2 * MINUTE_MILLIS) {
+ "A minute ago"
+ } else if (diff < 50 * MINUTE_MILLIS) {
+ (diff / MINUTE_MILLIS).toString() + " minutes ago"
+ } else if (diff < 90 * MINUTE_MILLIS) {
+ "An hour ago"
+ } else if (diff < 24 * HOUR_MILLIS) {
+ if ((diff / HOUR_MILLIS).toString() == "1") {
+ "An hour ago"
+ } else {
+ (diff / HOUR_MILLIS).toString() + " hours ago"
+ }
+ } else {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
+ DateFormat.format("dd MMM yy - hh:mm", time).toString()
+ } else {
+ DateFormat.format("dd MMM yy - HH:mm", time).toString()
+ }
+ }
+ }
+
+ override fun compareDate(newDate: String): String? {
+ val format = SimpleDateFormat(DATE_ENGLISH_YYYY_MM_DD, Locale.getDefault())
+ val oldDate = Calendar.getInstance().time
+ val now = format.format(oldDate)
+ var info = 0L
+ try {
+ info = TimeUnit.DAYS.convert(
+ format.parse(now).getTime() - format.parse(newDate).getTime(),
+ TimeUnit.MILLISECONDS
+ )
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+
+ return when {
+ info > 1L -> getDataChat(dateTimeToTimeStamp(newDate))
+ info == 1L -> "Yesterday"
+ else -> "Today"
+ }
+ }
+
+ override fun messageDate(newDate: String): String? {
+ val format = SimpleDateFormat(DATE_ENGLISH_YYYY_MM_DD, Locale.getDefault())
+ val oldDate = Calendar.getInstance().time
+ val now = format.format(oldDate)
+ var info = 0L
+ try {
+ info = TimeUnit.DAYS.convert(
+ format.parse(now).getTime() - format.parse(newDate).getTime(),
+ TimeUnit.MILLISECONDS
+ )
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+
+ return when {
+ info > 1L -> getDataChat(dateTimeToTimeStamp(newDate))
+ info == 1L -> "Yesterday"
+ else -> dateTimeTZtoHour(newDate)
+ }
+ }
+
+ override fun getDataChat(time: Long): String? {
+
+ var time = time
+ if (time < 1000000000000L) {
+ // if timestamp given in seconds, convert to millis
+ time *= 1000
+ }
+
+ val now = System.currentTimeMillis()
+ if (time <= 0) {
+ return null
+ }
+
+ val diff = now - time
+ return if (diff < 24 * HOUR_MILLIS) {
+ "Today"
+ } else {
+ DateFormat.format(DATE_DD_MM_YYYY_CLEAR, time).toString()
+ }
+ }
+
+ override fun convertClassificationDate(string: String?): String {
+ return if (string != null) {
+ if (string.contains("/")) {
+ val temp = string.split("/")
+ temp[1] + "-" + temp[0] + "-01"
+ } else {
+ ""
+ }
+ } else {
+ ""
+ }
+ }
+
+ override fun convertDateNewFormat(string: String?): String {
+ val formatter = SimpleDateFormat(DATE_ENGLISH_YYYY_MM_DD, Locale.getDefault())
+ val date = formatter.parse(string) as Date
+ val newFormat = SimpleDateFormat(DATE_DD_MM_YYYY, Locale("EN"))
+ return newFormat.format(date)
+ }
+
+ override fun convertLongDateNewFormat(string: String?): String {
+ val formatter = SimpleDateFormat(DATE_TIME_STANDARD, Locale.getDefault())
+ val date = formatter.parse(string) as Date
+ val newFormat = SimpleDateFormat("dd-MM-yy HH:mm:ss", Locale("EN"))
+ return newFormat.format(date)
+ }
+
+ override fun revertFromLongDateNewFormat(string: String?): String {
+ val formatter = SimpleDateFormat("dd-MM-yy HH:mm:ss", Locale("EN"))
+ val date = formatter.parse(string) as Date
+ val newFormat = SimpleDateFormat(DATE_TIME_STANDARD, Locale.getDefault())
+ val finalString = newFormat.format(date)
+ return finalString
+ }
+
+ override fun convertTargetDate(string: String?): String {
+ return if (string != null) {
+ if (string.contains("/")) {
+ val temp = string.split("/")
+ temp[1] + "-" + temp[0] + "-01 00:00:00"
+ } else {
+ ""
+ }
+ } else {
+ ""
+ }
+ }
+
+ override fun diffTime(timeStart: String, timeEnd: String): Long {
+ var min: Long = 0
+ val diff: Long
+ val format = SimpleDateFormat(TIME_GENERAL_HH_MM_SS, Locale.getDefault())
+
+ var d1: Date? = null
+ var d2: Date? = null
+
+ try {
+ d1 = format.parse(timeStart)
+ d2 = format.parse(timeEnd)
+
+ diff = d2.time - d1.time
+ min = diff / (60 * 1000)
+
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+
+ return min
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoFragment.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoFragment.kt
new file mode 100644
index 0000000..8d20ce9
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoFragment.kt
@@ -0,0 +1,126 @@
+package com.frogobox.sdk.core
+
+import android.content.Intent
+import android.os.Bundle
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.Toast
+import androidx.fragment.app.Fragment
+import androidx.viewbinding.ViewBinding
+import com.google.gson.Gson
+
+/*
+ * Created by faisalamir on 28/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+abstract class FrogoFragment : Fragment(), IFrogoFragment {
+
+ private val TAG = FrogoFragment::class.java.simpleName
+ protected lateinit var frogoActivity: FrogoActivity<*>
+
+ private var _binding: VB? = null
+ protected val binding: VB get() = _binding!!
+
+ abstract fun setupViewBinding(inflater: LayoutInflater, container: ViewGroup?): VB
+
+ abstract fun setupViewModel()
+
+ abstract fun setupUI(savedInstanceState: Bundle?)
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ _binding = setupViewBinding(inflater, container)
+ setupViewModel()
+ Log.d(TAG, "View Binding : ${binding::class.java.simpleName}")
+ return binding.root
+ }
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ frogoActivity = (activity as FrogoActivity<*>)
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+ setupUI(savedInstanceState)
+ }
+
+ override fun onDestroy() {
+ super.onDestroy()
+ _binding = null
+ Log.d(TAG, "Destroying View Binding")
+ }
+
+ override fun setupChildFragment(frameId: Int, fragment: Fragment) {
+ childFragmentManager.beginTransaction().apply {
+ replace(frameId, fragment)
+ commit()
+ }
+ }
+
+ override fun checkArgument(argsKey: String): Boolean {
+ return requireArguments().containsKey(argsKey)
+ }
+
+ override fun setupEventEmptyView(view: View, isEmpty: Boolean) {
+ if (isEmpty) {
+ view.visibility = View.VISIBLE
+ } else {
+ view.visibility = View.GONE
+ }
+ }
+
+ override fun setupEventProgressView(view: View, progress: Boolean) {
+ if (progress) {
+ view.visibility = View.VISIBLE
+ } else {
+ view.visibility = View.GONE
+ }
+ }
+
+ override fun showToast(message: String) {
+ Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
+ Log.d(TAG, "Toast message : $message")
+ }
+
+ override fun baseNewInstance(argsKey: String, data: Model) {
+ val argsData = Gson().toJson(data)
+ val bundleArgs = Bundle().apply {
+ putString(argsKey, argsData)
+ }
+ this.arguments = bundleArgs
+ }
+
+ protected inline fun baseGetInstance(argsKey: String): Model {
+ val argsData = this.arguments?.getString(argsKey)
+ return Gson().fromJson(argsData, Model::class.java)
+ }
+
+ protected inline fun baseStartActivity() {
+ context?.startActivity(Intent(context, ClassActivity::class.java))
+ }
+
+ protected inline fun baseStartActivity(
+ extraKey: String,
+ data: Model
+ ) {
+ val intent = Intent(context, ClassActivity::class.java)
+ val extraData = Gson().toJson(data)
+ intent.putExtra(extraKey, extraData)
+ this.startActivity(intent)
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoFunc.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoFunc.kt
new file mode 100644
index 0000000..35be8bd
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoFunc.kt
@@ -0,0 +1,169 @@
+package com.frogobox.sdk.core
+
+import android.app.AlertDialog
+import android.content.Context
+import android.net.ConnectivityManager
+import android.net.NetworkInfo
+import android.os.Environment
+import android.os.Handler
+import com.frogobox.sdk.R
+import com.frogobox.sdk.core.FrogoConstant.Dir.DIR_NAME
+import com.frogobox.sdk.core.FrogoConstant.Dir.VIDEO_FILE_NAME
+import com.google.gson.GsonBuilder
+import com.google.gson.reflect.TypeToken
+import java.io.BufferedReader
+import java.io.IOException
+import java.io.InputStreamReader
+import java.lang.reflect.Type
+import java.util.ArrayList
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+object FrogoFunc : IFrogoFunc {
+
+ val TAG = FrogoFunc::class.java.simpleName
+
+ override fun createFolderPictureVideo() {
+ val videoFolder = Environment.getExternalStoragePublicDirectory(DIR_NAME)
+ if (!videoFolder.exists()) {
+ videoFolder.mkdirs()
+ }
+ }
+
+ override fun getVideoFilePath(): String {
+ val dir = Environment.getExternalStoragePublicDirectory(DIR_NAME)
+ return if (dir == null) {
+ VIDEO_FILE_NAME
+ } else {
+ "${dir.absoluteFile}/$VIDEO_FILE_NAME"
+ }
+ }
+
+ override fun createDialogDefault(
+ context: Context,
+ title: String,
+ message: String,
+ listenerYes: () -> Unit,
+ listenerNo: () -> Unit
+ ) {
+ val dialogBuilder = AlertDialog.Builder(context)
+ // set message of alert dialog
+ dialogBuilder.setMessage(message)
+ // if the dialog is cancelable
+ .setCancelable(false)
+ .setPositiveButton(context.getText(R.string.dialog_button_yes)) { dialog, id ->
+ // positive button text and action
+ listenerYes()
+ }
+ .setNegativeButton(context.getText(R.string.dialog_button_no)) { dialog, id ->
+ // negative button text and action
+ dialog.cancel()
+ listenerNo()
+ }
+ // create dialog box
+ val alert = dialogBuilder.create()
+ // set title for alert dialog box
+ alert.setTitle(title)
+ // show alert dialog
+ alert.show()
+ }
+
+ override fun noAction(): Boolean {
+ return false
+ }
+
+ override fun isNetworkAvailable(context: Context): Boolean? {
+ var isConnected: Boolean? = false // Initial Value
+ val connectivityManager =
+ context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+ val activeNetwork: NetworkInfo? = connectivityManager.activeNetworkInfo
+ if (activeNetwork != null && activeNetwork.isConnected) isConnected = true
+ return isConnected
+ }
+
+ override fun fetchRawData(mContext: Context, sourceRaw: Int): ArrayList {
+ val dataArrayList = ArrayList()
+ val rawDict = mContext.resources.openRawResource(sourceRaw)
+ val reader = BufferedReader(InputStreamReader(rawDict))
+ try {
+ var column: T
+ while (reader.readLine().also { column = it as T } != null) {
+ dataArrayList.add(column)
+ }
+ reader.close()
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ return dataArrayList
+ }
+
+ override fun fetchRawData(mContext: Context, sourceRaw: Int, shuffle: Boolean): ArrayList {
+ val dataArrayList = ArrayList()
+ val rawDict = mContext.resources.openRawResource(sourceRaw)
+ val reader = BufferedReader(InputStreamReader(rawDict))
+ try {
+ var column: T
+ while (reader.readLine().also { column = it as T } != null) {
+ dataArrayList.add(column)
+ }
+ reader.close()
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ dataArrayList.shuffle()
+ return dataArrayList
+ }
+
+ override fun getJsonFromAsset(context: Context, filename: String): String? {
+ val jsonString: String
+ try {
+ jsonString = context.assets.open(filename).bufferedReader().use { it.readText() }
+ } catch (ioException: IOException) {
+ ioException.printStackTrace()
+ return null
+ }
+ return jsonString
+ }
+
+ inline fun getParseArray(json: String?, typeToken: Type): T {
+ val gson = GsonBuilder().create()
+ return gson.fromJson(json, typeToken)
+ }
+
+ inline fun getArrayFromJsonAsset(context: Context, filename: String): MutableList {
+ val listData = mutableListOf()
+ val rawJson = getJsonFromAsset(context, filename)
+ val typeToken = object : TypeToken>() {}.type
+ val data: List = getParseArray(rawJson, typeToken)
+ listData.addAll(data)
+ return listData
+ }
+
+ override fun getDrawableString(context: Context, nameResource: String): Int {
+ return context.resources.getIdentifier(nameResource, "drawable", context.packageName)
+ }
+
+ override fun getRawString(context: Context, nameResource: String): Int {
+ return context.resources.getIdentifier(nameResource, "raw", context.packageName)
+ }
+
+ override fun randomNumber(start: Int, end: Int): Int {
+ require(start <= end) { "Illegal Argument" }
+ return (start..end).random()
+ }
+
+ override fun waitingMoment(delay: Long, listener:() -> Unit) {
+ Handler().postDelayed({ listener() }, delay)
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoLiveEvent.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoLiveEvent.kt
new file mode 100644
index 0000000..08e6801
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoLiveEvent.kt
@@ -0,0 +1,59 @@
+package com.frogobox.sdk.core
+
+import android.util.Log
+import androidx.annotation.MainThread
+import androidx.lifecycle.LifecycleOwner
+import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.Observer
+import java.util.concurrent.atomic.AtomicBoolean
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+
+class FrogoLiveEvent : MutableLiveData() {
+
+ private val pending = AtomicBoolean(false)
+
+ @MainThread
+ override fun observe(owner: LifecycleOwner, observer: Observer) {
+
+ if (hasActiveObservers()) {
+ Log.w(TAG, "Multiple observers registered but only one will be notified of changes.")
+ }
+
+ // Observe the internal MutableLiveData
+ super.observe(owner, {
+ if (pending.compareAndSet(true, false)) {
+ observer.onChanged(it)
+ }
+ })
+ }
+
+ @MainThread
+ override fun setValue(t: T?) {
+ pending.set(true)
+ super.setValue(t)
+ }
+
+ /**
+ * Used for cases where T is Void, to make calls cleaner.
+ */
+ @MainThread
+ fun call() {
+ value = null
+ }
+
+ companion object {
+ private const val TAG = "SingleLiveEvent"
+ }
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoLocalCallback.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoLocalCallback.kt
new file mode 100644
index 0000000..10ab234
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoLocalCallback.kt
@@ -0,0 +1,89 @@
+package com.frogobox.sdk.core
+
+import com.google.gson.Gson
+import io.reactivex.SingleObserver
+import io.reactivex.disposables.Disposable
+import retrofit2.HttpException
+import java.net.SocketTimeoutException
+import java.net.UnknownHostException
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+abstract class FrogoLocalCallback : SingleObserver {
+
+ abstract fun onCallbackSucces(data: M)
+ abstract fun onCallbackError(code: Int, errorMessage: String)
+ abstract fun onAddSubscribe(disposable: Disposable)
+ abstract fun onCompleted()
+
+ override fun onSuccess(t: M) {
+ onCompleted()
+ if (t == null) {
+ onCallbackError(200, "Data is empty")
+ } else {
+ onCallbackSucces(t)
+ }
+ }
+
+ override fun onSubscribe(d: Disposable) {
+ onAddSubscribe(d)
+ }
+
+ override fun onError(e: Throwable) {
+ onCompleted()
+ e.printStackTrace()
+ when (e) {
+ is HttpException -> {
+ val code = e.code()
+ var msg = e.message()
+ var baseDao: FrogoApiModel? = null
+ try {
+ val body = e.response()?.errorBody()
+ baseDao = Gson().fromJson>(
+ body!!.string(),
+ FrogoApiModel::class.java
+ )
+ } catch (exception: Exception) {
+ onCallbackError(code, exception.message!!)
+ }
+
+ when (code) {
+ 504 -> {
+ msg = baseDao?.message ?: "Error Response"
+ }
+ 502, 404 -> {
+ msg = baseDao?.message ?: "Error Connect or Resource Not Found"
+ }
+ 400 -> {
+ msg = baseDao?.message ?: "Bad Request"
+ }
+ 401 -> {
+ msg = baseDao?.message ?: "Not Authorized"
+ }
+ }
+
+ onCallbackError(code, msg)
+ }
+
+ is UnknownHostException -> onCallbackError(
+ -1,
+ "Telah terjadi kesalahan ketika koneksi ke server: ${e.message}"
+ )
+ is SocketTimeoutException -> onCallbackError(
+ -1,
+ "Telah terjadi kesalahan ketika koneksi ke server: ${e.message}"
+ )
+ else -> onCallbackError(-1, e.message ?: "Unknown error occured")
+ }
+ }
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoMusic.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoMusic.kt
new file mode 100644
index 0000000..a4e52c4
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoMusic.kt
@@ -0,0 +1,43 @@
+package com.frogobox.sdk.core
+
+import android.content.Context
+import android.media.MediaPlayer
+import android.util.Log
+
+/*
+ * Created by faisalamir on 29/08/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+object FrogoMusic : IFrogoMusic{
+
+ private val TAG = FrogoMusic::class.java.simpleName
+
+ lateinit var mediaPlayer: MediaPlayer
+
+ override fun playMusic(context: Context, musicFile: Int) {
+ mediaPlayer = MediaPlayer.create(context, musicFile)
+ mediaPlayer.start()
+ mediaPlayer.isLooping = true
+ Log.d(TAG, "Playing Music : $musicFile")
+ }
+
+ override fun stopMusic() {
+ mediaPlayer.stop()
+ mediaPlayer.release()
+ Log.d(TAG, "Music Has Been Stoped")
+ }
+
+ override fun pauseMusic() {
+ mediaPlayer.pause()
+ Log.d(TAG, "Music Has Been Paused")
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoNavigation.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoNavigation.kt
new file mode 100644
index 0000000..ca6f907
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoNavigation.kt
@@ -0,0 +1,120 @@
+package com.frogobox.sdk.core
+
+import android.app.Activity
+import android.content.Context
+import android.content.Intent
+import android.os.Bundle
+import android.util.Log
+import android.widget.Toast
+import com.google.gson.Gson
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+
+object FrogoNavigation {
+
+ lateinit var bundle: Any
+
+ const val TYPE_INT = "TYPE_INT"
+ const val TYPE_STRING = "TYPE_STRING"
+ const val TYPE_FLOAT = "TYPE_FLOAT"
+ const val TYPE_BOOLEAN = "TYPE_BOOLEAN"
+ const val TYPE_OBJECT = "TYPE_OBJECT"
+
+ object BundleHelper {
+
+ fun createBaseBundle(typeKey: String, extraKey: String, data: T): Bundle {
+ val extraBundle = Bundle()
+ when (typeKey) {
+ TYPE_INT -> {
+ extraBundle.putInt(extraKey, data as Int)
+ }
+ TYPE_STRING -> {
+ extraBundle.putString(extraKey, data as String)
+ }
+ TYPE_FLOAT -> {
+ extraBundle.putFloat(extraKey, data as Float)
+ }
+ TYPE_OBJECT -> {
+ val extraData = Gson().toJson(data)
+ extraBundle.putString(extraKey, extraData)
+ }
+ TYPE_BOOLEAN -> {
+ extraBundle.putBoolean(extraKey, data as Boolean)
+ }
+ }
+ return extraBundle
+ }
+
+ inline fun getBaseBundle(
+ activity: Activity,
+ typeKey: String,
+ extraKey: String
+ ): T {
+ when (typeKey) {
+ TYPE_INT -> {
+ bundle = activity.intent.extras?.getInt(extraKey)!!
+ }
+ TYPE_STRING -> {
+ bundle = activity.intent.extras?.getString(extraKey)!!
+ }
+ TYPE_FLOAT -> {
+ bundle = activity.intent.extras?.getFloat(extraKey)!!
+ }
+ TYPE_OBJECT -> {
+ val extraBundle = activity.intent.extras?.getString(extraKey)
+ bundle = Gson().fromJson(extraBundle, T::class.java)!!
+ }
+ TYPE_BOOLEAN -> {
+ bundle = activity.intent.extras?.getBoolean(extraKey)!!
+ }
+ }
+ return bundle as T
+ }
+
+ fun createOptionBundle(tag: Int, extraKey: String): Bundle {
+ val extraBundle = Bundle()
+ extraBundle.putInt(extraKey, tag)
+ return extraBundle
+ }
+
+ fun getOptionBundle(activity: Activity, extraKey: String): Int {
+ return activity.intent.extras?.getInt(extraKey)!!
+ }
+
+ }
+
+ fun navigatorImplicit(
+ context: Context, activityPackage: String, className: String,
+ extras: Bundle? = null, clearStack: Boolean = false, option: Bundle? = null
+ ) {
+ val intent = Intent()
+ Log.d("Activity Package", activityPackage)
+ Log.d("className", className)
+ try {
+ extras?.let { intent.setClassName(activityPackage, className).putExtras(it) }
+ option?.let { intent.setClassName(activityPackage, className).putExtras(it) }
+
+ if (clearStack) {
+ intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
+ }
+
+ context.startActivity(intent)
+
+ } catch (e: Exception) {
+ Toast.makeText(context, "Activity not found", Toast.LENGTH_SHORT).show()
+ e.printStackTrace()
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoPreference.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoPreference.kt
new file mode 100644
index 0000000..5704cff
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoPreference.kt
@@ -0,0 +1,92 @@
+package com.frogobox.sdk.core
+
+import android.content.Context
+import android.content.SharedPreferences
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+
+object FrogoPreference {
+
+ fun getSp(context: Context, prefName: String): SharedPreferences {
+ return context.getSharedPreferences(prefName, Context.MODE_PRIVATE)
+ }
+
+ object Save {
+ fun savePrefFloat(
+ sharedPreferences: SharedPreferences,
+ constPref: String,
+ data: Float
+ ) {
+ sharedPreferences.edit().putFloat(constPref, data).apply()
+ }
+
+ fun savePrefInt(sharedPreferences: SharedPreferences, constPref: String, data: Int) {
+ sharedPreferences.edit().putInt(constPref, data).apply()
+ }
+
+ fun savePrefString(
+ sharedPreferences: SharedPreferences,
+ constPref: String,
+ data: String
+ ) {
+ sharedPreferences.edit().putString(constPref, data).apply()
+ }
+
+ fun savePrefBoolean(
+ sharedPreferences: SharedPreferences,
+ constPref: String,
+ data: Boolean
+ ) {
+ sharedPreferences.edit().putBoolean(constPref, data).apply()
+ }
+
+ fun savePrefLong(sharedPreferences: SharedPreferences, constPref: String, data: Long) {
+ sharedPreferences.edit().putLong(constPref, data).apply()
+ }
+
+ }
+
+ object Delete {
+
+ fun deletePref(sharedPreferences: SharedPreferences, constPref: String) {
+ sharedPreferences.edit().remove(constPref).apply()
+ }
+
+ }
+
+ object Load {
+
+ fun loadPrefFloat(sharedPreferences: SharedPreferences, constPref: String): Float {
+ return sharedPreferences.getFloat(constPref, 0f)
+ }
+
+ fun loadPrefString(sharedPreferences: SharedPreferences, constPref: String): String {
+ return sharedPreferences.getString(constPref, "")!!
+ }
+
+ fun loadPrefInt(sharedPreferences: SharedPreferences, constPref: String): Int {
+ return sharedPreferences.getInt(constPref, 0)
+ }
+
+ fun loadPrefLong(sharedPreferences: SharedPreferences, constPref: String): Long {
+ return sharedPreferences.getLong(constPref, 0)
+ }
+
+ fun loadPrefBoolean(sharedPreferences: SharedPreferences, constPref: String): Boolean {
+ return sharedPreferences.getBoolean(constPref, false)
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoResponse.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoResponse.kt
new file mode 100644
index 0000000..9548c5f
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoResponse.kt
@@ -0,0 +1,32 @@
+package com.frogobox.sdk.core
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+
+interface FrogoResponse {
+
+ interface DataResponse {
+ fun onSuccess(data: T)
+ fun onFailed(statusCode: Int, errorMessage: String? = "")
+ fun onShowProgress()
+ fun onHideProgress()
+ }
+
+ interface StateResponse {
+ fun onSuccess()
+ fun onFailed(statusCode: Int, errorMessage: String? = "")
+ fun onShowProgress()
+ fun onHideProgress()
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoViewModel.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoViewModel.kt
new file mode 100644
index 0000000..f68665e
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/FrogoViewModel.kt
@@ -0,0 +1,22 @@
+package com.frogobox.sdk.core
+
+import android.app.Application
+import androidx.lifecycle.AndroidViewModel
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+abstract class FrogoViewModel(application: Application) : AndroidViewModel(application) {
+ var eventShowProgress = FrogoLiveEvent()
+ var eventEmptyData = FrogoLiveEvent()
+ var eventFailed = FrogoLiveEvent()
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoActivity.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoActivity.kt
new file mode 100644
index 0000000..258e4e9
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoActivity.kt
@@ -0,0 +1,53 @@
+package com.frogobox.sdk.core
+
+import android.view.View
+import androidx.fragment.app.Fragment
+/*
+ * Created by faisalamir on 28/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+interface IFrogoActivity {
+
+ fun setupDetailActivity(title: String)
+
+ fun setupChildFragment(frameId: Int, fragment: Fragment)
+
+ fun showToast(message: String)
+
+ fun setupEventEmptyView(view: View, isEmpty: Boolean)
+
+ fun setupEventProgressView(view: View, progress: Boolean)
+
+ fun checkExtra(extraKey: String): Boolean
+
+ fun baseFragmentNewInstance(
+ fragment: FrogoFragment<*>,
+ argumentKey: String,
+ extraDataResult: Model
+ )
+
+ fun verifySignature()
+
+ fun readSignature()
+
+ fun verifyInstallerId()
+
+ fun verifyUnauthorizedApps()
+
+ fun verifyStores()
+
+ fun verifyDebug()
+
+ fun verifyEmulator()
+
+ fun showApkSignatures()
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoComposeActivity.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoComposeActivity.kt
new file mode 100644
index 0000000..26744df
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoComposeActivity.kt
@@ -0,0 +1,17 @@
+package com.frogobox.sdk.core
+
+/*
+ * Created by faisalamir on 23/08/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+interface IFrogoComposeActivity {
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoDate.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoDate.kt
new file mode 100644
index 0000000..0b13fb4
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoDate.kt
@@ -0,0 +1,57 @@
+package com.frogobox.sdk.core
+
+/*
+ * Created by faisalamir on 28/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+interface IFrogoDate {
+
+ fun getTimeStamp(): String
+
+ fun getTimeNow(): String
+
+ fun getCurrentDate(format: String): String
+
+ fun dateTimeToTimeStamp(date: String?): Long
+
+ fun getCurrentUTC(): String
+
+ fun timetoHour(date: String?): String
+
+ fun dateTimeTZtoHour(date: String?): String
+
+ fun DateTimeMonth(date: String?): String
+
+ fun dateTimeSet(date: String?): String
+
+ fun dateTimeProblem(date: String?): String
+
+ fun getTimeAgo(time: Long): String?
+
+ fun compareDate(newDate: String): String?
+
+ fun messageDate(newDate: String): String?
+
+ fun getDataChat(time: Long): String?
+
+ fun convertClassificationDate(string: String?): String
+
+ fun convertDateNewFormat(string: String?): String
+
+ fun convertLongDateNewFormat(string: String?): String
+
+ fun revertFromLongDateNewFormat(string: String?): String
+
+ fun convertTargetDate(string: String?): String
+
+ fun diffTime(timeStart: String, timeEnd: String): Long
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoFragment.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoFragment.kt
new file mode 100644
index 0000000..54e0d38
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoFragment.kt
@@ -0,0 +1,32 @@
+package com.frogobox.sdk.core
+
+import android.view.View
+import androidx.fragment.app.Fragment
+
+/*
+ * Created by faisalamir on 28/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+interface IFrogoFragment {
+
+ fun setupChildFragment(frameId: Int, fragment: Fragment)
+
+ fun checkArgument(argsKey: String): Boolean
+
+ fun setupEventEmptyView(view: View, isEmpty: Boolean)
+
+ fun setupEventProgressView(view: View, progress: Boolean)
+
+ fun showToast(message: String)
+
+ fun baseNewInstance(argsKey: String, data: Model)
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoFunc.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoFunc.kt
new file mode 100644
index 0000000..ca0d4f1
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoFunc.kt
@@ -0,0 +1,50 @@
+package com.frogobox.sdk.core
+
+import android.content.Context
+import java.util.ArrayList
+
+/*
+ * Created by faisalamir on 28/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+interface IFrogoFunc {
+
+ fun createFolderPictureVideo()
+
+ fun getVideoFilePath(): String
+
+ fun createDialogDefault(
+ context: Context,
+ title: String,
+ message: String,
+ listenerYes: () -> Unit,
+ listenerNo: () -> Unit
+ )
+
+ fun noAction(): Boolean
+
+ fun randomNumber(start: Int, end: Int): Int
+
+ fun isNetworkAvailable(context: Context): Boolean?
+
+ fun fetchRawData(mContext: Context, sourceRaw: Int): ArrayList
+
+ fun fetchRawData(mContext: Context, sourceRaw: Int, shuffle: Boolean): ArrayList
+
+ fun getJsonFromAsset(context: Context, filename: String): String?
+
+ fun getDrawableString(context: Context, nameResource: String): Int
+
+ fun getRawString(context: Context, nameResource: String): Int
+
+ fun waitingMoment(delay: Long, listener:() -> Unit)
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoMusic.kt b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoMusic.kt
new file mode 100644
index 0000000..651b9bd
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/core/IFrogoMusic.kt
@@ -0,0 +1,26 @@
+package com.frogobox.sdk.core
+
+import android.content.Context
+import android.media.MediaPlayer
+
+/*
+ * Created by faisalamir on 29/08/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+interface IFrogoMusic {
+
+ fun playMusic(context: Context, musicFile: Int)
+
+ fun stopMusic()
+
+ fun pauseMusic()
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/util/AppExecutors.kt b/frogosdk/src/main/java/com/frogobox/sdk/util/AppExecutors.kt
new file mode 100644
index 0000000..4e34c32
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/util/AppExecutors.kt
@@ -0,0 +1,33 @@
+package com.frogobox.sdk.util
+
+import android.os.Handler
+import android.os.Looper
+import java.util.concurrent.Executor
+import java.util.concurrent.Executors
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+class AppExecutors constructor(
+ val diskIO: Executor = DiskIOThreadExecutor(),
+ val networkIO: Executor = Executors.newFixedThreadPool(3),
+ val mainThread: Executor = MainThreadExecutor()
+) {
+
+ private class MainThreadExecutor : Executor {
+ private val mainThreadHandler = Handler(Looper.getMainLooper())
+
+ override fun execute(command: Runnable) {
+ mainThreadHandler.post(command)
+ }
+ }
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/util/DiskIOThreadExecutor.kt b/frogosdk/src/main/java/com/frogobox/sdk/util/DiskIOThreadExecutor.kt
new file mode 100644
index 0000000..96405fd
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/util/DiskIOThreadExecutor.kt
@@ -0,0 +1,26 @@
+package com.frogobox.sdk.util
+
+import java.util.concurrent.Executor
+import java.util.concurrent.Executors
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+class DiskIOThreadExecutor : Executor {
+
+ private val diskIO = Executors.newSingleThreadExecutor()
+
+ override fun execute(command: Runnable) {
+ diskIO.execute(command)
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/util/PagerHelper.kt b/frogosdk/src/main/java/com/frogobox/sdk/util/PagerHelper.kt
new file mode 100644
index 0000000..71319ef
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/util/PagerHelper.kt
@@ -0,0 +1,35 @@
+package com.frogobox.sdk.util
+
+import androidx.fragment.app.Fragment
+import androidx.fragment.app.FragmentManager
+import androidx.fragment.app.FragmentPagerAdapter
+
+/*
+ * Created by faisalamir on 26/07/21
+ * FrogoSDK
+ * -----------------------------------------
+ * Name : Muhammad Faisal Amir
+ * E-mail : faisalamircs@gmail.com
+ * Github : github.com/amirisback
+ * -----------------------------------------
+ * Copyright (C) 2021 FrogoBox Inc.
+ * All rights reserved
+ *
+ */
+class PagerHelper(fragmentManager: FragmentManager): FragmentPagerAdapter(fragmentManager){
+
+ private val fragments = mutableListOf()
+ private val titles = mutableListOf()
+
+ override fun getItem(position: Int): Fragment = fragments[position]
+
+ override fun getCount(): Int = fragments.size
+
+ override fun getPageTitle(position: Int): CharSequence = titles[position]
+
+ fun setupPagerFragment(fragment: Fragment, title: String) {
+ fragments.add(fragment)
+ titles.add(title)
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/java/com/frogobox/sdk/view/FrogoAboutUsActivity.kt b/frogosdk/src/main/java/com/frogobox/sdk/view/FrogoAboutUsActivity.kt
new file mode 100644
index 0000000..873b2f0
--- /dev/null
+++ b/frogosdk/src/main/java/com/frogobox/sdk/view/FrogoAboutUsActivity.kt
@@ -0,0 +1,27 @@
+package com.frogobox.sdk.view
+
+import android.os.Bundle
+import com.frogobox.sdk.R
+import com.frogobox.sdk.core.FrogoActivity
+import com.frogobox.sdk.databinding.ActivityFrogoAboutUsBinding
+import java.util.*
+
+class FrogoAboutUsActivity : FrogoActivity() {
+
+ override fun setupViewBinding(): ActivityFrogoAboutUsBinding {
+ return ActivityFrogoAboutUsBinding.inflate(layoutInflater)
+ }
+
+ override fun setupViewModel() {
+ }
+
+ override fun setupUI(savedInstanceState: Bundle?) {
+ setupDetailActivity("About Frogobox")
+
+ binding.apply {
+ val textCopyright = "${getString(R.string.about_all_right_reserved)} ${getString(R.string.about_copyright)} ${Calendar.getInstance().get(Calendar.YEAR)}"
+ tvCopyright.text = textCopyright
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/frogosdk/src/main/res/drawable/ic_frogobox.webp b/frogosdk/src/main/res/drawable/ic_frogobox.webp
new file mode 100644
index 0000000..0da5c93
Binary files /dev/null and b/frogosdk/src/main/res/drawable/ic_frogobox.webp differ
diff --git a/frogosdk/src/main/res/layout/activity_frogo_about_us.xml b/frogosdk/src/main/res/layout/activity_frogo_about_us.xml
new file mode 100644
index 0000000..2afb00f
--- /dev/null
+++ b/frogosdk/src/main/res/layout/activity_frogo_about_us.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frogosdk/src/main/res/values/strings.xml b/frogosdk/src/main/res/values/strings.xml
new file mode 100644
index 0000000..f78a124
--- /dev/null
+++ b/frogosdk/src/main/res/values/strings.xml
@@ -0,0 +1,34 @@
+
+
+
+ BANNER
+ LARGE_BANNER
+ MEDIUM_RECTANGLE
+ FULL_BANNER
+ LEADERBOARD
+ SMART_BANNER
+
+ Read APK signature
+ Verify using the APK signature
+ Verify using the Installer ID
+ Verify unauthorized apps: Lucky Patcher, Freedom, CreeHack and HappyMod
+ Verify third-party stores: Aptoide, BlackMart, 1Mobile, GetApk, etc
+ Verify if app is a debug build
+ Verify if app is being run in an emulator
+
+ Frogobox Id
+ © Copyright
+ All Right Reserved
+
+ toolbar_about_us
+ Copyright
+
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam veniam similiquevoluptates odit, ipsum laborum architecto distinctio harum, provident fugiat praesentium ex quod doloreslaudantium aliquid quidem placeat incidunt vitae!
+ Dummy
+
+ Yes
+ No
+ Delete Data
+ Are you sure you want to delete data?
+
+
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..4d15d01
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,21 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app"s APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Automatically convert third-party libraries to use AndroidX
+android.enableJetifier=true
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..72c3e46
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue Oct 27 15:38:56 ICT 2020
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/jitpack.yml b/jitpack.yml
new file mode 100644
index 0000000..46c8529
--- /dev/null
+++ b/jitpack.yml
@@ -0,0 +1,2 @@
+jdk:
+ - openjdk11
\ No newline at end of file
diff --git a/settings.gradle.kts b/settings.gradle.kts
new file mode 100644
index 0000000..a5555b3
--- /dev/null
+++ b/settings.gradle.kts
@@ -0,0 +1,20 @@
+pluginManagement {
+ repositories {
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ maven { url = uri("https://jitpack.io") }
+ }
+}
+
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ maven { url = uri("https://jitpack.io") }
+ }
+}
+
+rootProject.name = "FrogoSDK"
+include(":app", ":frogosdk")
\ No newline at end of file