Developer SDK

Android examples

Install the SDK · View source on GitHub ↗

provider/src/main/res/layout/activity_main.xml

xml
<?xml version="1.0" encoding="utf-8"?>
<!-- The one screen: the consent disclaimer next to Start, the four status fields, then Stop. -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="16dp">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/app_name"
            android:textAppearance="@android:style/TextAppearance.Material.Headline" />

        <TextView
            android:id="@+id/disclaimer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:textAppearance="@android:style/TextAppearance.Material.Body1" />

        <Button
            android:id="@+id/start"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:text="@string/start" />

        <TextView
            android:id="@+id/problem"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:textAppearance="@android:style/TextAppearance.Material.Body1"
            android:textColor="@android:color/holo_red_dark"
            android:visibility="gone" />

        <TableLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:shrinkColumns="1">

            <TableRow android:paddingVertical="4dp">

                <TextView
                    android:paddingStart="0dp"
                    android:paddingEnd="16dp"
                    android:text="@string/status_label"
                    android:textAppearance="@android:style/TextAppearance.Material.Body2" />

                <TextView
                    android:id="@+id/status_value"
                    android:textAppearance="@android:style/TextAppearance.Material.Body1" />
            </TableRow>

            <TableRow android:paddingVertical="4dp">

                <TextView
                    android:paddingStart="0dp"
                    android:paddingEnd="16dp"
                    android:text="@string/clients_served_label"
                    android:textAppearance="@android:style/TextAppearance.Material.Body2" />

                <TextView
                    android:id="@+id/clients_served_value"
                    android:textAppearance="@android:style/TextAppearance.Material.Body1" />
            </TableRow>

            <TableRow android:paddingVertical="4dp">

                <TextView
                    android:paddingStart="0dp"
                    android:paddingEnd="16dp"
                    android:text="@string/data_provided_label"
                    android:textAppearance="@android:style/TextAppearance.Material.Body2" />

                <TextView
                    android:id="@+id/data_provided_value"
                    android:textAppearance="@android:style/TextAppearance.Material.Body1" />
            </TableRow>

            <TableRow android:paddingVertical="4dp">

                <TextView
                    android:paddingStart="0dp"
                    android:paddingEnd="16dp"
                    android:text="@string/payout_wallet_label"
                    android:textAppearance="@android:style/TextAppearance.Material.Body2" />

                <TextView
                    android:id="@+id/payout_wallet_value"
                    android:textAppearance="@android:style/TextAppearance.Material.Body1"
                    android:textIsSelectable="true" />
            </TableRow>
        </TableLayout>

        <Button
            android:id="@+id/stop"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:enabled="false"
            android:text="@string/stop" />

        <TextView
            android:id="@+id/sdk_version"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:textAppearance="@android:style/TextAppearance.Material.Caption" />
    </LinearLayout>
</ScrollView>