diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7e0d4e3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,70 @@
+# MetaPlugin Demo Android
+
+This project demonstrates how to embed the WebID Meta Plugin into an Android App.
+The code of the project is described with comments on how to use it.
+
+## Tutorial
+
+To start the plugin in this example project, open the gradle.properties file.
+You will find empty credential properties at the bottom.
+You should have been given a username and a password to access your environment.
+Navigate to the ~/.gradle/gradle.properties file on your system..
+If it does not exist, create it.
+Enter the properties for your preferred platform.
+
+To begin the identification process, you will need to create it outside the app.
+From the process creation request to the server, you should have received an action-id, consisting of 9 numbers.
+
+After that, open the MainActivity.kt file and finish the three TODOs at the top.
+
+
choose video call configs
+
insert your 9-digit action id
+
choose an environment to use
+
+
+After that, start the demo app on an android device.
+Press the main button to start the plugin at runtime.
+
+
+## Fastened Tutorial
+
+
+
Add usernames and passwords in your ~/.gradle/gradle.properties file
+
Create a transaction via backend API
+
Set video-call configs in MainActivity.kt
+
Replace placeholder string of action-id in MainActivity.kt with action-id from process-creation response
+
Choose environment in MainActivity.kt
+
Start this app on a test device
+
Click main button to start the plugin at runtime
+
+
+
+## Additional Notes
+
+On Samsung Devices, configurations should be changed.
+In MainActivity.kt, go to
+
private val config = VideoOptionsConfig(true, false, false)
+and set the booleans according to the chapter
+
+>The VideoOptionsConfig object
+
+in the Integration Guide.
+
+
+## Theming (Optional)
+
+The plugin implemented in this project supports customized theming.
+To try out different themes, go to the file src/main/res/values/themes.xml and add items to the following element:
+
+```
+
+```
+
+Consult the theming guide to see what items can be changed.
+To change the Dark mode theming, navigate to the file src/main/res/values-night/themes.xml and add items to the following element:
+
+```
+
+```
\ 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 b/app/build.gradle
new file mode 100644
index 0000000..bdc8e32
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,83 @@
+plugins {
+ id 'com.android.application'
+ id 'org.jetbrains.kotlin.android'
+}
+
+android {
+ compileSdk 34
+
+ namespace "de.webidsolutions.metaplugindemo"
+
+ defaultConfig {
+ applicationId "de.webidsolutions.metaplugindemo"
+ minSdkVersion 24
+ targetSdkVersion 34
+ versionCode 1
+ versionName "1.0.0"
+
+ buildConfigField "String", "WEBID_DEMO_USERNAME_TEST", "\"${WEBID_DEMO_USERNAME_TEST}\""
+ buildConfigField "String", "WEBID_DEMO_APIKEY_TEST", "\"${WEBID_DEMO_APIKEY_TEST}\""
+ buildConfigField "String", "WEBID_DEMO_USERNAME_PROD", "\"${WEBID_DEMO_USERNAME_PROD}\""
+ buildConfigField "String", "WEBID_DEMO_APIKEY_PROD", "\"${WEBID_DEMO_APIKEY_PROD}\""
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+ buildFeatures {
+ buildConfig true
+ }
+
+ packagingOptions {
+ pickFirst 'lib/x86/libc++_shared.so'
+ pickFirst 'lib/arm64-v8a/libc++_shared.so'
+ pickFirst 'lib/x86_64/libc++_shared.so'
+ pickFirst 'lib/armeabi-v7a/libc++_shared.so'
+ jniLibs { useLegacyPackaging = true }
+ }
+}
+
+dependencies {
+
+ // android dependencies from demo app
+ implementation 'androidx.core:core-ktx:1.12.0'
+ implementation 'androidx.appcompat:appcompat:1.6.1'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.5'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
+
+ // webid product-plugin
+ //noinspection GradleDependency
+
+ def product_catalog_version = "12.0.0"
+ implementation ("de.webid-solutions:android_meta_plugin:$product_catalog_version") {
+ changing = true
+ }
+
+ implementation ("de.webid-solutions:android_auto_ident_on_server_product_plugin:$product_catalog_version") {
+ changing = true
+ }
+ implementation ("de.webid-solutions:android_pay_on_server_product_plugin:$product_catalog_version") {
+ changing = true
+ }
+ implementation ("de.webid-solutions:android_video_ident_product_plugin:$product_catalog_version") {
+ changing = true
+ }
+ implementation ("de.webid-solutions:android_eid_on_server_product_plugin:$product_catalog_version") {
+ changing = true
+ }
+
+}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /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.
+#
+# 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/LICENSE b/app/src/LICENSE
new file mode 100644
index 0000000..989eb08
--- /dev/null
+++ b/app/src/LICENSE
@@ -0,0 +1 @@
+Copyright (C) 2013 - 2024 WebID Solutions GmbH | www.webid-solutions.de. All Rights Reserved
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..6790534
--- /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/de/webidsolutions/metaplugindemo/EWebIdEnv.kt b/app/src/main/java/de/webidsolutions/metaplugindemo/EWebIdEnv.kt
new file mode 100644
index 0000000..3bc7f25
--- /dev/null
+++ b/app/src/main/java/de/webidsolutions/metaplugindemo/EWebIdEnv.kt
@@ -0,0 +1,62 @@
+/*
+ * Created by WebID Solutions GmbH | www.webid-solutions.de.
+ * See the file "LICENSE" for the full license governing this code.
+ */
+package de.webidsolutions.metaplugindemo
+
+import java.net.URI
+
+/**
+ * Environment configuration for WebID endpoints for test usage.
+ */
+enum class EWebIDEnv(
+
+ /**
+ * Username of the client
+ * Used for authentication of the client.
+ */
+ internal val username: String,
+
+ /**
+ * API Key of the client
+ * Used for authentication of the client.
+ */
+ internal val apiKey: String,
+
+ /**
+ * The uri of the environment.
+ * Used to determine the backend.
+ */
+ internal val uri: URI,
+
+ /**
+ * Sha pins of the environment.
+ * Used for authentication
+ */
+ internal val shaPins: Array
+) {
+
+ /**
+ * WebID TEST environment.
+ */
+ TEST(
+ BuildConfig.WEBID_DEMO_USERNAME_TEST,
+ BuildConfig.WEBID_DEMO_APIKEY_TEST,
+ URI.create("https://test.webid-solutions.de/"),
+ arrayOf(
+ "sha256/WcFCbp232usb2PlWzs2PYdr5K7pm21EG6kBms5LUDfY=" // expires 2025.02.22
+ )
+ ),
+
+ /**
+ * WebID PRODUCTION environment.
+ */
+ PRODUCTION(
+ BuildConfig.WEBID_DEMO_USERNAME_PROD,
+ BuildConfig.WEBID_DEMO_APIKEY_PROD,
+ URI.create("https://webid-gateway.de/"),
+ arrayOf(
+ "sha256/FJ8bpW+Zzu86wDBFYA6GygAhw7DbpY10oDmtJl46Hdw=" // expires 2024.11.02
+ )
+ );
+}
\ No newline at end of file
diff --git a/app/src/main/java/de/webidsolutions/metaplugindemo/MainActivity.kt b/app/src/main/java/de/webidsolutions/metaplugindemo/MainActivity.kt
new file mode 100644
index 0000000..d599c70
--- /dev/null
+++ b/app/src/main/java/de/webidsolutions/metaplugindemo/MainActivity.kt
@@ -0,0 +1,195 @@
+/*
+ * Created by WebID Solutions GmbH | www.webid-solutions.de.
+ * See the file "LICENSE" for the full license governing this code.
+ */
+package de.webidsolutions.metaplugindemo
+
+import android.annotation.SuppressLint
+import android.os.Bundle
+import android.widget.Button
+import android.widget.CheckBox
+import android.widget.TextView
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.appcompat.app.AppCompatActivity
+import de.webidsolutions.auto_ident_on_server_product_plugin.AutoIdentOnServerProductPlugin
+import de.webidsolutions.eid_on_server_product_plugin.EIdOnServerProductPlugin
+import de.webidsolutions.meta_plugin.WebIdMetaPlugin
+import de.webidsolutions.mobile_app.sdk.WebIdMobileAppSdkException
+import de.webidsolutions.mobile_app.sdk.WebIdSdkEnvironment
+import de.webidsolutions.mobile_app.sdk.domain.VerifyActionIdResult
+import de.webidsolutions.mobile_app.sdk.impl.AsyncTaskResultGeneric
+import de.webidsolutions.pay_on_server_product_plugin.PayOnServerProductPlugin
+import de.webidsolutions.plugin_core.IProductPluginWebId
+import de.webidsolutions.video_ident.plugin.videocall.VideoOptionsConfig
+import de.webidsolutions.video_ident_product_plugin.VideoIdentProductPlugin
+import de.webidsolutions.metaplugindemo.tasks.EApiResult
+import de.webidsolutions.metaplugindemo.tasks.MetaPluginVerifyTask
+import java.lang.Integer.parseInt
+import java.net.URI
+
+// TODO set your configs
+private val config = VideoOptionsConfig(
+ true,
+ false,
+ false
+)
+
+// TODO insert your Action id
+private const val actionId = "136249502"
+
+// TODO choose your environment
+private val chosenEnvironment: EWebIDEnv = EWebIDEnv.TEST
+// private val chosenEnvironment: EWebIDEnv = EWebIDEnv.PRODUCTION
+
+/**
+ * Demo App which starts the [MetaPlugin] and handles its result.
+ */
+internal class MainActivity : AppCompatActivity() {
+
+ private lateinit var videoPluginCb: CheckBox
+ private lateinit var eidOnServerPluginCb: CheckBox
+ private lateinit var payOnServerPluginCb: CheckBox
+ private lateinit var autoIdOnServerPluginCb: CheckBox
+ private lateinit var textLog: TextView
+ private lateinit var startButton: Button
+
+// private lateinit var coreSdk: IWebIdMobileAppSdk
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_main)
+
+ textLog = findViewById(R.id.log)
+
+ autoIdOnServerPluginCb = findViewById(R.id.cb_plugin_auto_id_on_server)
+ payOnServerPluginCb = findViewById(R.id.cb_plugin_pay_on_server)
+ eidOnServerPluginCb = findViewById(R.id.cb_plugin_eid_on_server)
+ videoPluginCb = findViewById(R.id.cb_plugin_video)
+
+ startButton = findViewById(R.id.startButton)
+ startButton.setOnClickListener {
+ clearLog()
+ writeLog("Starting…")
+ createCoreSdk()
+ }
+ }
+
+ /* CORE SDK */
+
+ /**
+ * Creates the Core SDK from the existing credentials.
+ */
+ private fun createCoreSdk() {
+ writeLog("Creating the Core SDK…")
+
+ // should be provided to you -> currently just using demo credentials
+ val selectedUri: URI = chosenEnvironment.uri
+ val username: String = chosenEnvironment.username
+ val apiKey: String = chosenEnvironment.apiKey
+
+ // actual creation of the core SDK
+ val environment = WebIdSdkEnvironment(
+ selectedUri,
+ *chosenEnvironment.shaPins
+ )
+
+ writeLog("Core SDK creation successful")
+ validateActionId()
+
+ val selectProductPlugins = getSelectedPlugins()
+
+ val metaPlugin = WebIdMetaPlugin(
+ environment,
+ username,
+ apiKey,
+ this.applicationContext,
+ selectProductPlugins
+ )
+ metaPlugin.setVideoConfig(config)
+ MetaPluginVerifyTask(metaPlugin)
+ .setOnPostExecuteCallback(metaPluginVerifyCallback(metaPlugin))
+ .execute(actionId)
+ }
+
+ /**
+ * Validates the WebID actionID
+ */
+ private fun validateActionId() {
+ writeLog("Validate Action-ID…")
+
+ try {
+ parseInt(actionId)
+ if (actionId.length != 9) {
+ throw NumberFormatException()
+ }
+ } catch (e: NumberFormatException) {
+ writeLog("Failure: action id was not set to 9-digit number string in MainActivity.kt file")
+ }
+ }
+
+ // add result launcher for intent
+ private val activityResultLauncher = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult(),
+ this::onPluginResultCallback
+ )
+
+ private fun getSelectedPlugins(): ArrayList {
+ return ArrayList(
+ listOfNotNull(
+ if (autoIdOnServerPluginCb.isChecked) AutoIdentOnServerProductPlugin() else null,
+ if (payOnServerPluginCb.isChecked) PayOnServerProductPlugin() else null,
+ if (eidOnServerPluginCb.isChecked) EIdOnServerProductPlugin() else null,
+ if (videoPluginCb.isChecked) VideoIdentProductPlugin(VideoOptionsConfig()) else null
+ )
+ )
+ }
+
+ private fun metaPluginVerifyCallback(metaPlugin: WebIdMetaPlugin): (AsyncTaskResultGeneric) -> Unit {
+ return { result ->
+ if (result.errorResult == EApiResult.SUCCESS) {
+ var verifyActionIdResult = result.result
+ try {
+ metaPlugin.startPlugin(
+ this,
+ activityResultLauncher,
+ R.style.CustomizedPluginTheme,
+ )
+ } catch (e: WebIdMobileAppSdkException) {
+ e.printStackTrace()
+ writeLog(e.message.toString())
+ }
+ } else {
+ val metaPluginVerifyError = result.errorResult
+ writeLog(metaPluginVerifyError.toString())
+ }
+ }
+ }
+
+ private fun onPluginResultCallback(result: ActivityResult?) {
+ var metaPluginActivityResult = result
+
+ }
+
+
+
+
+ /* MISC */
+
+ /**
+ * Add an entry to the log.
+ *
+ * @param
+ */
+ @SuppressLint("SetTextI18n")
+ private fun writeLog(entry: String) {
+ textLog.text = "${textLog.text} $entry\n"
+ }
+
+ /**
+ * Resets the text log of this activity.
+ */
+ private fun clearLog() {
+ textLog.text = ""
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/AsyncTaskResult.java b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/AsyncTaskResult.java
new file mode 100644
index 0000000..680a30b
--- /dev/null
+++ b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/AsyncTaskResult.java
@@ -0,0 +1,27 @@
+/*
+ * Created by WebId Solutions GmbH | www.webid-solutions.de.
+ * See the file "LICENSE" for the full license governing this code.
+ */
+package de.webidsolutions.metaplugindemo.tasks;
+
+/**
+ * A simple structure for transporting the response of the AsyncTask
+ */
+public class AsyncTaskResult {
+ private final T result;
+ private final String apiResult;
+
+ public T getResult() {
+ return result;
+ }
+
+ public String getApiResult() {
+ return apiResult;
+ }
+
+ public AsyncTaskResult(T result, String apiResult) {
+
+ this.result = result;
+ this.apiResult = apiResult;
+ }
+}
diff --git a/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/EApiResult.kt b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/EApiResult.kt
new file mode 100644
index 0000000..6719b6c
--- /dev/null
+++ b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/EApiResult.kt
@@ -0,0 +1,107 @@
+/*
+* Created by WebID Solutions GmbH | www.webid-solutions.de.
+* See the file "LICENSE" for the full license governing this code.
+*/
+package de.webidsolutions.metaplugindemo.tasks
+
+enum class EApiResult(val messageKey: String, val messageID: Int, val fatal: Boolean) {
+ SUCCESS(
+ "api_success",
+ 0,
+ false
+ ),
+ ACTIONID_NOT_FOUND(
+ "apierror_actionid_not_found",
+ 0,
+ false
+ ),
+ ACTIONID_NOT_VALID(
+ "apierror_actionid_not_valid",
+ 0,
+ false
+ ),
+ ACCESS_DENIED(
+ "apierror_access_denied",
+ 0,
+ true
+ ),
+ IO_FAILURE(
+ "apierror_io_failure",
+ 0,
+ false
+ ),
+ ILLEGAL_ARGUMENT(
+ "apierror_illegal_argument",
+ 0,
+ true
+ ),
+ ILLEGAL_STATE(
+ "apierror_illegal_state",
+ 0,
+ true
+ ),
+ TAN_INCORRECT(
+ "apierror_tan_incorrect",
+ 0,
+ false
+ ),
+ TAN_ILLEGAL_STATE(
+ "apierror_tan_illegal_state",
+ 0,
+ false
+ ),
+ PRECHECK_REQUIRED(
+ "apierror_precheck_required",
+ 0,
+ true
+ ),
+ ECHECK_REQUIRED(
+ "apierror_echeck_required",
+ 0,
+ true
+ ),
+ LEGALNOTICES_CONFIRMATION_MISSING(
+ "apierror_legalnotices_confirmation_missing",
+ 0,
+ true
+ ),
+ AUTOIDENT_REQUIRED(
+ "apierror_autoident_required",
+ 0,
+ true
+ ),
+ SHOW_ENDUSERDIALOG(
+ "apierror_show_enduserdialog",
+ 0,
+ true
+ ),
+ EID_AUTHADA_REQUIRED(
+ "apierror_eid_authada_required",
+ 0,
+ true
+ ),
+ IDENT_NOT_SUPPORTED(
+ "apierror_ident_not_supported",
+ 0,
+ true
+ ),
+ USER_ACTION_NOT_FINISHED(
+ "apierror_user_action_not_finished",
+ 0,
+ false
+ ), //497
+ SERVICE_UNAVAILABLE(
+ "apierror_service_unavailable",
+ 0,
+ true
+ ),
+ SESSION_EXPIRED(
+ "apierror_session_expired",
+ 0,
+ true
+ );
+
+ var extInfo = ""
+ var extInfo2 = ""
+
+}
diff --git a/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/IOnPostExecuteCallback.java b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/IOnPostExecuteCallback.java
new file mode 100644
index 0000000..85acf11
--- /dev/null
+++ b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/IOnPostExecuteCallback.java
@@ -0,0 +1,15 @@
+/*
+ * Created by WebId Solutions GmbH | www.webid-solutions.de.
+ * See the file "LICENSE" for the full license governing this code.
+ */
+package de.webidsolutions.metaplugindemo.tasks;
+
+/**
+ * Callback interface for the demo verify api-call.
+ * Is executed after AsyncTask callback.
+ *
+ * @param the type of the callback response
+ */
+public interface IOnPostExecuteCallback {
+ void onPostExecute(T result);
+}
diff --git a/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/MetaPluginVerifyTask.kt b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/MetaPluginVerifyTask.kt
new file mode 100644
index 0000000..2a40547
--- /dev/null
+++ b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/MetaPluginVerifyTask.kt
@@ -0,0 +1,92 @@
+/*
+* Created by WebID Solutions GmbH | www.webid-solutions.de.
+* See the file "LICENSE" for the full license governing this code.
+*/
+package de.webidsolutions.metaplugindemo.tasks
+
+import de.webidsolutions.meta_plugin.WebIdMetaPlugin
+import de.webidsolutions.mobile_app.sdk.EidIdentRequiredException
+import de.webidsolutions.mobile_app.sdk.IdentNotSupportedException
+import de.webidsolutions.mobile_app.sdk.LegalTermsConfirmationMissingException
+import de.webidsolutions.mobile_app.sdk.ServiceUnavailableException
+import de.webidsolutions.mobile_app.sdk.UserActionNotFinishedException
+import de.webidsolutions.mobile_app.sdk.UserActionNotFoundException
+import de.webidsolutions.mobile_app.sdk.domain.VerifyActionIdResult
+import de.webidsolutions.mobile_app.sdk.impl.AsyncTaskResultGeneric
+import de.webidsolutions.mobile_app.sdk.impl.IOnPostExecuteCallback
+import de.webidsolutions.mobile_app.sdk.impl.WebIdAsyncTask
+import java.io.IOException
+
+internal class MetaPluginVerifyTask(
+ private val metaPlugin: WebIdMetaPlugin
+) : WebIdAsyncTask>() {
+
+ private var metaPluginVerifyOnPostExecuteCallback: IOnPostExecuteCallback>? =
+ null
+
+ override fun doInBackground(vararg params: String): AsyncTaskResultGeneric {
+ val apiResult = try {
+ return AsyncTaskResultGeneric(metaPlugin.verify(params[0]), EApiResult.SUCCESS)
+ } catch (e: IllegalArgumentException) {
+ e.printStackTrace()
+ if (e.message!!.startsWith("actionId")) {
+ EApiResult.ACTIONID_NOT_VALID
+ } else {
+ EApiResult.ILLEGAL_ARGUMENT
+ }
+ } catch (e: LegalTermsConfirmationMissingException) {
+ e.printStackTrace()
+ if (e.message!!.startsWith("actionId")) {
+ EApiResult.ACTIONID_NOT_VALID
+ } else {
+ EApiResult.ILLEGAL_ARGUMENT
+ }
+ } catch (e: UserActionNotFinishedException) {
+ e.printStackTrace()
+ if (e.message!!.startsWith("actionId")) {
+ EApiResult.ACTIONID_NOT_VALID
+ } else {
+ EApiResult.ILLEGAL_ARGUMENT
+ }
+ } catch (e: IdentNotSupportedException) {
+ e.printStackTrace()
+ if (e.message!!.startsWith("actionId")) {
+ EApiResult.ACTIONID_NOT_VALID
+ } else {
+ EApiResult.ILLEGAL_ARGUMENT
+ }
+ } catch (e: EidIdentRequiredException) {
+ e.printStackTrace()
+ if (e.message!!.startsWith("actionId")) {
+ EApiResult.ACTIONID_NOT_VALID
+ } else {
+ EApiResult.ILLEGAL_ARGUMENT
+ }
+ } catch (e: AccessDeniedException) {
+ e.printStackTrace()
+ EApiResult.ACCESS_DENIED.apply { extInfo = e.message!! }
+ } catch (e: UserActionNotFoundException) {
+ e.printStackTrace()
+ EApiResult.ACTIONID_NOT_FOUND
+ } catch (e: IOException) {
+ e.printStackTrace()
+ EApiResult.IO_FAILURE.apply { extInfo = e.message!! }
+ } catch (e: IllegalStateException) {
+ e.printStackTrace()
+ EApiResult.ILLEGAL_STATE
+ } catch (e: ServiceUnavailableException) {
+ e.printStackTrace()
+ EApiResult.SERVICE_UNAVAILABLE
+ }
+ return AsyncTaskResultGeneric(null, apiResult)
+ }
+
+ override fun onPostExecute(result: AsyncTaskResultGeneric?) {
+ metaPluginVerifyOnPostExecuteCallback?.let { clb -> result?.let { clb.onPostExecute(it) } }
+ }
+
+ fun setOnPostExecuteCallback(onPostExecuteCallback: IOnPostExecuteCallback>): MetaPluginVerifyTask {
+ metaPluginVerifyOnPostExecuteCallback = onPostExecuteCallback
+ return this
+ }
+}
diff --git a/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/VerifyActionIdTask.java b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/VerifyActionIdTask.java
new file mode 100644
index 0000000..6babcfd
--- /dev/null
+++ b/app/src/main/java/de/webidsolutions/metaplugindemo/tasks/VerifyActionIdTask.java
@@ -0,0 +1,70 @@
+/*
+ * Created by WebId Solutions GmbH | www.webid-solutions.de.
+ * See the file "LICENSE" for the full license governing this code.
+ */
+package de.webidsolutions.metaplugindemo.tasks;
+
+import android.os.AsyncTask;
+
+import java.io.IOException;
+
+import de.webidsolutions.mobile_app.sdk.AccessDeniedException;
+import de.webidsolutions.mobile_app.sdk.EidIdentRequiredException;
+import de.webidsolutions.mobile_app.sdk.IWebIdMobileAppSdk;
+import de.webidsolutions.mobile_app.sdk.IdentNotSupportedException;
+import de.webidsolutions.mobile_app.sdk.LegalTermsConfirmationMissingException;
+import de.webidsolutions.mobile_app.sdk.ServiceUnavailableException;
+import de.webidsolutions.mobile_app.sdk.UserActionNotFinishedException;
+import de.webidsolutions.mobile_app.sdk.UserActionNotFoundException;
+import de.webidsolutions.mobile_app.sdk.domain.VerifyActionIdResult;
+
+/**
+ * A asynchronous call for sdkInstance.verifyActionId(params[0]).
+ * Only implemented inside an AsyncTask for demo purposes.
+ * Can be also be done via other means, e.g. coroutines.
+ */
+public class VerifyActionIdTask extends AsyncTask> {
+ private IOnPostExecuteCallback> iVerifyActionIdInternalOnPostExecuteCallback;
+ private final IWebIdMobileAppSdk sdkInstance;
+
+ @Override
+ protected AsyncTaskResult doInBackground(String... params) {
+
+ String apiResult;
+
+ try {
+
+ return new AsyncTaskResult<>(sdkInstance.verifyActionId(params[0]), "success");
+
+ } catch (
+ IdentNotSupportedException |
+ UserActionNotFinishedException |
+ AccessDeniedException |
+ EidIdentRequiredException |
+ LegalTermsConfirmationMissingException |
+ IOException |
+ ServiceUnavailableException |
+ UserActionNotFoundException e
+ ) {
+ apiResult = e.getClass().getSimpleName();
+ }
+
+ return new AsyncTaskResult<>(null, apiResult);
+ }
+
+ public VerifyActionIdTask(IWebIdMobileAppSdk sdkInstance) {
+ this.sdkInstance = sdkInstance;
+ }
+
+ @Override
+ protected void onPostExecute(AsyncTaskResult data) {
+ if (iVerifyActionIdInternalOnPostExecuteCallback != null) {
+ iVerifyActionIdInternalOnPostExecuteCallback.onPostExecute(data);
+ }
+ }
+
+ public VerifyActionIdTask setOnPostExecuteCallback(IOnPostExecuteCallback> onPostExecuteCallback) {
+ this.iVerifyActionIdInternalOnPostExecuteCallback = onPostExecuteCallback;
+ return this;
+ }
+}
\ 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..7ec9b21
--- /dev/null
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
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..d6727bd
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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..7353dbd
--- /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..0d57b8f
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ 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..e1fefda
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..2117ec5
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..618eb24
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..3ef34e0
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..57f3526
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..b493d53
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..74b6a60
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..17c424d
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..a6f2646
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..792bcc4
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-night/themes.xml b/app/src/main/res/values-night/themes.xml
new file mode 100644
index 0000000..af49a96
--- /dev/null
+++ b/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..4411f0b
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,12 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+ #05b1fb
+ #A49DB2
+
\ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..144d3da
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 24dp
+ 60dp
+ 40dp
+
\ No newline at end of file
diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..c5d5899
--- /dev/null
+++ b/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #FFFFFF
+
\ 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..8c79da3
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,6 @@
+
+ MetaPluginDemo
+ Start Meta Plugin
+ Log:
+ Nothing yet…
+
\ 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..4e0d81a
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..7bdbc84
--- /dev/null
+++ b/build.gradle
@@ -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 '8.1.2' apply false
+ id 'com.android.library' version '8.1.2' apply false
+ id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..171b652
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,34 @@
+# 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 -Dfile.encoding=UTF-8
+# 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
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
+
+# credentials for WebId's test system
+# Do not put real credentials here!
+# Instead, copy to ~/.gradle/gradle.properties and set the values there.
+WEBID_DEMO_USERNAME_TEST=
+WEBID_DEMO_APIKEY_TEST=
+# credentials for WebId's production system
+# Do not put real credentials here!
+# Instead, copy to ~/.gradle/gradle.properties and set the values there.
+WEBID_DEMO_USERNAME_PROD=
+WEBID_DEMO_APIKEY_PROD=
\ 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..e708b1c
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..eaf3450
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Jul 13 14:56:30 CEST 2022
+distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
+distributionPath=wrapper/dists
+zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..4f906e0
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# 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
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## 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='"-Xmx64m" "-Xms64m"'
+
+# 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 or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; 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=`expr $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"
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..107acd3
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@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 Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@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="-Xmx64m" "-Xms64m"
+
+@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 execute
+
+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 execute
+
+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
+
+: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 %*
+
+: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/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..57ce0fd
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,22 @@
+pluginManagement {
+ repositories {
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ }
+}
+
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+
+ // add the webid repo to receive the plugin
+ maven {
+ url 'https://api.webid-solutions.de/releases/android/maven/repository/internal'
+ }
+ }
+}
+rootProject.name = "MetaPluginDemo"
+include ':app'