|
|
|
@ -6,79 +6,47 @@ |
|
|
|
android:layout_height="match_parent" |
|
|
|
tools:context=".activities.MainActivity"> |
|
|
|
|
|
|
|
<Switch |
|
|
|
android:id="@+id/gatewaySwitch" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
<LinearLayout |
|
|
|
android:id="@+id/bottom" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:minHeight="32dp" |
|
|
|
android:text="Status" |
|
|
|
android:background="#ccccccee" |
|
|
|
android:orientation="vertical" |
|
|
|
app:layout_constraintBottom_toBottomOf="parent" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
app:layout_constraintTop_toTopOf="parent" /> |
|
|
|
android:padding="12dp"> |
|
|
|
|
|
|
|
<EditText |
|
|
|
android:id="@+id/apiKeyEditText" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:ems="10" |
|
|
|
android:hint="key" |
|
|
|
android:inputType="text" |
|
|
|
android:minHeight="48dp" |
|
|
|
android:textIsSelectable="true" |
|
|
|
app:layout_constraintEnd_toStartOf="@+id/registerDeviceBtn" |
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
app:layout_constraintTop_toBottomOf="@+id/gatewaySwitch" /> |
|
|
|
<TextView |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/registerDeviceBtn" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Register Device" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintStart_toEndOf="@+id/apiKeyEditText" |
|
|
|
app:layout_constraintTop_toBottomOf="@+id/gatewaySwitch" /> |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="How To Use" |
|
|
|
android:textStyle="bold" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/grantSMSPermissionBtn" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Grant SMS Permission" |
|
|
|
app:layout_constraintBottom_toBottomOf="parent" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintStart_toStartOf="parent" /> |
|
|
|
<TextView |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Go to vernu-sms.vercel.app/dashboard and click register device, then copy and paste the api key generated or scan the QR code" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/grantSMSPermissionBtn" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:visibility="gone" |
|
|
|
android:text="Grant SMS Permission" /> |
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
<EditText |
|
|
|
android:id="@+id/fcmTokenEditText" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:ems="10" |
|
|
|
android:enabled="false" |
|
|
|
android:gravity="start|top" |
|
|
|
android:hint="FCM Token" |
|
|
|
android:inputType="textMultiLine" |
|
|
|
android:visibility="gone" |
|
|
|
app:layout_constraintEnd_toEndOf="@+id/apiKeyEditText" |
|
|
|
app:layout_constraintStart_toStartOf="@+id/apiKeyEditText" |
|
|
|
app:layout_constraintTop_toBottomOf="@+id/apiKeyEditText" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/scanQRButton" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="or Scan QR" |
|
|
|
app:layout_constraintEnd_toEndOf="@+id/registerDeviceBtn" |
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
app:layout_constraintTop_toBottomOf="@+id/registerDeviceBtn" /> |
|
|
|
|
|
|
|
<ScrollView |
|
|
|
android:id="@+id/scrollView2" |
|
|
|
android:layout_width="409dp" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="606dp" |
|
|
|
app:layout_constraintBottom_toTopOf="@+id/grantSMSPermissionBtn" |
|
|
|
app:layout_constraintBottom_toTopOf="@+id/bottom" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintHorizontal_bias="1.0" |
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
app:layout_constraintTop_toBottomOf="@+id/scanQRButton" |
|
|
|
app:layout_constraintTop_toTopOf="parent" |
|
|
|
app:layout_constraintVertical_bias="0.0"> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
@ -86,6 +54,164 @@ |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:orientation="vertical"> |
|
|
|
|
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:background="#ccccccee" |
|
|
|
android:orientation="horizontal"> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_weight="1" |
|
|
|
android:orientation="vertical" |
|
|
|
android:padding="5dp"> |
|
|
|
|
|
|
|
<EditText |
|
|
|
android:id="@+id/apiKeyEditText" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:ems="10" |
|
|
|
android:hint="key" |
|
|
|
android:inputType="text" |
|
|
|
android:minHeight="48dp" |
|
|
|
android:textIsSelectable="true" /> |
|
|
|
|
|
|
|
<EditText |
|
|
|
android:id="@+id/fcmTokenEditText" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:ems="10" |
|
|
|
android:enabled="false" |
|
|
|
android:gravity="start|top" |
|
|
|
android:hint="FCM Token" |
|
|
|
android:inputType="textMultiLine" |
|
|
|
android:visibility="gone" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/registerDeviceBtn" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Register" /> |
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_gravity="center" |
|
|
|
android:orientation="vertical"> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/scanQRButton" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_margin="5dp" |
|
|
|
android:drawableTop="@drawable/ic_baseline_qr_code_24" |
|
|
|
android:text="Scan" |
|
|
|
android:textColor="@color/black" |
|
|
|
android:theme="@style/Theme.Design.Light" /> |
|
|
|
</LinearLayout> |
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:gravity="center" |
|
|
|
android:orientation="horizontal"> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:orientation="vertical"> |
|
|
|
|
|
|
|
<ImageView |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_gravity="center" |
|
|
|
android:layout_margin="5dp" |
|
|
|
android:src="@drawable/ic_baseline_phone_android_24" /> |
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_gravity="center" |
|
|
|
android:layout_weight="1" |
|
|
|
android:orientation="vertical"> |
|
|
|
|
|
|
|
<TextView |
|
|
|
|
|
|
|
android:id="@+id/deviceBrandAndModelTxt" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Device Brand, Model" |
|
|
|
android:textStyle="bold" /> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:gravity="center" |
|
|
|
android:orientation="horizontal"> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_gravity="center" |
|
|
|
android:orientation="vertical"> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Device ID" |
|
|
|
android:textStyle="italic" /> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/deviceIdTxt" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="ae5ce05c05cde3" /> |
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
<ImageButton |
|
|
|
|
|
|
|
android:id="@+id/copyDeviceIdImgBtn" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
android:src="@drawable/ic_baseline_content_copy_24" /> |
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_gravity="center" |
|
|
|
android:gravity="center" |
|
|
|
android:orientation="vertical"> |
|
|
|
|
|
|
|
<Switch |
|
|
|
android:id="@+id/gatewaySwitch" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_margin="5dp" |
|
|
|
android:minHeight="32dp" |
|
|
|
android:text="" /> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Status" |
|
|
|
android:textSize="16dp" |
|
|
|
android:textStyle="bold" /> |
|
|
|
</LinearLayout> |
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
|