# 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.</br>
You should have been given a username and a password to access your environment.</br>
Navigate to the ~/.gradle/gradle.properties file on your system..
If it does not exist, create it.</br>
Enter the properties for your preferred platform.

To begin the identification process, you will need to create it outside the app.</br>
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.
<ol>
    <li>choose video call configs</li>
    <li>insert your 9-digit action id</li>
    <li>choose an environment to use</li>
</ol>

After that, start the demo app on an android device.</br>
Press the main button to start the plugin at runtime.


## Fastened Tutorial

<ol>
    <li>Add usernames and passwords in your ~/.gradle/gradle.properties file</li>
    <li>Create a transaction via backend API</li>
    <li>Set video-call configs in MainActivity.kt</li>
    <li>Replace placeholder string of action-id in MainActivity.kt with action-id from process-creation response</li>
    <li>Choose environment in MainActivity.kt</li>
    <li>Start this app on a test device</li>
    <li>Click main button to start the plugin at runtime</li>
</ol>


## Additional Notes

On Samsung Devices, configurations should be changed.
In MainActivity.kt, go to 
<pre><code>private val config = VideoOptionsConfig(true, false, false)</code></pre>
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.</br>
To try out different themes, go to the file src/main/res/values/themes.xml and add items to the following element:

```
<style name="CustomizedPluginTheme" parent="WebId.PluginTheme.Light">
</style>
```

Consult the theming guide to see what items can be changed.</br>
To change the Dark mode theming, navigate to the file src/main/res/values-night/themes.xml and add items to the following element:

```
<style name="CustomizedPluginTheme" parent="WebId.PluginTheme.Dark">
</style>
```