Skip to content

Releases: frogobox/frogo-sdk

Release v1.1.0

02 Jun 04:27
Compare
Choose a tag to compare

Release v1.0.9

30 May 13:52
Compare
Choose a tag to compare

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.9

What's New??

* SDK Android and Desktop *
* Adding Ext Function *
* Update: Fixing Bug RxJava Ext *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.9'

        // library frogo-sdk for desktop
        implementation 'com.github.frogobox.frogo-sdk:frogocoresdk:1.0.9'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.9")

        // library frogo-sdk for desktop
        implementation("com.github.frogobox.frogo-sdk:frogocoresdk:1.0.9")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// ---------------------------------------...
Read more

Release v1.0.8

30 May 07:02
Compare
Choose a tag to compare

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.8

What's New??

* SDK Android and Desktop *
* Adding Ext Function *
* Update: Fixing Bug RxJava Ext *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.8'

        // library frogo-sdk for desktop
        implementation 'com.github.frogobox.frogo-sdk:frogocoresdk:1.0.8'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.8")

        // library frogo-sdk for desktop
        implementation("com.github.frogobox.frogo-sdk:frogocoresdk:1.0.8")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// ---------------------------------------...
Read more

Release v1.0.7

30 May 01:25
Compare
Choose a tag to compare

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.7

What's New??

* SDK Android and Desktop *
* Adding Ext Function *
* Update: Fixing Bug RxJava Ext *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.7'

        // library frogo-sdk for desktop
        implementation 'com.github.frogobox.frogo-sdk:frogocoresdk:1.0.7'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.7")

        // library frogo-sdk for desktop
        implementation("com.github.frogobox.frogo-sdk:frogocoresdk:1.0.7")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// ---------------------------------------...
Read more

Release v1.0.6

11 May 23:46
Compare
Choose a tag to compare

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.6

What's New??

* SDK Android and Desktop *
* Adding Ext Function *
* Update: Fixing Bug RxJava Ext *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.6'

        // library frogo-sdk for desktop
        implementation 'com.github.frogobox.frogo-sdk:frogocoresdk:1.0.6'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.6")

        // library frogo-sdk for desktop
        implementation("com.github.frogobox.frogo-sdk:frogocoresdk:1.0.6")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// ---------------------------------------...
Read more

Release v1.0.5

30 Apr 10:40
Compare
Choose a tag to compare

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.5

What's New??

* SDK Android and Desktop *
* Adding Ext Function *
* Update: Fixing Bug RxJava Ext *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.5'

        // library frogo-sdk for desktop
        implementation 'com.github.frogobox.frogo-sdk:frogocoresdk:1.0.5'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.5")

        // library frogo-sdk for desktop
        implementation("com.github.frogobox.frogo-sdk:frogocoresdk:1.0.5")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// ---------------------------------------...
Read more

Release v1.0.4

18 Apr 09:55
Compare
Choose a tag to compare

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.4

What's New??

* SDK Android and Desktop *
* Adding Ext Function *
* Update: Fixing Bug RxJava Ext *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.4'

        // library frogo-sdk for desktop
        implementation 'com.github.frogobox.frogo-sdk:frogocoresdk:1.0.4'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.4")

        // library frogo-sdk for desktop
        implementation("com.github.frogobox.frogo-sdk:frogocoresdk:1.0.4")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// ---------------------------------------...
Read more

Release v1.0.3

17 Apr 00:50
Compare
Choose a tag to compare

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.3

What's New??

* SDK Android and Desktop *
* Adding Ext Function *
* Update: Fixing Bug RxJava Ext *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.3'

        // library frogo-sdk for desktop
        implementation 'com.github.frogobox.frogo-sdk:frogocoresdk:1.0.3'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.3")

        // library frogo-sdk for desktop
        implementation("com.github.frogobox.frogo-sdk:frogocoresdk:1.0.3")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// ---------------------------------------...
Read more

Release v1.0.2

14 Apr 10:01
Compare
Choose a tag to compare

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.2

What's New??

* SDK Android and Desktop *
* Adding Ext Function *
* Update: Fixing Bug RxJava Ext *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.2'

        // library frogo-sdk for desktop
        implementation 'com.github.frogobox.frogo-sdk:frogocoresdk:1.0.2'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.2")

        // library frogo-sdk for desktop
        implementation("com.github.frogobox.frogo-sdk:frogocoresdk:1.0.2")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// ---------------------------------------...
Read more

Release v1.0.1

11 Apr 13:43
Compare
Choose a tag to compare

Full Changelog: 1.0.0...1.0.1

ScreenShoot Apps

About This Project (release 👷🔧️👷‍♀️⛏)


Android CI
Scan with Detekt
pages-build-deployment

  • SDK for anything your problem to make easier developing android apps
  • Available for android and desktop
  • Privacy Policy Click Here
  • License Click Here

ScreenShoot

SS 1 SS 2 SS 3 SS 4

Version Release

This Is Latest Release

$version_release = 1.0.1

What's New??

* SDK Android and Desktop *
* Adding Ext Function *

Download this project

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

// Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

#### <Option 1> Groovy Gradle

    dependencies {
        // library frogo-sdk
        implementation 'com.github.frogobox:frogo-sdk:1.0.1'
    }

#### <Option 2> Kotlin DSL Gradle

    dependencies {
        // library frogo-sdk
        implementation("com.github.frogobox:frogo-sdk:1.0.1")
    }

Step 3. Function from this SDK

All Class SDK (android)

FrogoActivity
FrogoApplication
FrogoComposeActivity
FrogoFragment
FrogoFunc
FrogoMusic
FrogoMutableLiveData
FrogoNavigation
FrogoPagerHelper
FrogoPiracyActivity
FrogoPreference
FrogoSinglePreference
FrogoViewModel

All Class SDK (desktop & android)

FrogoApiClient
FrogoApiModel
FrogoApiObserver
FrogoConstant
FrogoDataResponse
FrogoDate
FrogoLocalObserver
FrogoStateResponse
IFrogoDate

FrogoActivity

fun setupDetailActivity(title: String)

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun showToast(message: String)

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun checkExtra(extraKey: String): Boolean

fun <Model> FrogoFragmentNewInstance(
    fragment: FrogoFragment<*>,
    argumentKey: String,
    extraDataResult: Model
)

fun isNetworkConnected(): Boolean

fun setupFullScreen()

fun setupHideSystemUI()

fun shareApp(packageName: String, appName: String)

fun rateApp(packageName: String)

FrogoFragment

fun setupChildFragment(frameId: Int, fragment: Fragment)

fun checkArgument(argsKey: String): Boolean

fun setupEmptyView(view: View, isEmpty: Boolean)

fun setupProgressView(view: View, isProgress: Boolean)

fun showToast(message: String)

fun <Model> frogoNewInstance(argsKey: String, data: Model)

Ext Function

FrogoRetrofitExt.kt

// Single Api Request
fun <T : Any> Call<T>.doApiRequest(callback: FrogoDataResponse<T>) {

    callback.onShowProgress()
    enqueue(object : Callback<T> {
        override fun onResponse(call: Call<T>, response: Response<T>) {
            response.body()?.let { callback.onSuccess(it) }
            callback.onHideProgress()
        }

        override fun onFailure(call: Call<T>, t: Throwable) {
            callback.onFailed(500, t.localizedMessage)
            callback.onHideProgress()
        }
    })

}

FrogoRxJavaObservableExt.kt

// Single Api Request with scheduler
fun <T : Any> Observable<T>.doApiRequest(scheduler: Scheduler, callback: FrogoDataResponse<T>) {
    subscribeOn(Schedulers.io())
        .doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .observeOn(scheduler)
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

// -------------------------------------------------------------------------------------------------

// Single Api Request
fun <T : Any> Observable<T>.doApiRequest(callback: FrogoDataResponse<T>) {
    doOnSubscribe { callback.onShowProgress() }
        .doOnTerminate { callback.onHideProgress() }
        .subscribe(object : FrogoApiObserver<T>() {
            override fun onSuccess(data: T) {
                callback.onSuccess(data)
            }

            override fun onFailure(code: Int, errorMessage: String) {
                callback.onFailed(code, errorMessage)
            }
        })
}

FrogoContextActivityExt.kt

inline fun <reified ClassActivity> Context.singleStartActivity() {
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    startActivity(Intent(this, ClassActivity::class.java))
}

// -------------------------------------------------------------------------------------------------

inline fun <reified ClassActivity, reified Model> Context.singleStartActivity(
    extraKey: String,
    data: Model
) {
    val intent = Intent(this, ClassActivity::class.java)
    val extraData = Gson().toJson(data)
    intent.putExtra(extraKey, extraData)
    FLog.d("Activity : ${ClassActivity::class.java.simpleName}")
    FLog.d("Data     : Extra Data (${Model::class.java.simpleName}) : $extraData")
    startActivity(intent)
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Activity.singleGetExtraData(extraKey: String): Model {
    val extraIntent = intent.getStringExtra(extraKey)
    return Gson().fromJson(extraIntent, Model::class.java)
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityShareApp(subject: String, text: String) {
    val intent = Intent(Intent.ACTION_SEND)
    intent.type = "text/plain"
    intent.putExtra(Intent.EXTRA_SUBJECT, subject)
    intent.putExtra(Intent.EXTRA_TEXT, text)
    FLog.d("$TAG : Subject Share App : $subject")
    FLog.d("$TAG : Message Share App : $text")
    startActivity(Intent.createChooser(intent, subject))
}

// -------------------------------------------------------------------------------------------------

fun Context.singleStartActivityOpenApp(url: String) {
    FLog.d("$TAG : Url : $url")
    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}

FrogoContextFragmentExt.kt

fun <Model> Fragment.singleNewInstance(argsKey: String, data: Model) {
    val argsData = Gson().toJson(data)
    val bundleArgs = Bundle().apply {
        putString(argsKey, argsData)
    }
    this.arguments = bundleArgs
}

// -------------------------------------------------------------------------------------------------

inline fun <reified Model> Fragment.singleGetInstance(argsKey: String): Model {
    val argsData = this.arguments?.getString(argsKey)
    return Gson().fromJson(argsData, Model::class.java)
}

FrogoImageViewExt.kt

fun ImageView.glideLoad(data: Any?) {
    FLog.d("$TAG : Params : $data")
    FLog.d("$TAG : Glide Load Ext")
    Glide.with(context).load(data).into(this)
}

FrogoViewExt.kt

fun View.visible() {
    FLog.d("$TAG : View Visible")
    visibility = View.VISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.gone() {
    FLog.d("$TAG : View Gone")
    visibility = View.GONE
}

// -------------------------------------------------------------------------------------------------

fun View.invisible() {
    FLog.d("$TAG : View Invisible")
    visibility = View.INVISIBLE
}

// -------------------------------------------------------------------------------------------------

fun View.progressViewHandle(isProgressState: Boolean) {
    FLog.d("$TAG : isProgressState >> $isProgressState")
    if (isProgressState) {
        visible()
    } else {
        gone()
    }
}

// -------------------------------------------------------------------------------------------------

fun View.emptyViewHandle(isEmptyState: Boolean) {
    FLog.d("$TAG : isEmptyState >> $isEmptyState")
    if (isEmptyState) {
        visible()
  ...
Read more