Added MainActivity menu option to view log files (via web interface).

This commit is contained in:
Graham Jones
2016-07-25 22:31:33 +01:00
parent ef0616a143
commit 30227b9108
3 changed files with 13 additions and 6 deletions

View File

@@ -228,10 +228,16 @@ public class MainActivity extends Activity {
case R.id.action_logs:
Log.v(TAG, "action_logs");
try {
Intent prefsIntent = new Intent(
MainActivity.this,
LogManagerActivity.class);
this.startActivity(prefsIntent);
String url = "http://"
+ mUtil.getLocalIpAddress()
+ ":8080/logfiles.html";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
//Intent prefsIntent = new Intent(
// MainActivity.this,
// LogManagerActivity.class);
//this.startActivity(prefsIntent);
} catch (Exception ex) {
Log.v(TAG, "exception starting log manager activity " + ex.toString());
}

View File

@@ -51,8 +51,8 @@
android:id="@+id/action_logs"
android:icon="@drawable/ic_action_settings"
android:showAsAction="never|withText"
android:title="View/Edit Log Entries"
android:enabled="false"
android:title="View Log Entries"
android:enabled="true"
/>
<item