service: NFD Android service starts and stops NFD
Change-Id: I9351c669282c3c02fd533237489beeb10fe7d32f
Refs: #2431
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 289db7d..cb17103 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -7,41 +7,11 @@
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
<Button
- android:id="@+id/start_nfd_button"
+ android:id="@+id/nfd_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:onClick="startNFD"
- android:text="Start NFD" />
+ android:onClick="toggleNfdState"
+ android:enabled="false"
+ android:text="Checking on NFD Service ..." />
- <Button
- android:id="@+id/stop_nfd_button"
- android:layout_below="@id/start_nfd_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:onClick="stopNFD"
- android:text="Stop NFD" />
-
- <Button
- android:id="@+id/start_nfd_explicit_button"
- android:layout_below="@id/stop_nfd_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:onClick="startNFDexplicit"
- android:text="Start NFD explicit!" />
-
- <Button
- android:id="@+id/start_nfd_jni"
- android:layout_below="@id/start_nfd_explicit_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:onClick="startNfd"
- android:text="Start NFD through JNI" />
-
- <Button
- android:id="@+id/stop_nfd_jni"
- android:layout_below="@id/start_nfd_jni"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:onClick="stopNfd"
- android:text="Stop NFD through JNI" />
</RelativeLayout>