- Kotlin 84.1%
- Shell 10.4%
- CSS 5.5%
|
|
||
|---|---|---|
| .woodpecker | ||
| connector_ui | ||
| dokka | ||
| gradle/wrapper | ||
| scripts | ||
| .gitignore | ||
| .jitpack.yml | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle | ||
Deprecated: This library is deprecated. You should use OS picker instead, available with tryUseCurrentOrDefaultDistributor and tryPickDistributor. You can also implement your own dialog/UI to pick a distributor, it will have a better integration in your application than this library.
UnifiedPush android-connector-ui
This library provides a dialog to let the user pick a distributor and register to it.
Documentation
Documentation available at https://unifiedpush.org/kdoc/connector_ui/
v1.0.x requires minSdk > 16
v1.1.x requires minSdk > 21 and uses a more recent version of appcompat
Usage
SelectDistributorDialogsBuilder(
context,
object : UnifiedPushFunctions {
override fun getAckDistributor(): String? =
UnifiedPush.getAckDistributor(context)
override fun getDistributors(): List<String> =
UnifiedPush.getDistributors(context)
override fun register(instance: String) =
UnifiedPush.register(context, instance)
override fun saveDistributor(distributor: String) =
UnifiedPush.saveDistributor(context, distributor)
override fun tryUseDefaultDistributor(callback: (Boolean) -> Unit) =
UnifiedPush.tryUseDefaultDistributor(activity, callback)
}
).run()
It is possible to customize your dialog. For instance, to change the content of the dialog and to do nothing if there isn't any distributor:
object: SelectDistributorDialogBuilder(
this,
object : UnifiedPushFunctions {
override fun getAckDistributor(): String? =
UnifiedPush.getAckDistributor(context)
override fun getDistributors(): List<String> =
UnifiedPush.getDistributors(context)
override fun register(instance: String) =
UnifiedPush.register(context, instance)
override fun saveDistributor(distributor: String) =
UnifiedPush.saveDistributor(context, distributor)
}
){
override var registrationDialogContent: MyRegistrationDialogContent
override fun onNoDistributorFound() {
// do nothing
}
}.run()
Funding
This project is funded through NGI Zero Core, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.
