service: Initial implementation of the NFD Android Service
Change-Id: Iee2c2f3588aa9af36bd170a22ce8333e4945ff67
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..289db7d
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
+ android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin"
+ android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
+
+ <Button
+ android:id="@+id/start_nfd_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:onClick="startNFD"
+ android:text="Start NFD" />
+
+ <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>
diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml
new file mode 100644
index 0000000..b1cb908
--- /dev/null
+++ b/app/src/main/res/menu/menu_main.xml
@@ -0,0 +1,6 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
+ <item android:id="@+id/action_settings" android:title="@string/action_settings"
+ android:orderInCategory="100" app:showAsAction="never" />
+</menu>
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+<resources>
+ <!-- Example customization of dimensions originally defined in res/values/dimens.xml
+ (such as screen margins) for screens with more than 820dp of available width. This
+ would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
+ <dimen name="activity_horizontal_margin">64dp</dimen>
+</resources>
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+<resources>
+ <!-- Default screen margins, per the Android Design guidelines. -->
+ <dimen name="activity_horizontal_margin">16dp</dimen>
+ <dimen name="activity_vertical_margin">16dp</dimen>
+</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 63746a1..e39585d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,3 +1,5 @@
<resources>
<string name="app_name">NFD</string>
+ <string name="service_name">NFD Service</string>
+ <string name="action_settings">Settings</string>
</resources>