2012-08-03 Mark Holland <mark@mark-holland.me.uk>
* res/layout/password_entry.xml: UI tweaks * res/layout/setup.xml: Added mobile console textview and button * res/layout/setupnosim.xml: Added mobile console textview and button * res/layout/status.xml: Added roaming view * res/values/strings.xml: string for roaming, roaming report, mobile site * src/pandroid/agent/core.java: Added variables for roaming and mobile site url * src/pandroid/agent/PandroidAgentListener.java: Added roaming report method and variables then add to xml * src/pandroid/agent/setup.java: Added mobile site view and full screen password input * src/pandroid/agent/status.java: Added roaming view git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6843 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0c685638d4
commit
b342dbc978
|
@ -66,6 +66,7 @@
|
|||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||
<uses-permission android:name="android.permission.READ_SMS"/>
|
||||
|
||||
|
||||
<uses-feature android:name="android.hardware.sensor.light" />
|
||||
<uses-feature android:name="android.hardware.location" />
|
||||
|
||||
|
|
|
@ -1,4 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="pandroid.agent"
|
||||
android:versionCode="2"
|
||||
|
@ -51,6 +66,7 @@
|
|||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||
<uses-permission android:name="android.permission.READ_SMS"/>
|
||||
|
||||
|
||||
<uses-feature android:name="android.hardware.sensor.light" />
|
||||
<uses-feature android:name="android.hardware.location" />
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<RelativeLayout
|
||||
|
|
|
@ -25,12 +25,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="85dp"
|
||||
android:ems="10"
|
||||
android:inputType="textPassword" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
android:inputType="textPassword" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/password_back_button"
|
||||
|
@ -38,8 +35,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignRight="@+id/password_entry_input"
|
||||
android:layout_below="@+id/password_entry_input"
|
||||
android:layout_marginRight="38dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginTop="29dp"
|
||||
android:text="@string/back" />
|
||||
|
||||
<Button
|
||||
|
@ -49,7 +45,16 @@
|
|||
android:layout_alignBaseline="@+id/password_back_button"
|
||||
android:layout_alignBottom="@+id/password_back_button"
|
||||
android:layout_alignLeft="@+id/password_entry_input"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:text="@string/enter" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="36dp"
|
||||
android:text="@string/alert_dialog_password"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
|
@ -12,273 +12,284 @@
|
|||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
-->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/field1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/serverAddr"
|
||||
android:paddingTop="5dp"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/serverAddrInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/field2"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/serverPort"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/serverPortInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/field3"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/interval"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/intervalInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/field4"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/agent"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/agentNameInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkGpsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/gpsReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkBatteryLevelReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/BatteryLevelReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkTaskReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/taskReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkMemoryReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/memoryReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkSimIDReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/simIDReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkDeviceUpTimeReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uptimeReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkNetworkOperatorReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/NetworkOperatorReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkNetworkTypeReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/NetworkTypeReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkPhoneTypeReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/PhoneTypeReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkSignalStrengthReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/SignalStrengthReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkReceivedSMSReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ReceivedSMSReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkSentSMSReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/SentSMSReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkIncomingCallsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/IncomingCallsReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkMissedCallsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/MissedCallsReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkOutgoingCallsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/OutgoingCallsReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkBytesReceivedReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/BytesReceivedReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkBytesSentReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/BytesSentReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkHelloSignalReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/HelloSignalReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field5"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/task"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<ProgressBar
|
||||
android:id="@+id/loading_task_anim"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<Spinner
|
||||
android:id="@+id/processes_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/set_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_password"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/update"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/update"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
// GNU General Public License for more details.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setup"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/serverAddr" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/serverAddrInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field2"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/serverPort" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/serverPortInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field3"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/interval" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/intervalInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field4"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/agent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/agentNameInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field5"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/webname" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/webNameInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/goToWebButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/go_to_web" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkGpsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/gpsReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBatteryLevelReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/BatteryLevelReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkTaskReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/taskReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkMemoryReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/memoryReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkSimIDReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/simIDReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkDeviceUpTimeReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uptimeReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkNetworkOperatorReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/NetworkOperatorReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkNetworkTypeReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/NetworkTypeReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkPhoneTypeReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/PhoneTypeReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkSignalStrengthReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/SignalStrengthReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkReceivedSMSReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ReceivedSMSReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkSentSMSReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/SentSMSReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkIncomingCallsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/IncomingCallsReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkMissedCallsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/MissedCallsReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkOutgoingCallsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/OutgoingCallsReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBytesReceivedReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/BytesReceivedReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBytesSentReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/BytesSentReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkHelloSignalReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/HelloSignalReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkRoamingReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/RoamingReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field5"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/task" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading_task_anim"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/processes_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/set_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_password" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/update"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/update" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -12,166 +12,180 @@
|
|||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// GNU General Public License for more details.
|
||||
-->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/field1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/serverAddr"
|
||||
android:paddingTop="5dp"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/serverAddrInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/field2"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/serverPort"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/serverPortInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/field3"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/interval"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/intervalInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/field4"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/agent"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/agentNameInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/setupnosim"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkGpsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/gpsReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkBatteryLevelReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/BatteryLevelReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkMemoryReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/memoryReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkTaskReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/taskReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkDeviceUpTimeReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uptimeReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkHelloSignalReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/HelloSignalReport"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#bbbbbb"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field5"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/task"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<ProgressBar
|
||||
android:id="@+id/loading_task_anim"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<Spinner
|
||||
android:id="@+id/processes_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/set_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_password"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/update"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/update"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/serverAddr" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/serverAddrInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field2"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/serverPort" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/serverPortInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field3"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/interval" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/intervalInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field4"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/agent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/agentNameInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field5"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/webname" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/webNameInput"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/goToWebButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/go_to_web" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkGpsReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/gpsReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBatteryLevelReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/BatteryLevelReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkMemoryReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/memoryReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkTaskReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/taskReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkDeviceUpTimeReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uptimeReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkHelloSignalReport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/HelloSignalReport"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14dip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/field5"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/task" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading_task_anim"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/processes_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/set_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_password" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/update"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/update" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -468,6 +468,28 @@
|
|||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/roaming"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/roaming"
|
||||
android:textSize="14dip"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/roaming_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
|
||||
|
||||
|
|
|
@ -104,5 +104,10 @@
|
|||
<string name="password">password</string>
|
||||
<string name="password_length">password must be longer than 6 characters!</string>
|
||||
<string name="password_incorrect">Wrong password!</string>
|
||||
<string name="roaming">Roaming:</string>
|
||||
<string name="roaming_value"/>
|
||||
<string name="RoamingReport">Report if Roaming</string>
|
||||
<string name="webname">Mobile server url:</string>
|
||||
<string name="go_to_web">View Mobile site</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<string name="network_type_value"/>
|
||||
<string name="phone_type">Tipo movil:</string>
|
||||
<string name="phone_type_value"/>
|
||||
<string name="signal_strength">Potencia senyal:</string>
|
||||
<string name="signal_strength">Potencia señal:</string>
|
||||
<string name="signal_strength_value"/>
|
||||
<string name="incoming_Calls">Llamadas recibidas:</string>
|
||||
<string name="incoming_Calls_value"/>
|
||||
|
@ -94,20 +94,20 @@
|
|||
<string name="receive_bytes_value"/>
|
||||
<string name="transmit_bytes">Bytes transmitidos:</string>
|
||||
<string name="transmit_bytes_value"/>
|
||||
<string name="alert_dialog_password">Introducir contrasenya</string>
|
||||
<string name="password_no_match">Las contrasenyas son diferentes!</string>
|
||||
<string name="alert_dialog_password">Introducir contraseña</string>
|
||||
<string name="password_no_match">Las contraseñas son diferentes!</string>
|
||||
<string name="password_error">error</string>
|
||||
<string name="password">contrasenya</string>
|
||||
<string name="password_length">La contrasenya debe contener mas de 6 caracteres!</string>
|
||||
<string name="password_incorrect">Contrasenya incorrecta</string>
|
||||
<string name="password_set">Crear contrasenya</string>
|
||||
<string name="password_enter">Introducir contrasenya</string>
|
||||
<string name="password_repeat">Repetir contrasenya</string>
|
||||
<string name="password_choose_text">Quieres poner una contrasenya?</string>
|
||||
<string name="password">contraseña</string>
|
||||
<string name="password_length">La contraseña debe contener mas de 6 caracteres!</string>
|
||||
<string name="password_incorrect">Contraseña incorrecta</string>
|
||||
<string name="password_set">Crear contraseña</string>
|
||||
<string name="password_enter">Introducir contraseña</string>
|
||||
<string name="password_repeat">Repetir contraseña</string>
|
||||
<string name="password_choose_text">Quieres poner una contraseña?</string>
|
||||
<string name="password_checkbox">No vuelkves a preguntar</string>
|
||||
<string name="password_created">Contrasenya creada</string>
|
||||
<string name="password_removed">Sin contrasenya</string>
|
||||
<string name="set_password">Crear/Cambiar contrasenya</string>
|
||||
<string name="password_created">Contraseña creada</string>
|
||||
<string name="password_removed">Sin contraseña</string>
|
||||
<string name="set_password">Crear/Cambiar contraseña</string>
|
||||
<string name="enter">Intro</string>
|
||||
<string name="back">Volver</string>
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
|||
<string name="NetworkOperatorReport">Reporta operador de red</string>
|
||||
<string name="NetworkTypeReport">Reporta tipo de red</string>
|
||||
<string name="PhoneTypeReport">Reporta tipo de movil</string>
|
||||
<string name="SignalStrengthReport">Reporta potencia de senyal</string>
|
||||
<string name="SignalStrengthReport">Reporta potencia de señal</string>
|
||||
<string name="ReceivedSMSReport">Reporta numero de SMS recibido</string>
|
||||
<string name="SentSMSReport">Reporta numero de SMS enviado</string>
|
||||
<string name="IncomingCallsReport">Reporta numero de llamadas recibidas</string>
|
||||
|
@ -127,6 +127,6 @@
|
|||
<string name="OutgoingCallsReport">Reporta numero de llamadas salientes</string>
|
||||
<string name="BytesReceivedReport">Reporta bytes recibidos</string>
|
||||
<string name="BytesSentReport">Reporta bytes enviados</string>
|
||||
<string name="HelloSignalReport">Reporta senyal de saludo</string>
|
||||
<string name="HelloSignalReport">Reporta señal de saludo</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -119,6 +119,10 @@
|
|||
<string name="back">back</string>
|
||||
<string name="yes">yes</string>
|
||||
<string name="no">no</string>
|
||||
<string name="roaming_value"/>
|
||||
<string name="roaming">Roaming:</string>
|
||||
<string name="webname">Mobile server url:</string>
|
||||
<string name="go_to_web">View Mobile site</string>
|
||||
|
||||
<string name="uptimeReport">Report device up time</string>
|
||||
<string name="NetworkOperatorReport">Report network operator</string>
|
||||
|
@ -134,7 +138,7 @@
|
|||
<string name="BytesSentReport">Report amount of sent mobile data</string>
|
||||
<string name="HelloSignalReport">Report Hello Signal</string>
|
||||
<string name="BatteryLevelReport">Report battery level</string>
|
||||
|
||||
<string name="RoamingReport">Report if roaming</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -46,6 +46,7 @@ public class Core {
|
|||
static volatile public String defaultServerPort = "41121";
|
||||
static volatile public int defaultInterval = 300;
|
||||
static volatile public String defaultAgentName = "pandroid";
|
||||
static volatile public String defaultWebName = "firefly.artica.es/pandora_console/mobile";
|
||||
static volatile public String defaultGpsStatus = "enabled"; // "disabled" or "enabled"
|
||||
static volatile public String defaultBatteryLevelReport = "enabled"; // "disabled" or "enabled"
|
||||
static volatile public String defaultMemoryStatus = "enabled"; // "disabled" or "enabled"
|
||||
|
@ -65,6 +66,7 @@ public class Core {
|
|||
static volatile public String defaultBytesReceivedReport = "enabled"; // "disabled" or "enabled"
|
||||
static volatile public String defaultBytesSentReport = "enabled"; // "disabled" or "enabled"
|
||||
static volatile public String defaultHelloSignalReport = "enabled"; // "disabled" or "enabled"
|
||||
static volatile public String defaultRoamingReport = "enabled"; // "disabled" or "enabled"
|
||||
|
||||
static volatile public boolean defaultHasSim = false;
|
||||
|
||||
|
@ -92,7 +94,7 @@ public class Core {
|
|||
static volatile public long defaultReceiveBytes = 0;
|
||||
static volatile public long defaultTransmitBytes = 0;
|
||||
static volatile public int defaultHelloSignal = 2;
|
||||
|
||||
static volatile public int defaultRoaming = 0;
|
||||
|
||||
//Temporary
|
||||
static volatile public String defaultPassword = "";
|
||||
|
@ -110,7 +112,8 @@ public class Core {
|
|||
static volatile public String serverAddr = defaultServerAddr;
|
||||
static volatile public String serverPort = defaultServerPort;
|
||||
static volatile public int interval = defaultInterval;
|
||||
static volatile public String agentName = defaultAgentName;
|
||||
static volatile public String agentName = defaultWebName;
|
||||
static volatile public String webName = defaultAgentName;
|
||||
static volatile public String gpsStatus = defaultGpsStatus;
|
||||
static volatile public String memoryStatus = defaultMemoryStatus;
|
||||
static volatile public String taskStatus = defaultTaskStatus;
|
||||
|
@ -132,6 +135,8 @@ public class Core {
|
|||
static volatile public String BytesSentReport = defaultBytesSentReport;
|
||||
static volatile public String HelloSignalReport = defaultHelloSignalReport;
|
||||
static volatile public String BatteryLevelReport = defaultHelloSignalReport;
|
||||
static volatile public String RoamingReport = defaultRoamingReport;
|
||||
|
||||
static volatile public boolean hasSim = defaultHasSim;
|
||||
|
||||
//temporary
|
||||
|
@ -163,6 +168,7 @@ public class Core {
|
|||
static volatile public long receiveBytes = defaultReceiveBytes;
|
||||
static volatile public long transmitBytes = defaultTransmitBytes;
|
||||
static volatile public int helloSignal = defaultHelloSignal;
|
||||
static volatile public int roaming = defaultRoaming;
|
||||
|
||||
static volatile public long lastContact = CONST_INVALID_CONTACT;
|
||||
static volatile public int contactError = CONST_CONTACT_ERROR;
|
||||
|
@ -244,7 +250,7 @@ public class Core {
|
|||
receiveBytes = agentPreferences.getLong("receiveBytes", defaultReceiveBytes);
|
||||
transmitBytes = agentPreferences.getLong("transmitBytes", defaultTransmitBytes);
|
||||
helloSignal = agentPreferences.getInt("helloSignal", defaultHelloSignal);
|
||||
|
||||
roaming = agentPreferences.getInt("roaming", defaultRoaming);
|
||||
|
||||
}// end loadLastValues
|
||||
|
||||
|
@ -262,6 +268,7 @@ public class Core {
|
|||
interval = agentPreferences.getInt("interval", defaultInterval);
|
||||
//fix agent name to mark
|
||||
agentName = agentPreferences.getString("agentName", defaultAgentName+"_"+Installation.id(context));
|
||||
webName = agentPreferences.getString("webName", defaultWebName);
|
||||
gpsStatus = agentPreferences.getString("gpsStatus", defaultGpsStatus);
|
||||
memoryStatus = agentPreferences.getString("memoryStatus", defaultMemoryStatus);
|
||||
taskStatus = agentPreferences.getString("taskStatus", defaultTaskStatus);
|
||||
|
@ -285,7 +292,7 @@ public class Core {
|
|||
BytesSentReport = agentPreferences.getString("BytesSentReport", defaultBytesSentReport);
|
||||
HelloSignalReport = agentPreferences.getString("HelloSignalReport", defaultHelloSignalReport);
|
||||
BatteryLevelReport = agentPreferences.getString("BatteryLevelReport", defaultBatteryLevelReport);
|
||||
|
||||
RoamingReport = agentPreferences.getString("RoamingReport", defaultRoamingReport);
|
||||
|
||||
}// end loadConf
|
||||
|
||||
|
@ -296,7 +303,8 @@ public class Core {
|
|||
incomingCalls, missedCalls, outgoingCalls, receiveBytes, transmitBytes, password, helloSignal,
|
||||
passwordCheck, DeviceUpTimeReport, NetworkOperatorReport, NetworkTypeReport, PhoneTypeReport,
|
||||
SignalStrengthReport, ReceivedSMSReport, SentSMSReport, IncomingCallsReport, MissedCallsReport,
|
||||
OutgoingCallsReport, BytesReceivedReport, BytesSentReport, HelloSignalReport, BatteryLevelReport
|
||||
OutgoingCallsReport, BytesReceivedReport, BytesSentReport, HelloSignalReport, BatteryLevelReport,
|
||||
RoamingReport, roaming, webName
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -309,7 +317,7 @@ public class Core {
|
|||
String _password, int _helloSignal, String _passwordCheck, String _DeviceUpTimeReport, String _NetworkOperatorReport,
|
||||
String _NetworkTypeReport, String _PhoneTypeReport, String _SignalStrengthReport, String _ReceivedSMSReport,
|
||||
String _SentSMSReport, String _IncomingCallsReport, String _MissedCallsReport, String _OutgoingCallsReport, String _BytesReceivedReport,
|
||||
String _BytesSentReport, String _HelloSignalReport, String _BatteryLevelReport) {
|
||||
String _BytesSentReport, String _HelloSignalReport, String _BatteryLevelReport, String _RoamingReport, int _roaming, String _webName) {
|
||||
|
||||
if (con == null) {
|
||||
con = context;
|
||||
|
@ -346,6 +354,7 @@ public class Core {
|
|||
editor.putString("password", _password);
|
||||
editor.putString("passwordCheck", _passwordCheck);
|
||||
editor.putInt("helloSignal", _helloSignal);
|
||||
editor.putInt("roaming", _roaming);
|
||||
editor.putString("DeviceUpTimeReport", _DeviceUpTimeReport);
|
||||
editor.putString("NetworkOperatorReport", _NetworkOperatorReport);
|
||||
editor.putString("NetworkTypeReport", _NetworkTypeReport);
|
||||
|
@ -360,6 +369,9 @@ public class Core {
|
|||
editor.putString("BytesSentReport", _BytesSentReport);
|
||||
editor.putString("HelloSignalReport", _HelloSignalReport);
|
||||
editor.putString("BatteryLevelReport", _BatteryLevelReport);
|
||||
editor.putString("RoamingReport", _RoamingReport);
|
||||
editor.putString("webName", _webName);
|
||||
|
||||
if (editor.commit()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ package pandroid.agent;
|
|||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
//import android.util.Log;
|
||||
|
||||
public class EventReceiver extends BroadcastReceiver {
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ import android.os.SystemClock;
|
|||
import android.telephony.PhoneStateListener;
|
||||
import android.telephony.SignalStrength;
|
||||
import android.telephony.TelephonyManager;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
public class PandroidAgentListener extends Service {
|
||||
|
@ -191,6 +190,8 @@ public class PandroidAgentListener extends Service {
|
|||
String receiveBytes = getSharedData("PANDROID_DATA", "receiveBytes", ""+Core.defaultReceiveBytes, "long");
|
||||
String transmitBytes = getSharedData("PANDROID_DATA", "transmitBytes", ""+Core.defaultTransmitBytes, "long");
|
||||
String helloSignal = getSharedData("PANDROID_DATA", "helloSignal", ""+Core.defaultHelloSignal, "integer");
|
||||
String roaming = getSharedData("PANDROID_DATA", "roaming", ""+Core.defaultRoaming, "integer");
|
||||
|
||||
String SimIDReport = getSharedData("PANDROID_DATA", "SimIDReport", Core.defaultSimIDReport, "string");
|
||||
String DeviceUpTimeReport = getSharedData("PANDROID_DATA", "DeviceUpTimeReport", Core.defaultDeviceUpTimeReport, "string");
|
||||
String NetworkOperatorReport = getSharedData("PANDROID_DATA", "NetworkOperatorReport", Core.defaultNetworkOperatorReport, "string");
|
||||
|
@ -206,6 +207,7 @@ public class PandroidAgentListener extends Service {
|
|||
String BytesSentReport = getSharedData("PANDROID_DATA", "BytesSentReport", Core.defaultBytesSentReport, "string");
|
||||
String HelloSignalReport = getSharedData("PANDROID_DATA", "HelloSignalReport", Core.defaultHelloSignalReport, "string");
|
||||
String BatteryLevelReport = getSharedData("PANDROID_DATA", "BatteryLevelReport", Core.defaultBatteryLevelReport, "string");
|
||||
String RoamingReport = getSharedData("PANDROID_DATA", "RoamingReport", Core.defaultRoamingReport, "string");
|
||||
|
||||
if (BatteryLevelReport.equals("enabled"))
|
||||
buffer += buildmoduleXML("battery_level", "The current Battery level", "generic_data", batteryLevel);
|
||||
|
@ -267,6 +269,8 @@ public class PandroidAgentListener extends Service {
|
|||
buffer += buildmoduleXML("receiveBytes","Bytes received(mobile)", "generic_data", receiveBytes);
|
||||
if (BytesSentReport.equals("enabled"))
|
||||
buffer += buildmoduleXML("transmitBytes","Bytes transmitted(mobile)", "generic_data", transmitBytes);
|
||||
if (RoamingReport.equals("enabled"))
|
||||
buffer += buildmoduleXML("roaming","Device is roaming", "generic_data", roaming);
|
||||
}// end if sim card
|
||||
if (HelloSignalReport.equals("enabled"))
|
||||
buffer += buildmoduleXML("helloSignal","Hello Signal", "generic_data", helloSignal);
|
||||
|
@ -472,6 +476,7 @@ public class PandroidAgentListener extends Service {
|
|||
getSignalStrength();
|
||||
getCalls();
|
||||
getDataBytes();
|
||||
getRoaming();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -788,6 +793,18 @@ public class PandroidAgentListener extends Service {
|
|||
|
||||
}
|
||||
|
||||
public void getRoaming()
|
||||
{
|
||||
TelephonyManager telephone = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
|
||||
boolean roaming = telephone.isNetworkRoaming();
|
||||
|
||||
if(roaming)
|
||||
putSharedData("PANDROID_DATA", "roaming", "1", "integer" );
|
||||
else
|
||||
putSharedData("PANDROID_DATA", "roaming", "0", "integer" );
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void putSharedData(String preferenceName, String tokenName, String data, String type) {
|
||||
int mode = Activity.MODE_PRIVATE;
|
||||
|
|
|
@ -17,7 +17,6 @@ package pandroid.agent;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.content.BroadcastReceiver;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
|
|
|
@ -25,24 +25,27 @@ import android.app.Dialog;
|
|||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.WindowManager;
|
||||
import android.view.WindowManager.LayoutParams;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
public class Setup extends Activity {
|
||||
|
||||
|
@ -60,28 +63,47 @@ public class Setup extends Activity {
|
|||
listProcesses = new HashMap<String, String>();
|
||||
|
||||
Core.loadConf(getApplicationContext());
|
||||
|
||||
if(Core.hasSim)
|
||||
setContentView(R.layout.setup);
|
||||
else
|
||||
setContentView(R.layout.setupnosim);
|
||||
loadViews();
|
||||
loadInBackgroundProcessInExecution();
|
||||
setButtonEvents();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
Log.v(LOG_TAG,"password check resume"+Core.passwordCheck);
|
||||
|
||||
if(Core.hasSim)
|
||||
setContentView(R.layout.setup);
|
||||
else
|
||||
setContentView(R.layout.setupnosim);
|
||||
|
||||
|
||||
loadViews();
|
||||
|
||||
loadInBackgroundProcessInExecution();
|
||||
|
||||
setButtonEvents();
|
||||
|
||||
if(Core.password.equals(Core.defaultPassword))
|
||||
{
|
||||
if(Core.passwordCheck.equals("enabled"))
|
||||
passwordChoose();
|
||||
}
|
||||
else{
|
||||
|
||||
}else{
|
||||
|
||||
LayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||
View view=inflater.inflate(R.layout.setup, null);
|
||||
RelativeLayout setup = (RelativeLayout)view.findViewById(R.id.setup);
|
||||
setContentView(setup);
|
||||
setup.setVisibility(RelativeLayout.INVISIBLE);
|
||||
|
||||
enterpass();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//For options
|
||||
|
@ -146,6 +168,20 @@ public class Setup extends Activity {
|
|||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
Button webButton = (Button) findViewById(R.id.goToWebButton);
|
||||
|
||||
webButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
|
||||
Uri uri = Uri.parse(Core.webName);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}// end setButtonEvents
|
||||
|
@ -239,6 +275,9 @@ public class Setup extends Activity {
|
|||
button = (Button)findViewById(R.id.set_password);
|
||||
button.setEnabled(true);
|
||||
|
||||
button = (Button)findViewById(R.id.goToWebButton);
|
||||
button.setEnabled(true);
|
||||
|
||||
}
|
||||
|
||||
}// end onPostExecute
|
||||
|
@ -262,6 +301,9 @@ public class Setup extends Activity {
|
|||
|
||||
editText = (EditText) findViewById(R.id.agentNameInput);
|
||||
Core.agentName = editText.getText().toString();
|
||||
|
||||
editText = (EditText) findViewById(R.id.webNameInput);
|
||||
Core.webName = editText.getText().toString();
|
||||
|
||||
checkBox = (CheckBox) findViewById(R.id.checkGpsReport);
|
||||
if (checkBox.isChecked())
|
||||
|
@ -379,6 +421,12 @@ public class Setup extends Activity {
|
|||
Core.BytesSentReport = "enabled";
|
||||
else
|
||||
Core.BytesSentReport = "disabled";
|
||||
|
||||
checkBox = (CheckBox) findViewById(R.id.checkRoamingReport);
|
||||
if (checkBox.isChecked())
|
||||
Core.RoamingReport = "enabled";
|
||||
else
|
||||
Core.RoamingReport = "disabled";
|
||||
}// end if sim card
|
||||
|
||||
checkBox = (CheckBox) findViewById(R.id.checkHelloSignalReport);
|
||||
|
@ -406,6 +454,9 @@ public class Setup extends Activity {
|
|||
|
||||
editText = (EditText) findViewById(R.id.agentNameInput);
|
||||
editText.setText(Core.agentName);
|
||||
|
||||
editText = (EditText) findViewById(R.id.webNameInput);
|
||||
editText.setText(Core.webName);
|
||||
|
||||
checkBox = (CheckBox) findViewById(R.id.checkGpsReport);
|
||||
checkBox.setChecked(Core.gpsStatus.equals("enabled"));
|
||||
|
@ -459,6 +510,9 @@ public class Setup extends Activity {
|
|||
|
||||
checkBox = (CheckBox) findViewById(R.id.checkBytesSentReport);
|
||||
checkBox.setChecked(Core.BytesSentReport.equals("enabled"));
|
||||
|
||||
checkBox = (CheckBox) findViewById(R.id.checkRoamingReport);
|
||||
checkBox.setChecked(Core.RoamingReport.equals("enabled"));
|
||||
}//end if sim card
|
||||
|
||||
checkBox = (CheckBox) findViewById(R.id.checkHelloSignalReport);
|
||||
|
@ -617,11 +671,12 @@ public class Setup extends Activity {
|
|||
|
||||
public void enterpass() {
|
||||
//set up dialog
|
||||
final Dialog dialog = new Dialog(this);
|
||||
final Dialog dialog = new Dialog(this,android.R.style.Theme_Black_NoTitleBar_Fullscreen);
|
||||
dialog.setContentView(R.layout.password_entry);
|
||||
dialog.setTitle(getString(R.string.password_enter));
|
||||
dialog.setCancelable(false);
|
||||
dialog.getWindow().setSoftInputMode (WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
dialog.getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN);
|
||||
//there are a lot of settings, for dialog, check them all out!
|
||||
|
||||
//set up text
|
||||
|
@ -645,6 +700,29 @@ public class Setup extends Activity {
|
|||
InputMethodManager im = (InputMethodManager)getSystemService(getApplicationContext().INPUT_METHOD_SERVICE);
|
||||
im.hideSoftInputFromWindow(text.getWindowToken(), 0);
|
||||
dialog.dismiss();
|
||||
|
||||
if(Core.hasSim){
|
||||
LayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||
View view=inflater.inflate(R.layout.setup, null);
|
||||
RelativeLayout setup = (RelativeLayout)view.findViewById(R.id.setup);
|
||||
setContentView(setup);
|
||||
loadViews();
|
||||
loadInBackgroundProcessInExecution();
|
||||
setButtonEvents();
|
||||
setup.setVisibility(RelativeLayout.VISIBLE);
|
||||
}
|
||||
else{
|
||||
LayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||
View view=inflater.inflate(R.layout.setupnosim, null);
|
||||
RelativeLayout setupnosim = (RelativeLayout)view.findViewById(R.id.setupnosim);
|
||||
setContentView(setupnosim);
|
||||
loadViews();
|
||||
loadInBackgroundProcessInExecution();
|
||||
setButtonEvents();
|
||||
setupnosim.setVisibility(RelativeLayout.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -676,7 +754,7 @@ public class Setup extends Activity {
|
|||
});
|
||||
|
||||
dialog.show();
|
||||
|
||||
|
||||
}// end enterPass
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,8 @@ package pandroid.agent;
|
|||
import java.util.Date;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.*;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
@ -28,7 +29,6 @@ import android.view.View;
|
|||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
//import android.util.Log;
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class Status extends Activity {
|
|||
h.postDelayed(this, 1000);
|
||||
}
|
||||
});
|
||||
//set to 1 for first contact
|
||||
|
||||
}
|
||||
|
||||
//For options
|
||||
|
@ -345,6 +345,10 @@ public class Status extends Activity {
|
|||
textView = (TextView)findViewById(R.id.transmit_bytes_value);
|
||||
textView.setText("");
|
||||
textView.setText("" + Core.transmitBytes);
|
||||
|
||||
textView = (TextView)findViewById(R.id.roaming_value);
|
||||
textView.setText("");
|
||||
textView.setText("" + Core.roaming);
|
||||
|
||||
}//end simID if
|
||||
|
||||
|
|
Loading…
Reference in New Issue