mirror of
https://github.com/cwinfo/envayasms.git
synced 2025-07-04 05:57:44 +00:00
rename to EnvayaSMS; add icon
This commit is contained in:
@ -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>();
|
||||
|
@ -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.
|
@ -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);
|
||||
|
@ -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);
|
@ -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 {
|
||||
|
@ -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;
|
@ -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 {
|
@ -1,4 +1,4 @@
|
||||
package org.envaya.kalsms;
|
||||
package org.envaya.sms;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.database.ContentObserver;
|
@ -1,4 +1,4 @@
|
||||
package org.envaya.kalsms;
|
||||
package org.envaya.sms;
|
||||
|
||||
import android.net.Uri;
|
||||
import java.io.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
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.envaya.kalsms;
|
||||
package org.envaya.sms;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.PendingIntent;
|
@ -1,5 +1,5 @@
|
||||
|
||||
package org.envaya.kalsms.receiver;
|
||||
package org.envaya.sms.receiver;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
@ -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
|
||||
{
|
@ -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
|
||||
{
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
{
|
@ -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
|
@ -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 {
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
@ -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 {
|
@ -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 />";
|
@ -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;
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user