From 615e8358809b33ade0e34648621e12e34a28dc32 Mon Sep 17 00:00:00 2001 From: Greg Alexander Date: Sun, 18 Jan 2015 16:10:29 -0500 Subject: [PATCH] get the ip address of the device using wifimanager, which only works if we're on wifi, and needs a new permission --- AndroidManifest.xml | 1 + res/layout/main.xml | 8 ++++++++ src/org/galexander/sshd/SimpleSSHD.java | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 94a5214..218c2e0 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -7,6 +7,7 @@ + diff --git a/res/layout/main.xml b/res/layout/main.xml index 342414b..0022207 100644 --- a/res/layout/main.xml +++ b/res/layout/main.xml @@ -3,6 +3,14 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> + >0)&0xff) + "." + + String.valueOf((ip>>8)&0xff) + "." + + String.valueOf((ip>>16)&0xff) + "." + + String.valueOf((ip>>24)&0xff); + } }