[MWA-5265] Meta Demo: Theming via xml testen
{Update dependencies and plugin initialization}
This commit is contained in:
parent
994ea9768d
commit
e847e303ba
56
ahoy_rtc_sdk/build.gradle
Normal file
56
ahoy_rtc_sdk/build.gradle
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
apply plugin: "maven-publish"
|
||||||
|
|
||||||
|
configurations.maybeCreate("default")
|
||||||
|
def publishArtifact = artifacts.add("default", file('src/lib/ahoysdk.aar'))
|
||||||
|
|
||||||
|
// set maven repository URL
|
||||||
|
ext.isSnapshot = ahoy_library_versionName.endsWith("-SNAPSHOT")
|
||||||
|
def mavenUrl = isSnapshot ? ahoy_publish_snapshotRepositoryUrl : ahoy_publish_releaseRepositoryUrl
|
||||||
|
if (ahoy_publish_toBuildDir.toBoolean()) {
|
||||||
|
mavenUrl = "file://$buildDir/repos/" + isSnapshot ? 'snapshots' : 'releases'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
aar(MavenPublication) {
|
||||||
|
groupId = ahoy_library_groupId
|
||||||
|
artifactId = ahoy_library_artifactId
|
||||||
|
version = ahoy_library_versionName
|
||||||
|
artifact publishArtifact
|
||||||
|
|
||||||
|
pom.withXml {
|
||||||
|
// 2. add dependencies
|
||||||
|
def dependenciesNode = asNode().appendNode('dependencies')
|
||||||
|
def node = dependenciesNode.appendNode('dependency')
|
||||||
|
node.appendNode('groupId', 'org.java-websocket')
|
||||||
|
node.appendNode('artifactId', 'Java-WebSocket')
|
||||||
|
node.appendNode('version', '1.5.7')
|
||||||
|
node.appendNode('scope', 'compile')
|
||||||
|
|
||||||
|
// 3. configure pom.xml extra information
|
||||||
|
asNode().children().last() + {
|
||||||
|
resolveStrategy = Closure.DELEGATE_FIRST
|
||||||
|
name ahoy_library_name
|
||||||
|
url ahoy_library_url
|
||||||
|
description ahoy_library_description
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Config maven repository
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url mavenUrl
|
||||||
|
credentials {
|
||||||
|
username = ahoy_publish_username
|
||||||
|
password = ahoy_publish_password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
19
ahoy_rtc_sdk/gradle.properties
Normal file
19
ahoy_rtc_sdk/gradle.properties
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
ahoy_library_name = Ahoy's native android SDK
|
||||||
|
ahoy_library_description = Ahoy's mobile app SDK for android.
|
||||||
|
ahoy_library_url = https://ahoyrtc.com/
|
||||||
|
|
||||||
|
ahoy_library_groupId = com.ahoyrtc
|
||||||
|
ahoy_library_artifactId= sdk
|
||||||
|
ahoy_library_versionName = 1.47
|
||||||
|
|
||||||
|
|
||||||
|
# url including scheme, host and port
|
||||||
|
ahoy_publish_toBuildDir = false
|
||||||
|
ahoy_publish_snapshotRepositoryUrl=https://api.webid-solutions.de/releases/android/maven/repository/snapshots
|
||||||
|
ahoy_publish_releaseRepositoryUrl=https://api.webid-solutions.de/releases/android/maven/repository/internal
|
||||||
|
|
||||||
|
# Do not put real credentials here!
|
||||||
|
# Instead, copy to ~/.gradle/gradle.properties and set the values there.
|
||||||
|
ahoy_publish_username =
|
||||||
|
ahoy_publish_password =
|
||||||
1
ahoy_rtc_sdk/settings.gradle
Normal file
1
ahoy_rtc_sdk/settings.gradle
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
BIN
ahoy_rtc_sdk/src/lib/ahoysdk.aar
Normal file
BIN
ahoy_rtc_sdk/src/lib/ahoysdk.aar
Normal file
Binary file not shown.
@ -64,24 +64,27 @@ dependencies {
|
|||||||
// webid product-plugin
|
// webid product-plugin
|
||||||
//noinspection GradleDependency
|
//noinspection GradleDependency
|
||||||
|
|
||||||
def product_catalog_version = "15.1.1"
|
def product_catalog_version = "21.1.1-a-SNAPSHOT"
|
||||||
implementation ("de.webid-solutions:android_meta_plugin:$product_catalog_version") {
|
implementation ("de.webid-solutions:android_meta_plugin:$product_catalog_version") {
|
||||||
changing = true
|
changing = true
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation ("de.webid-solutions:android_auto_ident_on_server_product_plugin:$product_catalog_version") {
|
implementation ("de.webid-solutions:android_auto_ident_product_plugin:$product_catalog_version") {
|
||||||
changing = true
|
changing = true
|
||||||
}
|
}
|
||||||
implementation ("de.webid-solutions:android_pay_on_server_product_plugin:$product_catalog_version") {
|
implementation ("de.webid-solutions:android_pay_ident_product_plugin:$product_catalog_version") {
|
||||||
changing = true
|
changing = true
|
||||||
}
|
}
|
||||||
implementation ("de.webid-solutions:android_video_ident_product_plugin:$product_catalog_version") {
|
implementation ("de.webid-solutions:android_video_ident_product_plugin:$product_catalog_version") {
|
||||||
changing = true
|
changing = true
|
||||||
}
|
}
|
||||||
implementation ("de.webid-solutions:android_eid_on_server_product_plugin:$product_catalog_version") {
|
implementation ("de.webid-solutions:android_eid_product_plugin:$product_catalog_version") {
|
||||||
changing = true
|
changing = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
implementation("de.webid-solutions:android_document_scanner:20.3.0-SNAPSHOT")
|
||||||
|
|
||||||
|
|
||||||
def composeBom = platform('androidx.compose:compose-bom:2025.11.00')
|
def composeBom = platform('androidx.compose:compose-bom:2025.11.00')
|
||||||
implementation composeBom
|
implementation composeBom
|
||||||
androidTestImplementation composeBom
|
androidTestImplementation composeBom
|
||||||
|
|||||||
@ -7,6 +7,7 @@ package de.webidsolutions.metaplugindemo
|
|||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.activity.result.ActivityResult
|
import androidx.activity.result.ActivityResult
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
@ -15,8 +16,8 @@ import androidx.compose.material3.MaterialTheme
|
|||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import de.webidsolutions.auto_ident_on_server_product_plugin.AutoIdentOnServerProductPlugin
|
import de.webidsolutions.auto_ident_product_plugin.AutoIdProductPlugin
|
||||||
import de.webidsolutions.eid_on_server_product_plugin.EIdOnServerProductPlugin
|
import de.webidsolutions.eid_product_plugin.EIdProductPlugin
|
||||||
import de.webidsolutions.meta_plugin.EMetaPluginFailReason
|
import de.webidsolutions.meta_plugin.EMetaPluginFailReason
|
||||||
import de.webidsolutions.meta_plugin.WebIdMetaPlugin
|
import de.webidsolutions.meta_plugin.WebIdMetaPlugin
|
||||||
import de.webidsolutions.metaplugindemo.scenes.MetaPluginDemoScreen
|
import de.webidsolutions.metaplugindemo.scenes.MetaPluginDemoScreen
|
||||||
@ -27,7 +28,7 @@ import de.webidsolutions.mobile_app.sdk.WebIdMobileAppSdkException
|
|||||||
import de.webidsolutions.mobile_app.sdk.WebIdSdkEnvironment
|
import de.webidsolutions.mobile_app.sdk.WebIdSdkEnvironment
|
||||||
import de.webidsolutions.mobile_app.sdk.domain.VerifyActionIdResult
|
import de.webidsolutions.mobile_app.sdk.domain.VerifyActionIdResult
|
||||||
import de.webidsolutions.mobile_app.sdk.impl.AsyncTaskResultGeneric
|
import de.webidsolutions.mobile_app.sdk.impl.AsyncTaskResultGeneric
|
||||||
import de.webidsolutions.pay_on_server_product_plugin.PayOnServerProductPlugin
|
import de.webidsolutions.pay_ident_product_plugin.AccountIdProductPlugin
|
||||||
import de.webidsolutions.plugin_core.EProductPluginErrors
|
import de.webidsolutions.plugin_core.EProductPluginErrors
|
||||||
import de.webidsolutions.plugin_core.IEPluginError
|
import de.webidsolutions.plugin_core.IEPluginError
|
||||||
import de.webidsolutions.plugin_core.IProductPluginWebId
|
import de.webidsolutions.plugin_core.IProductPluginWebId
|
||||||
@ -36,8 +37,8 @@ import de.webidsolutions.plugin_core.ProductPluginErrorResult
|
|||||||
import de.webidsolutions.plugin_core.ProductPluginResult
|
import de.webidsolutions.plugin_core.ProductPluginResult
|
||||||
import de.webidsolutions.plugin_core.WebIdPluginInterruptedException
|
import de.webidsolutions.plugin_core.WebIdPluginInterruptedException
|
||||||
import de.webidsolutions.video_ident.plugin.videocall.VideoOptionsConfig
|
import de.webidsolutions.video_ident.plugin.videocall.VideoOptionsConfig
|
||||||
import de.webidsolutions.video_ident_product_plugin.EVideoIdentProductPluginFailReasons
|
import de.webidsolutions.video_ident_product_plugin.VideoIdProductFailReason
|
||||||
import de.webidsolutions.video_ident_product_plugin.VideoIdentProductPlugin
|
import de.webidsolutions.video_ident_product_plugin.VideoIdProductPlugin
|
||||||
import java.lang.Integer.parseInt
|
import java.lang.Integer.parseInt
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
@ -58,7 +59,8 @@ private val chosenEnvironment: EWebIDEnv = EWebIDEnv.TEST
|
|||||||
/**
|
/**
|
||||||
* Demo App which starts the [MetaPlugin] and handles its result.
|
* Demo App which starts the [MetaPlugin] and handles its result.
|
||||||
*/
|
*/
|
||||||
internal class MainActivity : AppCompatActivity() {
|
internal class MainActivity : ComponentActivity
|
||||||
|
() {
|
||||||
|
|
||||||
private var logText by mutableStateOf("")
|
private var logText by mutableStateOf("")
|
||||||
|
|
||||||
@ -165,10 +167,10 @@ internal class MainActivity : AppCompatActivity() {
|
|||||||
): ArrayList<IProductPluginWebId> {
|
): ArrayList<IProductPluginWebId> {
|
||||||
return ArrayList(
|
return ArrayList(
|
||||||
listOfNotNull(
|
listOfNotNull(
|
||||||
if (useAutoIdent) AutoIdentOnServerProductPlugin() else null,
|
if (useAutoIdent) AutoIdProductPlugin() else null,
|
||||||
if (usePayOnServer) PayOnServerProductPlugin() else null,
|
if (usePayOnServer) AccountIdProductPlugin() else null,
|
||||||
if (useEidOnServer) EIdOnServerProductPlugin() else null,
|
if (useEidOnServer) EIdProductPlugin() else null,
|
||||||
if (useVideo) VideoIdentProductPlugin(config) else null,
|
if (useVideo) VideoIdProductPlugin(config) else null,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -180,7 +182,7 @@ internal class MainActivity : AppCompatActivity() {
|
|||||||
metaPlugin.startPlugin(
|
metaPlugin.startPlugin(
|
||||||
this,
|
this,
|
||||||
activityResultLauncher,
|
activityResultLauncher,
|
||||||
R.style.CustomizedPluginTheme,
|
true,
|
||||||
)
|
)
|
||||||
} catch (e: WebIdMobileAppSdkException) {
|
} catch (e: WebIdMobileAppSdkException) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
@ -229,8 +231,8 @@ internal class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// handle EVideoIdentProductPluginFailReasons
|
// handle EVideoIdentProductPluginFailReasons
|
||||||
if (specificResult is EVideoIdentProductPluginFailReasons) {
|
if (specificResult is VideoIdProductFailReason) {
|
||||||
if (specificResult == EVideoIdentProductPluginFailReasons.CALL_CENTER_CLOSED) {
|
if (specificResult == VideoIdProductFailReason.CALL_CENTER_CLOSED) {
|
||||||
// handle CALL_CENTER_CLOSED as described in code documentation
|
// handle CALL_CENTER_CLOSED as described in code documentation
|
||||||
writeLog("CALL_CENTER_CLOSED")
|
writeLog("CALL_CENTER_CLOSED")
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -5,9 +5,10 @@
|
|||||||
<item name="colorPrimary">#05b1fb</item>
|
<item name="colorPrimary">#05b1fb</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="CustomizedPluginTheme" parent="WebId.PluginTheme.Dark">
|
<!-- Fallback theme for XML-based theming option in dark mode -->
|
||||||
<!--
|
<style name="CustomizedPluginTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
Implement your customized style attributes here for standard and/or light theme.
|
<item name="colorPrimary">#05b1fb</item>
|
||||||
-->
|
<item name="colorPrimaryDark">#0490d0</item>
|
||||||
|
<item name="colorAccent">#05b1fb</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -5,9 +5,10 @@
|
|||||||
<item name="colorPrimary">#05b1fb</item>
|
<item name="colorPrimary">#05b1fb</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="CustomizedPluginTheme" parent="WebId.PluginTheme.Light">
|
<!-- Fallback theme for XML-based theming option -->
|
||||||
<!--
|
<style name="CustomizedPluginTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
Implement your customized style attributes here for standard and/or light theme.
|
<item name="colorPrimary">#05b1fb</item>
|
||||||
-->
|
<item name="colorPrimaryDark">#0490d0</item>
|
||||||
|
<item name="colorAccent">#05b1fb</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -14,7 +14,17 @@ dependencyResolutionManagement {
|
|||||||
|
|
||||||
// add the webid repo to receive the plugin
|
// add the webid repo to receive the plugin
|
||||||
maven {
|
maven {
|
||||||
url 'https://api.webid-solutions.de/releases/android/maven/repository/internal'
|
url "https://api.webid-solutions.de/releases/android/maven/repository/snapshots"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
url "https://api.webid-solutions.de/releases/android/maven2/snapshots"
|
||||||
|
}
|
||||||
|
// use our release repository for releases
|
||||||
|
maven {
|
||||||
|
url "https://api.webid-solutions.de/releases/android/maven/repository/internal"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
url "https://api.webid-solutions.de/releases/android/maven2/releases"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user