5
0
mirror of https://github.com/cwinfo/envayasms.git synced 2024-12-04 12:35:32 +00:00

rename to EnvayaSMS; add icon

This commit is contained in:
Jesse Young 2011-09-22 16:16:46 -07:00
parent 73bc3c9fc6
commit 7df89cd5d0
44 changed files with 201 additions and 189 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.envaya.kalsms"
android:versionCode="3"
android:versionName="2.0-beta 3">
package="org.envaya.sms"
android:versionCode="6"
android:versionName="2.0-beta 4">
<uses-sdk android:minSdkVersion="4" />
@ -16,7 +16,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<application android:name="org.envaya.kalsms.App"
<application android:name="org.envaya.sms.App"
android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".ui.Main" android:label="@string/app_name">
<intent-filter>
@ -25,16 +25,16 @@
</intent-filter>
</activity>
<activity android:name=".ui.Help" android:label="KalSMS : Help">
<activity android:name=".ui.Help" android:label="EnvayaSMS : Help">
</activity>
<activity android:name=".ui.TestPhoneNumbers" android:label="KalSMS : Test Phone Numbers">
<activity android:name=".ui.TestPhoneNumbers" android:label="EnvayaSMS : Test Phone Numbers">
</activity>
<activity android:name=".ui.ForwardInbox" android:label="KalSMS : Forward Inbox">
<activity android:name=".ui.ForwardInbox" android:label="EnvayaSMS : Forward Inbox">
</activity>
<activity android:name=".ui.Prefs" android:label="KalSMS : Settings">
<activity android:name=".ui.Prefs" android:label="EnvayaSMS : Settings">
</activity>
<receiver android:name=".receiver.SmsReceiver">
@ -45,14 +45,14 @@
<receiver android:name=".receiver.OutgoingSmsReceiver">
<intent-filter>
<action android:name="org.envaya.kalsms.OUTGOING_SMS" />
<action android:name="org.envaya.sms.OUTGOING_SMS" />
<data android:scheme="content" />
</intent-filter>
</receiver>
<receiver android:name=".receiver.MessageStatusNotifier" android:exported="true">
<intent-filter>
<action android:name="org.envaya.kalsms.MESSAGE_STATUS" />
<action android:name="org.envaya.sms.MESSAGE_STATUS" />
<data android:scheme="content" />
</intent-filter>
</receiver>

12
LICENSE Normal file → Executable file
View File

@ -1,6 +1,6 @@
Except for the parts noted otherwise (see Third-Party Libraries section below),
KalSMS' source code is licensed under the MIT license:
EnvayaSMS' source code is licensed under the MIT license:
-----
@ -31,14 +31,14 @@ Third-Party Libraries
libs/httpmime-4.1.2.jar is (c) Apache Software Foundation
released under Apache License, Version 2.0
org.envaya.kalsms.Base64Coder is (c) 2003-2010 Christian d'Heureuse,
org.envaya.sms.Base64Coder is (c) 2003-2010 Christian d'Heureuse,
released under MIT License (and others)
org.envaya.kalsms.ui.InertCheckBox and org.envaya.kalsms.ui.CheckableRelativeLayout
is (c) Cédric Caron, released presumably into the public domain at
org.envaya.sms.ui.InertCheckBox and org.envaya.sms.ui.CheckableRelativeLayout
is (c) C<EFBFBD>dric Caron, released presumably into the public domain at
http://www.marvinlabs.com/2010/10/custom-listview-ability-check-items/
org.envaya.kalsms.App.chooseOutgoingSmsPackage and
org.envaya.kalsms.ForegroundService include code from Android,
org.envaya.sms.App.chooseOutgoingSmsPackage and
org.envaya.sms.ForegroundService include code from Android,
Copyright 2005-2009 The Android Open Source Project
See NOTICE

2
README
View File

@ -1,4 +1,4 @@
KalSMS is an Android app that acts as a SMS and MMS gateway.
EnvayaSMS is an Android app that acts as a SMS and MMS gateway.
For more information and installation instructions,
see http://kalsms.net/

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="KalSMS" default="help">
<project name="EnvayaSMS" default="help">
<!-- The local.properties file is created and updated by the 'android'
tool.

BIN
res/drawable-hdpi/icon.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
res/drawable-ldpi/icon.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
res/drawable-mdpi/icon.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<org.envaya.kalsms.ui.CheckableRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<org.envaya.sms.ui.CheckableRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#cccccc">
<org.envaya.kalsms.ui.InertCheckBox android:id="@+id/inbox_checkbox"
<org.envaya.sms.ui.InertCheckBox android:id="@+id/inbox_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
@ -31,4 +31,4 @@
android:focusable="false"
android:paddingBottom="6sp"
android:textSize="14sp"></TextView>
</org.envaya.kalsms.ui.CheckableRelativeLayout>
</org.envaya.sms.ui.CheckableRelativeLayout>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">KalSMS</string>
<string name="app_name">EnvayaSMS</string>
<string name="settings">Settings</string>
<string name="test">Test Connection</string>
<string name="check_now">Check Messages</string>
@ -8,8 +8,8 @@
<string name="retry_now">Retry</string>
<string name="forward_inbox">Fwd Inbox...</string>
<string name='service_started'>New SMS will be forwarded to server</string>
<string name='test_senders'>When running KalSMS in Test Mode,
KalSMS will only forward SMS messages from the phone numbers
<string name='test_senders'>When running EnvayaSMS in Test Mode,
EnvayaSMS will only forward SMS messages from the phone numbers
listed below. (Incoming SMS messages from other phone numbers will be saved
in the normal Messaging inbox, and outgoing messages will be ignored.)</string>
</resources>

View File

@ -4,7 +4,7 @@
<CheckBoxPreference
android:key="enabled"
android:title="Enable KalSMS"
android:title="Enable EnvayaSMS"
android:defaultValue='false'
android:summaryOn="All new SMS will be forwarded between phone and server"
android:summaryOff="New SMS will not be forwarded between phone and server"
@ -57,20 +57,20 @@
<CheckBoxPreference
android:key="test_mode"
android:title="Test mode"
android:summaryOff="Test mode is off (KalSMS forwards all SMS)"
android:summaryOn="Test mode is on (KalSMS only forwards SMS to/from specific phones)"
android:summaryOff="Test mode is off (EnvayaSMS forwards all SMS)"
android:summaryOn="Test mode is on (EnvayaSMS only forwards SMS to/from specific phones)"
></CheckBoxPreference>
<PreferenceScreen
android:key="test_numbers"
android:title="Sender phones"
android:dependency="test_mode"
android:summary="Configure the phone numbers that KalSMS will handle"
android:summary="Configure the phone numbers that EnvayaSMS will handle"
>
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="org.envaya.kalsms"
android:targetClass="org.envaya.kalsms.ui.TestPhoneNumbers" />
android:targetPackage="org.envaya.sms"
android:targetClass="org.envaya.sms.ui.TestPhoneNumbers" />
</PreferenceScreen>
</PreferenceScreen>

View File

@ -1,12 +1,12 @@
<?php
/*
* PHP server library for KalSMS
* PHP server library for EnvayaSMS
*
* For example usage see example/www/index.php
*/
class KalSMS
class EnvayaSMS
{
const ACTION_INCOMING = 'incoming';
const ACTION_OUTGOING = 'outgoing';
@ -17,57 +17,67 @@ class KalSMS
const STATUS_SENT = 'sent';
const MESSAGE_TYPE_SMS = 'sms';
const MESSAGE_TYPE_MMS = 'mms';
static function new_from_request()
{
$version = @$_POST['version'];
// If API version changes, could return different KalSMS instance
// to support multiple phone versions
return new KalSMS();
}
const MESSAGE_TYPE_MMS = 'mms';
static function escape($val)
{
return htmlspecialchars($val, ENT_QUOTES, 'UTF-8');
}
}
private static $request;
static function get_request()
{
if (!isset(static::$request))
{
$version = @$_POST['version'];
// If API version changes, could return
// different EnvayaSMS_Request instance
// to support multiple phone versions
static::$request = new EnvayaSMS_Request();
}
return static::$request;
}
}
class EnvayaSMS_Request
{
private $request_action;
function get_request_action()
function get_action()
{
if (!$this->request_action)
{
$this->request_action = $this->_get_request_action();
$this->request_action = $this->_get_action();
}
return $this->request_action;
}
private function _get_request_action()
private function _get_action()
{
switch (@$_POST['action'])
{
case static::ACTION_INCOMING:
return new KalSMS_Action_Incoming($this);
case static::ACTION_OUTGOING:
return new KalSMS_Action_Outgoing($this);
case static::ACTION_SEND_STATUS:
return new KalSMS_Action_SendStatus($this);
case EnvayaSMS::ACTION_INCOMING:
return new EnvayaSMS_Action_Incoming($this);
case EnvayaSMS::ACTION_OUTGOING:
return new EnvayaSMS_Action_Outgoing($this);
case EnvayaSMS::ACTION_SEND_STATUS:
return new EnvayaSMS_Action_SendStatus($this);
default:
return new KalSMS_Action($this);
return new EnvayaSMS_Action($this);
}
}
function get_request_phone_number()
function get_phone_number()
{
return @$_POST['phone_number'];
}
function is_validated_request($correct_password)
function is_validated($correct_password)
{
$signature = @$_SERVER['HTTP_X_KALSMS_SIGNATURE'];
$signature = @$_SERVER['HTTP_X_REQUEST_SIGNATURE'];
if (!$signature)
{
return false;
@ -100,34 +110,34 @@ class KalSMS
}
}
class KalSMS_OutgoingMessage
class EnvayaSMS_OutgoingMessage
{
public $id = ''; // ID generated by server
public $to; // destination phone number
public $message; // content of SMS message
}
class KalSMS_Action
class EnvayaSMS_Action
{
public $type;
public $kalsms;
public $request;
function __construct($kalsms)
function __construct($request)
{
$this->kalsms = $kalsms;
$this->request = $request;
}
}
class KalSMS_Action_Test extends KalSMS_Action
class EnvayaSMS_Action_Test extends EnvayaSMS_Action
{
function __construct($kalsms)
function __construct($request)
{
parent::__construct($kalsms);
$this->type = KalSMS::ACTION_TEST;
parent::__construct($request);
$this->type = EnvayaSMS::ACTION_TEST;
}
}
class KalSMS_MMS_Part
class EnvayaSMS_MMS_Part
{
public $form_name; // name of form field with MMS part content
public $cid; // MMS Content-ID
@ -152,27 +162,27 @@ class KalSMS_MMS_Part
}
}
class KalSMS_Action_Incoming extends KalSMS_Action
class EnvayaSMS_Action_Incoming extends EnvayaSMS_Action
{
public $from; // Sender phone number
public $message; // The message body of the SMS, or the content of the text/plain part of the MMS.
public $message_type; // KalSMS::MESSAGE_TYPE_MMS or KalSMS::MESSAGE_TYPE_SMS
public $mms_parts; // array of KalSMS_MMS_Part instances
public $message_type; // EnvayaSMS::MESSAGE_TYPE_MMS or EnvayaSMS::MESSAGE_TYPE_SMS
public $mms_parts; // array of EnvayaSMS_MMS_Part instances
function __construct($kalsms)
function __construct($request)
{
parent::__construct($kalsms);
$this->type = KalSMS::ACTION_INCOMING;
parent::__construct($request);
$this->type = EnvayaSMS::ACTION_INCOMING;
$this->from = $_POST['from'];
$this->message = $_POST['message'];
$this->message_type = $_POST['message_type'];
if ($this->message_type == KalSMS::MESSAGE_TYPE_MMS)
if ($this->message_type == EnvayaSMS::MESSAGE_TYPE_MMS)
{
$this->mms_parts = array();
foreach (json_decode($_POST['mms_parts'], true) as $mms_part)
{
$this->mms_parts[] = new KalSMS_MMS_Part($mms_part);
$this->mms_parts[] = new EnvayaSMS_MMS_Part($mms_part);
}
}
}
@ -184,19 +194,19 @@ class KalSMS_Action_Incoming extends KalSMS_Action
echo "<messages>";
foreach ($messages as $message)
{
echo "<sms id='".KalSMS::escape($message->id)."'>".KalSMS::escape($message->message)."</sms>";
echo "<sms id='".EnvayaSMS::escape($message->id)."'>".EnvayaSMS::escape($message->message)."</sms>";
}
echo "</messages>";
return ob_get_clean();
}
}
class KalSMS_Action_Outgoing extends KalSMS_Action
class EnvayaSMS_Action_Outgoing extends EnvayaSMS_Action
{
function __construct($kalsms)
function __construct($request)
{
parent::__construct($kalsms);
$this->type = KalSMS::ACTION_OUTGOING;
parent::__construct($request);
$this->type = EnvayaSMS::ACTION_OUTGOING;
}
function get_response_xml($messages)
@ -206,22 +216,23 @@ class KalSMS_Action_Outgoing extends KalSMS_Action
echo "<messages>";
foreach ($messages as $message)
{
echo "<sms id='".KalSMS::escape($message->id)."' to='".KalSMS::escape($message->to)."'>".
KalSMS::escape($message->message)."</sms>";
echo "<sms id='".EnvayaSMS::escape($message->id)."' to='".EnvayaSMS::escape($message->to)."'>".
EnvayaSMS::escape($message->message)."</sms>";
}
echo "</messages>";
return ob_get_clean();
}
}
class KalSMS_Action_SendStatus extends KalSMS_Action
class EnvayaSMS_Action_SendStatus extends EnvayaSMS_Action
{
public $status; // KalSMS::STATUS_* values
public $id; // server ID previously used in KalSMS_OutgoingMessage
public $status; // EnvayaSMS::STATUS_* values
public $id; // server ID previously used in EnvayaSMS_OutgoingMessage
function __construct($type)
function __construct($request)
{
$this->type = KalSMS::ACTION_SEND_STATUS;
parent::__construct($request);
$this->type = EnvayaSMS::ACTION_SEND_STATUS;
$this->status = $_POST['status'];
$this->id = $_POST['id'];
}

View File

@ -1,9 +1,8 @@
PHP server library for EnvayaSMS, with example implementation
PHP server library for KalSMS, with example implementation
The KalSMS.php library is intended to be used as part of a PHP application
The EnvayaSMS.php library is intended to be used as part of a PHP application
running on an HTTP server that receives incoming SMS messages from, and sends
outgoing SMS messages to, an Android phone running KalSMS.
outgoing SMS messages to, an Android phone running EnvayaSMS.
To run the example implementation, the example/www/ directory should be made available
via a web server running PHP (e.g. Apache). You can also use the included standalone
@ -11,9 +10,9 @@ PHP web server, by running the following commands:
git submodule init
php server.php
example/config.php contains the list of phone numbers and passwords for phones running KalSMS.
example/config.php contains the list of phone numbers and passwords for phones running EnvayaSMS.
On a phone running KalSMS, go to Menu -> Settings and enter:
On a phone running EnvayaSMS, go to Menu -> Settings and enter:
* Server URL: The URL to example/www/index.php.
If you're using server.php, this will be http://<your_ip_address>:8002/
* Your phone number: One of the phone numbers listed in example/config.php
@ -22,4 +21,4 @@ On a phone running KalSMS, go to Menu -> Settings and enter:
To send an outgoing SMS, use
php example/send_sms.php
See KalSMS.php and example/www/index.php
See EnvayaSMS.php and example/www/index.php

View File

@ -3,7 +3,8 @@
/*
* Command line script to simulate sending an outgoing SMS from the server.
*
* The message will be queued on the server until the next time KalSMS checks for outgoing messages.
* The message will be queued on the server until the next time
* EnvayaSMS checks for outgoing messages.
*/
require_once __DIR__."/config.php";

View File

@ -1,20 +1,20 @@
<?php
require_once dirname(__DIR__)."/config.php";
require_once dirname(dirname(__DIR__))."/KalSMS.php";
require_once dirname(dirname(__DIR__))."/EnvayaSMS.php";
ini_set('display_errors','0');
// this example implementation uses the filesystem to store outgoing SMS messages,
// but presumably a production implementation would use another storage method
$kalsms = KalSMS::new_from_request();
$request = EnvayaSMS::get_request();
$phone_number = $kalsms->get_request_phone_number();
$phone_number = $request->get_phone_number();
$password = @$PASSWORDS[$phone_number];
if (!isset($password) || !$kalsms->is_validated_request($password))
if (!isset($password) || !$request->is_validated($password))
{
header("HTTP/1.1 403 Forbidden");
error_log("Invalid request signature");
@ -22,14 +22,14 @@ if (!isset($password) || !$kalsms->is_validated_request($password))
return;
}
$action = $kalsms->get_request_action();
$action = $request->get_action();
switch ($action->type)
{
case KalSMS::ACTION_INCOMING:
case EnvayaSMS::ACTION_INCOMING:
error_log("Received SMS from {$action->from}");
$reply = new KalSMS_OutgoingMessage();
$reply = new EnvayaSMS_OutgoingMessage();
$reply->message = "You said: {$action->message}";
error_log("Sending reply: {$reply->message}");
@ -38,7 +38,7 @@ switch ($action->type)
echo $action->get_response_xml(array($reply));
return;
case KalSMS::ACTION_OUTGOING:
case EnvayaSMS::ACTION_OUTGOING:
$messages = array();
$dir = opendir($OUTGOING_DIR_NAME);
@ -49,7 +49,7 @@ switch ($action->type)
$data = json_decode(file_get_contents("$OUTGOING_DIR_NAME/$file"), true);
if ($data && @$data['from'] == $phone_number)
{
$sms = new KalSMS_OutgoingMessage();
$sms = new EnvayaSMS_OutgoingMessage();
$sms->id = $data['id'];
$sms->to = $data['to'];
$sms->from = $data['from'];
@ -64,7 +64,7 @@ switch ($action->type)
echo $action->get_response_xml($messages);
return;
case KalSMS::ACTION_SEND_STATUS:
case EnvayaSMS::ACTION_SEND_STATUS:
$id = $action->id;

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.app.Activity;
import android.app.AlarmManager;
@ -36,9 +36,9 @@ import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.envaya.kalsms.receiver.OutgoingMessagePoller;
import org.envaya.kalsms.task.HttpTask;
import org.envaya.kalsms.task.PollerTask;
import org.envaya.sms.receiver.OutgoingMessagePoller;
import org.envaya.sms.task.HttpTask;
import org.envaya.sms.task.PollerTask;
import org.json.JSONArray;
import org.json.JSONException;
@ -55,12 +55,12 @@ public final class App extends Application {
public static final String MESSAGE_TYPE_MMS = "mms";
public static final String MESSAGE_TYPE_SMS = "sms";
public static final String LOG_NAME = "KALSMS";
public static final String LOG_NAME = "EnvayaSMS";
// intent to signal to Main activity (if open) that log has changed
public static final String LOG_INTENT = "org.envaya.kalsms.LOG";
public static final String LOG_INTENT = "org.envaya.sms.LOG";
public static final String QUERY_EXPANSION_PACKS_INTENT = "org.envaya.kalsms.QUERY_EXPANSION_PACKS";
public static final String QUERY_EXPANSION_PACKS_INTENT = "org.envaya.sms.QUERY_EXPANSION_PACKS";
public static final String QUERY_EXPANSION_PACKS_EXTRA_PACKAGES = "packages";
// Interface for sending outgoing messages to expansion packs
@ -71,15 +71,15 @@ public final class App extends Application {
// intent for MessageStatusNotifier to receive status updates for outgoing SMS
// (even if sent by an expansion pack)
public static final String MESSAGE_STATUS_INTENT = "org.envaya.kalsms.MESSAGE_STATUS";
public static final String MESSAGE_STATUS_INTENT = "org.envaya.sms.MESSAGE_STATUS";
public static final int MAX_DISPLAYED_LOG = 4000;
public static final int LOG_TIMESTAMP_INTERVAL = 60000;
// Each QueuedMessage is identified within our internal Map by its Uri.
// Currently QueuedMessage instances are only available within KalSMS,
// Currently QueuedMessage instances are only available within EnvayaSMS,
// (but they could be made available to other applications later via a ContentProvider)
public static final Uri CONTENT_URI = Uri.parse("content://org.envaya.kalsms");
public static final Uri CONTENT_URI = Uri.parse("content://org.envaya.sms");
public static final Uri INCOMING_URI = Uri.withAppendedPath(CONTENT_URI, "incoming");
public static final Uri OUTGOING_URI = Uri.withAppendedPath(CONTENT_URI, "outgoing");
@ -99,7 +99,7 @@ public final class App extends Application {
private PackageInfo packageInfo;
// list of package names (e.g. org.envaya.kalsms, or org.envaya.kalsms.packXX)
// list of package names (e.g. org.envaya.sms, or org.envaya.sms.packXX)
// for this package and all expansion packs
private List<String> outgoingMessagePackages = new ArrayList<String>();

View File

@ -13,7 +13,7 @@
//
// Please contact the author if you need another license.
// This module is provided "as is", without warranties of any kind.
package org.envaya.kalsms;
package org.envaya.sms;
/**
* A Base64 encoder/decoder.

View File

@ -1,5 +1,5 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.app.IntentService;
import android.content.Intent;
@ -39,7 +39,7 @@ public class CheckMmsInboxService extends IntentService
{
app.log("New MMS id=" + mms.getId() + " in inbox");
// prevent forwarding MMS messages that existed in inbox
// before KalSMS started, or re-forwarding MMS multiple
// before EnvayaSMS started, or re-forwarding MMS multiple
// times if we don't delete them.
mmsUtils.markOldMms(mms);

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.envaya.kalsms;
package org.envaya.sms;
import android.app.Notification;
import android.app.NotificationManager;
@ -26,7 +26,8 @@ import android.util.Log;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.envaya.kalsms.ui.Main;
import org.envaya.sms.R;
import org.envaya.sms.ui.Main;
/*
* Service running in foreground to make sure App instance stays
@ -162,7 +163,7 @@ public class ForegroundService extends Service {
new Intent(this, Main.class), 0);
notification.setLatestEventInfo(this,
"KalSMS running",
"EnvayaSMS running",
text, contentIntent);
startForegroundCompat(R.string.service_started, notification);

View File

@ -1,8 +1,8 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.content.Intent;
import android.net.Uri;
import org.envaya.kalsms.receiver.IncomingMessageRetry;
import org.envaya.sms.receiver.IncomingMessageRetry;
public abstract class IncomingMessage extends QueuedMessage {

View File

@ -1,5 +1,5 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.net.Uri;
import java.io.IOException;
@ -12,7 +12,7 @@ import org.apache.http.entity.mime.FormBodyPart;
import org.apache.http.entity.mime.content.ByteArrayBody;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.message.BasicNameValuePair;
import org.envaya.kalsms.task.ForwarderTask;
import org.envaya.sms.task.ForwarderTask;
public class IncomingMms extends IncomingMessage {
List<MmsPart> parts;

View File

@ -1,10 +1,10 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.net.Uri;
import android.telephony.SmsMessage;
import org.apache.http.message.BasicNameValuePair;
import org.envaya.kalsms.task.ForwarderTask;
import org.envaya.sms.task.ForwarderTask;
public class IncomingSms extends IncomingMessage {

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.content.Intent;
import android.database.ContentObserver;

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.net.Uri;
import java.io.File;

View File

@ -1,5 +1,5 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.content.ContentResolver;
import android.database.Cursor;
@ -146,7 +146,7 @@ public class MmsUtils
// remove id from set because Messaging app reuses ids
// of deleted messages.
// TODO: handle reuse of IDs deleted directly through Messaging
// app while KalSMS is running
// app while EnvayaSMS is running
seenMmsIds.remove(id);
}
else

View File

@ -1,7 +1,7 @@
package org.envaya.kalsms;
package org.envaya.sms;
import org.envaya.kalsms.receiver.OutgoingMessageRetry;
import org.envaya.sms.receiver.OutgoingMessageRetry;
import android.content.Intent;
import android.net.Uri;

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms;
package org.envaya.sms;
import android.app.AlarmManager;
import android.app.PendingIntent;

View File

@ -1,5 +1,5 @@
package org.envaya.kalsms.receiver;
package org.envaya.sms.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;

View File

@ -1,9 +1,9 @@
package org.envaya.kalsms.receiver;
package org.envaya.sms.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import org.envaya.kalsms.App;
import org.envaya.sms.App;
public class ExpansionPackInstallReceiver extends BroadcastReceiver
{

View File

@ -1,10 +1,10 @@
package org.envaya.kalsms.receiver;
package org.envaya.sms.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import org.envaya.kalsms.App;
import org.envaya.sms.App;
public class IncomingMessageRetry extends BroadcastReceiver
{

View File

@ -2,13 +2,13 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.envaya.kalsms.receiver;
package org.envaya.sms.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import org.envaya.kalsms.App;
import org.envaya.sms.App;
public class MessageStatusNotifier extends BroadcastReceiver {

View File

@ -1,9 +1,9 @@
package org.envaya.kalsms.receiver;
package org.envaya.sms.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import org.envaya.kalsms.App;
import org.envaya.sms.App;
public class OutgoingMessagePoller extends BroadcastReceiver {

View File

@ -1,10 +1,10 @@
package org.envaya.kalsms.receiver;
package org.envaya.sms.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import org.envaya.kalsms.App;
import org.envaya.sms.App;
public class OutgoingMessageRetry extends BroadcastReceiver
{

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms.receiver;
package org.envaya.sms.receiver;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
@ -6,7 +6,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsManager;
import org.envaya.kalsms.App;
import org.envaya.sms.App;
public class OutgoingSmsReceiver extends BroadcastReceiver {
@Override

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms.receiver;
package org.envaya.sms.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
@ -7,9 +7,9 @@ import android.os.Bundle;
import android.telephony.SmsMessage;
import java.util.ArrayList;
import java.util.List;
import org.envaya.kalsms.App;
import org.envaya.kalsms.IncomingMessage;
import org.envaya.kalsms.IncomingSms;
import org.envaya.sms.App;
import org.envaya.sms.IncomingMessage;
import org.envaya.sms.IncomingSms;
public class SmsReceiver extends BroadcastReceiver {

View File

@ -1,10 +1,10 @@
package org.envaya.kalsms.task;
package org.envaya.sms.task;
import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;
import org.envaya.kalsms.App;
import org.envaya.kalsms.IncomingMessage;
import org.envaya.kalsms.OutgoingMessage;
import org.envaya.sms.App;
import org.envaya.sms.IncomingMessage;
import org.envaya.sms.OutgoingMessage;
public class ForwarderTask extends HttpTask {

View File

@ -2,7 +2,7 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.envaya.kalsms.task;
package org.envaya.sms.task;
import android.os.AsyncTask;
import java.io.IOException;
@ -31,9 +31,9 @@ import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.envaya.kalsms.App;
import org.envaya.kalsms.Base64Coder;
import org.envaya.kalsms.OutgoingMessage;
import org.envaya.sms.App;
import org.envaya.sms.Base64Coder;
import org.envaya.sms.OutgoingMessage;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@ -136,7 +136,7 @@ public class HttpTask extends AsyncTask<String, Void, HttpResponse> {
String signature = getSignature();
post.setHeader("X-Kalsms-Signature", signature);
post.setHeader("X-Request-Signature", signature);
HttpResponse response = client.execute(post);

View File

@ -1,10 +1,10 @@
package org.envaya.kalsms.task;
package org.envaya.sms.task;
import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;
import org.envaya.kalsms.App;
import org.envaya.kalsms.OutgoingMessage;
import org.envaya.sms.App;
import org.envaya.sms.OutgoingMessage;
public class PollerTask extends HttpTask {

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms.ui;
package org.envaya.sms.ui;
// from http://www.marvinlabs.com/2010/10/custom-listview-ability-check-items/
// package fr.marvinlabs.widget;

View File

@ -1,5 +1,5 @@
package org.envaya.kalsms.ui;
package org.envaya.sms.ui;
import android.app.ListActivity;
import android.database.Cursor;
@ -9,10 +9,10 @@ import android.util.SparseBooleanArray;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import org.envaya.kalsms.App;
import org.envaya.kalsms.IncomingMessage;
import org.envaya.kalsms.IncomingSms;
import org.envaya.kalsms.R;
import org.envaya.sms.App;
import org.envaya.sms.IncomingMessage;
import org.envaya.sms.IncomingSms;
import org.envaya.sms.R;
public class ForwardInbox extends ListActivity {

View File

@ -1,11 +1,11 @@
package org.envaya.kalsms.ui;
package org.envaya.sms.ui;
import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;
import org.envaya.kalsms.App;
import org.envaya.kalsms.R;
import org.envaya.sms.App;
import org.envaya.sms.R;
public class Help extends Activity {
@ -19,12 +19,12 @@ public class Help extends Activity {
App app = (App)getApplication();
String html = "<b>KalSMS " + app.getPackageInfo().versionName + "</b><br /><br />"
+ "KalSMS is a SMS gateway.<br /><br /> "
String html = "<b>EnvayaSMS " + app.getPackageInfo().versionName + "</b><br /><br />"
+ "EnvayaSMS is a SMS gateway.<br /><br /> "
+ "It forwards all incoming SMS messages received by this phone to a server on the internet, "
+ "and also sends outgoing SMS messages from that server to other phones.<br /><br />"
+ "(See https://kalsms.net for more information.)<br /><br />"
+ "The Settings screen allows you configure KalSMS to work with a particular server, "
+ "The Settings screen allows you configure EnvayaSMS to work with a particular server, "
+ "by entering the server URL, your phone number, "
+ "and the password assigned to your phone on the server.<br /><br />"
+ "Menu icons cc/by www.androidicons.com<br /><br />";

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms.ui;
package org.envaya.sms.ui;
// from http://www.marvinlabs.com/2010/10/custom-listview-ability-check-items/
// package fr.marvinlabs.widget;

View File

@ -1,6 +1,6 @@
package org.envaya.kalsms.ui;
package org.envaya.sms.ui;
import org.envaya.kalsms.task.HttpTask;
import org.envaya.sms.task.HttpTask;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
@ -18,10 +18,10 @@ import android.widget.TextView;
import java.util.List;
import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;
import org.envaya.kalsms.App;
import org.envaya.kalsms.IncomingMms;
import org.envaya.kalsms.MmsUtils;
import org.envaya.kalsms.R;
import org.envaya.sms.App;
import org.envaya.sms.IncomingMms;
import org.envaya.sms.MmsUtils;
import org.envaya.sms.R;
public class Main extends Activity {

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms.ui;
package org.envaya.sms.ui;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
@ -11,8 +11,8 @@ import android.preference.PreferenceScreen;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.view.Menu;
import org.envaya.kalsms.App;
import org.envaya.kalsms.R;
import org.envaya.sms.App;
import org.envaya.sms.R;
public class Prefs extends PreferenceActivity implements OnSharedPreferenceChangeListener {

View File

@ -1,4 +1,4 @@
package org.envaya.kalsms.ui;
package org.envaya.sms.ui;
import android.app.AlertDialog;
import android.app.ListActivity;
@ -13,8 +13,8 @@ import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import org.envaya.kalsms.App;
import org.envaya.kalsms.R;
import org.envaya.sms.App;
import org.envaya.sms.R;
public class TestPhoneNumbers extends ListActivity {