remove test action to simplify server implementation; add icons from http://www.androidicons.com/freebies.php
BIN
res/drawable-hdpi/ic_menu_link.png
Executable file
After Width: | Height: | Size: 3.4 KiB |
BIN
res/drawable-hdpi/ic_menu_settings.png
Executable file
After Width: | Height: | Size: 3.9 KiB |
BIN
res/drawable-hdpi/ic_menu_tick.png
Executable file
After Width: | Height: | Size: 3.2 KiB |
BIN
res/drawable-ldpi/ic_menu_link.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
BIN
res/drawable-ldpi/ic_menu_settings.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
res/drawable-ldpi/ic_menu_tick.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
BIN
res/drawable-mdpi/ic_menu_link.png
Executable file
After Width: | Height: | Size: 2.2 KiB |
BIN
res/drawable-mdpi/ic_menu_settings.png
Executable file
After Width: | Height: | Size: 2.5 KiB |
BIN
res/drawable-mdpi/ic_menu_tick.png
Executable file
After Width: | Height: | Size: 2.2 KiB |
@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:id="@+id/settings"
|
<item android:id="@+id/settings"
|
||||||
android:icon="@drawable/icon"
|
android:icon="@drawable/ic_menu_settings"
|
||||||
android:title="@string/settings" />
|
android:title="@string/settings" />
|
||||||
<item android:id="@+id/test"
|
<item android:id="@+id/test"
|
||||||
android:icon="@drawable/icon"
|
android:icon="@drawable/ic_menu_link"
|
||||||
android:title="@string/test" />
|
android:title="@string/test" />
|
||||||
<item android:id="@+id/check_now"
|
<item android:id="@+id/check_now"
|
||||||
android:icon="@drawable/icon"
|
android:icon="@drawable/ic_menu_tick"
|
||||||
android:title="@string/check_now" />
|
android:title="@string/check_now" />
|
||||||
</menu>
|
</menu>
|
@ -2,6 +2,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">KalSMS 2</string>
|
<string name="app_name">KalSMS 2</string>
|
||||||
<string name="settings">Settings</string>
|
<string name="settings">Settings</string>
|
||||||
<string name="test">Test</string>
|
<string name="test">Test Connection</string>
|
||||||
<string name="check_now">Check Now</string>
|
<string name="check_now">Check Messages</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -11,7 +11,6 @@ class KalSMS
|
|||||||
const ACTION_INCOMING = 'incoming';
|
const ACTION_INCOMING = 'incoming';
|
||||||
const ACTION_OUTGOING = 'outgoing';
|
const ACTION_OUTGOING = 'outgoing';
|
||||||
const ACTION_SEND_STATUS = 'send_status';
|
const ACTION_SEND_STATUS = 'send_status';
|
||||||
const ACTION_TEST = 'test';
|
|
||||||
|
|
||||||
const STATUS_QUEUED = 'queued';
|
const STATUS_QUEUED = 'queued';
|
||||||
const STATUS_FAILED = 'failed';
|
const STATUS_FAILED = 'failed';
|
||||||
@ -50,8 +49,6 @@ class KalSMS
|
|||||||
return new KalSMS_Action_Outgoing($this);
|
return new KalSMS_Action_Outgoing($this);
|
||||||
case static::ACTION_SEND_STATUS:
|
case static::ACTION_SEND_STATUS:
|
||||||
return new KalSMS_Action_SendStatus($this);
|
return new KalSMS_Action_SendStatus($this);
|
||||||
case static::ACTION_TEST:
|
|
||||||
return new KalSMS_Action_Test($this);
|
|
||||||
default:
|
default:
|
||||||
return new KalSMS_Action($this);
|
return new KalSMS_Action($this);
|
||||||
}
|
}
|
||||||
|
@ -80,10 +80,6 @@ switch ($action->type)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case KalSMS::ACTION_TEST:
|
|
||||||
echo "OK";
|
|
||||||
return;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
header("HTTP/1.1 404 Not Found");
|
header("HTTP/1.1 404 Not Found");
|
||||||
echo "Invalid action";
|
echo "Invalid action";
|
||||||
|
@ -29,7 +29,6 @@ public class App {
|
|||||||
public static final String ACTION_OUTGOING = "outgoing";
|
public static final String ACTION_OUTGOING = "outgoing";
|
||||||
public static final String ACTION_INCOMING = "incoming";
|
public static final String ACTION_INCOMING = "incoming";
|
||||||
public static final String ACTION_SEND_STATUS = "send_status";
|
public static final String ACTION_SEND_STATUS = "send_status";
|
||||||
public static final String ACTION_TEST = "test";
|
|
||||||
|
|
||||||
public static final String STATUS_QUEUED = "queued";
|
public static final String STATUS_QUEUED = "queued";
|
||||||
public static final String STATUS_FAILED = "failed";
|
public static final String STATUS_FAILED = "failed";
|
||||||
|
@ -40,6 +40,8 @@ public class Main extends Activity {
|
|||||||
@Override
|
@Override
|
||||||
protected void handleResponse(HttpResponse response) throws Exception
|
protected void handleResponse(HttpResponse response) throws Exception
|
||||||
{
|
{
|
||||||
|
parseResponseXML(response);
|
||||||
|
|
||||||
app.log("Server connection OK!");
|
app.log("Server connection OK!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,7 +141,7 @@ public class Main extends Activity {
|
|||||||
case R.id.test:
|
case R.id.test:
|
||||||
app.log("Testing server connection...");
|
app.log("Testing server connection...");
|
||||||
new TestTask().execute(
|
new TestTask().execute(
|
||||||
new BasicNameValuePair("action", App.ACTION_TEST)
|
new BasicNameValuePair("action", App.ACTION_OUTGOING)
|
||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|