2022-03-14 11:53:00 +02:00
|
|
|
package com.safemobile.lib;
|
|
|
|
|
|
|
|
import java.nio.ByteBuffer;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Hashtable;
|
|
|
|
|
|
|
|
import com.safemobile.lib.radio.Channel;
|
|
|
|
import com.safemobile.lib.radio.Emerg;
|
|
|
|
import com.safemobile.lib.radio.IncCall;
|
|
|
|
import com.safemobile.lib.radio.RadioGW;
|
|
|
|
import com.safemobile.lib.radio.RadioStatus;
|
|
|
|
import com.safemobile.lib.radio.Zone;
|
|
|
|
import com.safemobile.lib.radio.Zone_and_channel;
|
|
|
|
import com.safemobile.libpad.PadRecording;
|
|
|
|
import com.safemobile.libpad.PadTextMessage;
|
|
|
|
|
|
|
|
import android.content.SharedPreferences;
|
|
|
|
|
|
|
|
|
|
|
|
public class AppParams {
|
|
|
|
|
|
|
|
public enum EnumCallState {hangTime, callEnd, online, offline, callReceived, callMade };
|
|
|
|
public enum Dialogs {motionless, mandown, firmware, password};
|
|
|
|
public enum Tabs {live, history, radio, message, alarms, recordings, setup};
|
|
|
|
public enum Theme {SAFENET, SAFEDISPATCH, HYTERA, VISION}
|
|
|
|
public enum ActivityResult { logout, restart, exit, tcpDown};
|
|
|
|
|
|
|
|
/* SafeMobile Dispatch */
|
|
|
|
public static ArrayList<User> allUsers = new ArrayList<User>();
|
2022-03-24 12:16:30 +02:00
|
|
|
public static Theme theme = Theme.SAFEDISPATCH; // the Theme type
|
2022-03-14 11:53:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* ***************************************** */
|
|
|
|
/* ********** Radio Status Params ********** */
|
|
|
|
/* ***************************************** */
|
|
|
|
public static RadioStatus crtRadioStatus = new RadioStatus();
|
|
|
|
public static Zone_and_channel crtZoneAndChannel = new Zone_and_channel();
|
|
|
|
public static Emerg crtEmergencyState = new Emerg();
|
|
|
|
public static IncCall crtIncCall = new IncCall();
|
|
|
|
public static PadRecording crtPlayingRecording = new PadRecording();
|
|
|
|
public static ByteBuffer recordingBuffer = null;
|
|
|
|
//public static ArrayList<PadTextMessage> listTextMessages = new ArrayList<PadTextMessage>();
|
|
|
|
public static Hashtable<String, PadTextMessage> hashNotAckMsg = new Hashtable<String, PadTextMessage>();
|
|
|
|
|
|
|
|
// the text message hash table will have the first key the radioID, and the second key the textMessage DB ID
|
|
|
|
public static Hashtable<Long, Hashtable<Long, PadTextMessage>> hashTextMessagesByRadioID = new Hashtable<Long, Hashtable<Long, PadTextMessage>>();
|
|
|
|
|
|
|
|
//public static ArrayList<PadRecording> listRecordings = new ArrayList<PadRecording>();
|
|
|
|
public static Hashtable<Integer, PadRecording> listRecordings = new Hashtable<Integer, PadRecording>();
|
|
|
|
public static ArrayList<Recording> recordings = new ArrayList<Recording>();
|
|
|
|
public static ArrayList<Contact> listContacts = new ArrayList<Contact>();
|
|
|
|
public static ArrayList<Zone> listZones = new ArrayList<Zone>();
|
|
|
|
public static ArrayList<RadioGW> listRadios = new ArrayList<RadioGW>();
|
|
|
|
public static Radio crtRadio = new Radio();
|
|
|
|
public static Zone crtZone = new Zone();
|
|
|
|
public static Channel crtChannel;
|
|
|
|
|
|
|
|
public static PadTextMessage crtSentTextMessage = new PadTextMessage();
|
|
|
|
public static PadTextMessage crtAckedTextMessage = new PadTextMessage();
|
|
|
|
public static PadTextMessage crtReceivedTextMessage = new PadTextMessage();
|
|
|
|
|
|
|
|
public static Contact crtContact = new Contact();
|
|
|
|
public static Contact crtTetraContact = new Contact();
|
|
|
|
public static Contact crtTetraGroup = new Contact();
|
|
|
|
public static PadRecording crtRecording = new PadRecording();
|
|
|
|
|
|
|
|
|
|
|
|
public static final int TRBOO = 1, TETRA = 2, SEPURAA = 3;
|
|
|
|
public static final int NOT_ACK = 1;
|
|
|
|
public static final int ACK = 2;
|
|
|
|
public static int APPLICATION_TYPE = TRBOO; // WILL BE MODIFIED AT CONNECTION
|
|
|
|
public static final String FIRMWARE_VERSION = "2.3.1";
|
|
|
|
|
|
|
|
public static boolean DEMO = false; // DEMO is set by package name (contains OR !contains "demo")
|
|
|
|
|
|
|
|
/** Safenet Login */
|
|
|
|
public static long USERID = -1;
|
|
|
|
public static String USERNAME = "";
|
|
|
|
public static String PASSWORD = "";
|
|
|
|
public static boolean REMEMBER = false;
|
|
|
|
public static String DEFAULT = "";
|
|
|
|
|
|
|
|
//private String[] Types = {"AIR", "RADIOPAD", "MOTOPAD-TRBO", "MOTOPAD-TETRA"};
|
|
|
|
public static String TYPE = "RADIOPAD"; // blue or red version (SafeMobile or AIR version)
|
|
|
|
//public static boolean AIR = false; // blue or red version (SafeMobile or AIR version)
|
|
|
|
public static boolean TABLET = false; // flag if device is a TABLET or PHONE (inconsistent - 06.Nov.2012)
|
|
|
|
public static boolean PAUSED = false; // application status: PAUSED or RUNNING
|
|
|
|
|
|
|
|
public static boolean SEPURA = false;
|
|
|
|
public static boolean PRINTER = false;
|
|
|
|
|
|
|
|
public static int UPDATE_SIZE = 20;
|
|
|
|
|
|
|
|
public static String Database = ""; //"de"; // database language
|
|
|
|
public static boolean online = false;
|
|
|
|
|
|
|
|
/** Tabs */
|
|
|
|
public static Tabs crtTab = Tabs.radio;
|
|
|
|
|
|
|
|
public static int CallState = 3; // tablet state: 7 - Hangtime, 3 - Ended, Other - inCall
|
|
|
|
public static long CallSourId = -1;
|
|
|
|
public static long CallDestId = -1;
|
|
|
|
public static int CallType = 101;
|
|
|
|
public static long selCallId = -1;
|
|
|
|
public static int selCallType = 101;
|
|
|
|
public static long CallStartTime = -1;
|
|
|
|
public static int prevCallState = 4;
|
|
|
|
public static boolean inCall = false;
|
|
|
|
public static boolean externalSource = false;
|
|
|
|
|
|
|
|
/** Configuration File */
|
|
|
|
//public static ConfigFile configFile = null; // config file
|
|
|
|
|
|
|
|
/** Database */
|
|
|
|
//public static DatabaseCommunication databaseCommunication = null;
|
|
|
|
|
|
|
|
/** SharedPreferences */
|
|
|
|
public static SharedPreferences prefs; // project preferences
|
|
|
|
public static String LANGUAGE; // displaying language
|
|
|
|
public static String LANGUAGETMP = "en"; // temporary displayed language
|
|
|
|
public static String STREAM = "MUSIC"; // AudioHandler's AudioTrack default stream
|
|
|
|
public static String SOURCE = "TCP"; // AudioHandler's AudioTrack default source
|
|
|
|
public static boolean EXTERNALMIC = false; // external mic used with what-a-pair systems
|
|
|
|
public static boolean TETHERSOUND = false; // allow BlueTooth tethering
|
|
|
|
public static boolean TRBO = true;
|
|
|
|
public static boolean NOTIFICATIONS = true;
|
|
|
|
public static boolean RECORDINGS = true;
|
|
|
|
public static String RECORDINGS_LOCATION = "Internal Storage";
|
|
|
|
public static boolean MANDOWN = false;
|
|
|
|
public static int MANDOWNTHRESHOLD = 25;
|
|
|
|
public static boolean MOTIONLESS = false;
|
|
|
|
public static int MOTIONLESSTIME = 300;
|
|
|
|
public static int RADIOID = 100;
|
|
|
|
public static String RADIOIP = "192.168.10.40";
|
|
|
|
public static String IP="n/a"; // SafeBridge's IP
|
|
|
|
public static String PORT="13570"; // SafeBridge's PORT
|
|
|
|
public static String PATH = "n/a"; // ConfigFile PATH
|
|
|
|
|
|
|
|
/** BluComm
|
|
|
|
* states : 0 - disconnected; 1 - connected but not pressed; 2 - pressed; */
|
|
|
|
public static int BluCommState = 0; // remembers BluComm Microphone state
|
|
|
|
public static final int PTTON = 1;
|
|
|
|
public static final int PTTOFF = 0;
|
|
|
|
|
|
|
|
/** Call Types */
|
|
|
|
public static final int AllCall = 101;
|
|
|
|
public static final int PrivateCall = 102;
|
|
|
|
public static final int GroupCall = 103;
|
|
|
|
public static final int EndAllCall = AllCall+10;
|
|
|
|
public static final int EndPrivateCall = PrivateCall+10;
|
|
|
|
public static final int EndGroupCall = GroupCall+10;
|
|
|
|
public static final int PTTBUTTON = 999;
|
|
|
|
public static final int VOXON = 555;
|
|
|
|
public static final int VOXOFF = 000;
|
|
|
|
|
|
|
|
/* Old Values
|
|
|
|
public static final int Decoded = 1;
|
|
|
|
public static final int InProgress = 2;
|
|
|
|
public static final int Initiated = 4;
|
|
|
|
public static final int Hangtime = 7;
|
|
|
|
public static final int Ended = 3;
|
|
|
|
public static final int InitButton = 5;
|
|
|
|
public static final int MotoPrivate = 4;
|
|
|
|
public static final int MotoGroup = 6;
|
|
|
|
public static final int MotoAllCall = 16777215;
|
|
|
|
//*/
|
|
|
|
|
|
|
|
//* New Values
|
|
|
|
public static final int Initiated = 0;
|
|
|
|
public static final int Decoded = 1;
|
|
|
|
public static final int InProgress = 2;
|
|
|
|
public static final int Hangtime = 3;
|
|
|
|
public static final int Ended = 4;
|
|
|
|
public static final int InitEnded = 5;
|
|
|
|
public static final int InitHangtime = 6;
|
|
|
|
public static final int MotoPrivate = 1;
|
|
|
|
public static final int MotoGroup = 2;
|
|
|
|
public static final int MotoAllCall = 3;
|
|
|
|
public static final int MotoManualDial = 4;
|
|
|
|
//*/
|
|
|
|
|
|
|
|
|
|
|
|
/** BlueTooth Headset MAC */
|
|
|
|
public static String BluCom = "00:15:45:";
|
|
|
|
/*
|
|
|
|
public static String MotorolaH730 = "00:24:1C:";
|
|
|
|
public static String SamsungWep460 = "18:46:17:";
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** Notification values */
|
|
|
|
public static final int messageNotif = 1;
|
|
|
|
public static final int alertNotif = 2;
|
|
|
|
public static final int pollNotif = 3;
|
|
|
|
}
|