diff --git a/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java b/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java index 68d47b3..f7513dd 100644 --- a/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java +++ b/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java @@ -185,6 +185,9 @@ public class MainActivity extends ActionBarActivity { Intent i = new Intent(this, PreferencesActivity.class); startActivity(i); return true; + case R.id.refreshdev: + mServerFragment.triggerSearch(); + return true; default: return super.onOptionsItemSelected(item); } diff --git a/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java b/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java index a09b28f..7fb3a6a 100644 --- a/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java +++ b/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java @@ -429,4 +429,9 @@ public class ServerFragment extends ListFragment implements OnBackPressedListene } }; + public void triggerSearch() + { + mUpnpService.getControlPoint().search(); + } + } diff --git a/src/main/res/menu/menu.xml b/src/main/res/menu/menu.xml index 09375ae..b1578a8 100644 --- a/src/main/res/menu/menu.xml +++ b/src/main/res/menu/menu.xml @@ -3,7 +3,10 @@ + android:id="@+id/preferences" + android:title="@string/settings_title" /> + \ No newline at end of file diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 5aee71b..b54aa5d 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -41,7 +41,10 @@ controldlna%1$snutomic%2$scom - + + + Refresh Devices + Preferences