Você está na página 1de 5

CSE 535 Mobile Computing

MOBILE MONITORING APPLICATION


Ankit Goyal Shruti Mahajan Abhishek Rao
Arizona State University Arizona State University Arizona State University
agoyal22@asu.edu smahaja7@asu.edu arao23@asu.edu

Abstract We have developed a mobile monitoring Itself. The problem is that the data will stay only in that
application which intends to facilitate social order and particular phone.
culture by providing to the parent a descriptive report of
the locations, calls and message transfer from and to the C. Database Storage Consideration.
child mobile. Application provides a Call, Location and In the sqlite database it is not possible to store texts
Message Tracking to enforce shadowing and control. since it might contains vivid characters like ,, :,
KeywordsMobile Monitoring, SQLite Database, |, etc. and datatypes like varchar2 and nvarchar2 also
Authentication, Call Tracking, Message Tracking doesnt support such characters. Therefore, to store
GPS, Tracking messages, text file has been used.

I. INTRODUCTION III. IMPLEMENTATION AND ALGORITHMS


Sometimes a need arises to monitor a person, profile or
a role owing to some legitimate reason. Hence what can Previous Call Records and Text Messages:
be of more use than a smart device which has become This Feature reads the call log and messages from the
an essential part of our life-style. Hence we have come mobile and stores them in a sqlite database and text file
up with this application which monitors three respectively. It stores the relevant details viz. time,
duration body and date which fulfils objective of
elementary activities of our daily routine namely, Calls,
presenting the detailed analysis to the monitor agent.
texts and mobility.
The deleted records from the phone will also be
This monitoring android application is developed to
displayed since it has been stored intact.
provide the essential information about the mobile
holder activities. The main purpose of this application Blocking a call/text & SMS Notification:
is to provide all call/text/location records to the person Whenever there is a call/text, application will receive
who is monitoring and also implement call/message it as well through broadcast receivers implemented. It
blocking from a particular number. We are then matches the contacting number from the list of
implementing single sign -In system, i.e the parent signs blocked no. and checks if it is blocked or not. If it is a
in and sets the username and password for the first time blocked no. then it will disconnect the call using
whenever the app is installed. As a result of which the telephony Manager and for a message a notification to
childs access to this app will be restricted as nobody the monitor agent. This service runs in background
else other than parent can sign up and change the incessantly. Additionally it will send SMS to the no.
password. which are already stored in the app to notify that Call
Attempt to Blocked: Contact no. This is the
II. CHALLENGES AND CONSIDERATIONS notification sent using SMSManager.
String serviceManagerName =
A. Android Permissions "android.os.ServiceManager";
String serviceManagerNativeName =
In the latest Android Versions, Mobile App needs "android.os.ServiceManagerNative";
to take permissions explicitly from the user. We are String telephonyName =
"com.android.internal.telephony.ITelephony";
taking permissions to read Call Logs, Message, GPS Class<?> telephonyClass;
Location, Contact List and to receive and send SMS. Class<?> telephonyStubClass;
Class<?> serviceManagerClass;
B. Cloud Server Class<?> serviceManagerNativeClass;
Method telephonyEndCall;
Since there was no cloud server to upload to, we Object telephonyObject;
Object serviceManagerObject;
decided to implement this application in child phone telephonyClass = Class.forName(telephonyName);
telephonyStubClass =
telephonyClass.getClasses()[0];
serviceManagerClass =
Class.forName(serviceManagerName); localization for tracking the users location. As GPS is
serviceManagerNativeClass =
Class.forName(serviceManagerNativeName); more accurate, we urge user to use GPS to track
Method getService = // getDefaults[29]; location. The GPS will be tracking the location updates
serviceManagerClass.getMethod("getService", of the user and consequently stores the longitude and
String.class); latitude coordinates into the SQL database whenever
Method tempInterfaceMethod =
serviceManagerNativeClass.getMethod("asInterface", there is a minimum distance change of 30 meters and
IBinder.class);
Binder tmpBinder = new Binder();
minimum time lapse of 3 minutes. These filter values
tmpBinder.attachInterface(null, "fake"); are chosen such that the database is not overloaded with
serviceManagerObject =
tempInterfaceMethod.invoke(null, tmpBinder);
more redundant same location coordinates.
IBinder retbinder = (IBinder)
getService.invoke(serviceManagerObject, "phone");
Method serviceMethod = Displaying Recent Locations
telephonyStubClass.getMethod("asInterface", When the user clicks on display recent locations, the
IBinder.class);
telephonyObject = serviceMethod.invoke(null, database values are retrieved and latitudinal and
retbinder); longitudinal coordinates of the locations are converted
telephonyEndCall =
telephonyClass.getMethod("endCall"); to a physical address using Geocoder class. There are
telephonyEndCall.invoke(telephonyObject); chances that the user has not moved much from his
current location in 3 minutes and we may get same
location coordinates in the next location update. So,
Call Analysis: while displaying the recent locations we are
User can view detailed analysis of all the incoming implementing this algorithm: The address of the
and outgoing calls which has taken place in a specific location of the first entry of database is compared with
duration of time. It will display the list in descending address of next consecutive entries and if the values are
order based on the time of call. It will display the caller different, the corresponding locations address is added
or receiver name, Type of the call, Time & Date,
to an array list. If address is same, the corresponding
Duration etc. Al the information is stored in the
locations address is discarded and the loop iterates to
database.
the next value and comparisons continue until we reach
Blocking a no. & adding Notification no: end of loop and all the addresses which are different
Parent can block any no. he wants to by adding the from one another, are retrieved from an array list and
no. in the list of blocked contact list. Whenever there is displayed on the screen using a list view.
any incoming or outgoing call to that no. it will be The user can also choose to display the locations on
disconnected without the User control. Additionally, the map. Google Maps API is used for displaying recent
SMS notification is sent to the no. already added to the the locations on a map.
list of Notification Contact no. User can add as many as
numbers in the Notification List. Notification is sent to
all the no. IV. DATABASE CREATION
For both instances where data storage is required, the
Content Filtering SQLite Database and a text file has used as the
When the Messages with the specified keywords backend. Multiple tables and two textiles are created in
inserted, are exchanged, the monitor agent is sent a a single database.
notification. The receiver receives the messages and All the Call records are stored in the callLogs table (id
checks through the body and sends a sms notification. INTEGER, contactno VARCHAR, tmdate
VARCHAR, blocked BOOL, type VARCHAR,
Blocking text messages from specified contact duration INTEGER). Contact no. to which notification
number. will be sent is stored in notification table (id INTEGER,
The receiver implemented has the highest priority set contactno VARCHAR). User Login information is
which is of maximum level of 2147483647. Hence it stored in the Login table (id INTEGER username
receives the text first and then checks with the address. VARCHAR, password password). All the blocked
If it happens to be one of the blocked number then the numbers are stored in BLOCKEDNOS table (ID
message broadcast in aborted. INTEGER,NUMBER VARCHAR). Number is the
respective blocked no which the user wants to block.
All latitude and longitude coordinates are stored in
LOCATION TRACKER recent-locations-table
Whenever the user clicks on start tracking location, (id INTEGER,LATITUDEDOUBLE,LONGITUDE
location tracker service which implements location DOUBLE) .
listener is started. We are using both GPS and Network
V. TASK COMPLETION STATUS current location and the
All the tasks are completed. In addition to these tasks, history of recent locations is
we made Login, SignUp and Notification No. displayed to the parent user.
Activities. 14 Blocked Numbers Abhishek Rao
:Acquisition : Retrieving the
Task Task Assignee list of blocked numbers as an
No. input from the user.
1 Recent Call and previous Ankit Goyal 15 Storing Blocked Numbers: Abhishek Rao
Records - Acquisition: Delivery and Reception :
Retrieving the Incoming and Storing certain phone
Outgoing call and read the numbers as blocked phone
previous call records too. numbers in sqlite.

2 Call History - Delivery and Ankit Goyal


Reception: Storing the
complete call records in the
Sqlite.
VI. CONCLUSION
3 Calls Analysis - Action: Ankit Goyal This application is developed to deploy in the mobile
Providing the Detailed Call which you want to monitor. This application can
analysis for the user. monitor the Calls, SMS, and GPS Location precisely.
4 Call blocking - Action: Ankit Goyal Future scalability is to implement Cloud server from
Disconnecting the call if which person who wants to monitor other mobile will
there is an incoming call receive all the information in his mobile only through
from the blocked number or cloud.
if an attempt is made for an
outgoing call and sending a ACKNOWLEDGMENT
notification to the user in the
form of a text message. We thank Dr. Ayan Banerjee and our TA Junghyo Lee
for providing this course and this android programming
5 Call history of blocked calls Ankit Goyal project. This project helped us in various ways and
- Delivery and Reception: made us understand the mobile computing solutions
Storing the call history of better.
blocked calls in sqlite.
6 Retrieving Text Messages Shruti REFERENCES
Mahajan 1. http://developer.android.com/reference/android/
7 Content Filtering Shruti provider/CallLog.Calls.html
Mahajan 2. http://stackoverflow.com/questions/848728/ho
8 Blocking Text Messages Shruti w-can-i-read-sms-messages-from-the-inbox-pr
from specified number. Mahajan ogrammatically-in-android
9 Retrieving messages for Shruti 3. http://www.tutorialspoint.com/android/
specified duration Mahajan 4. http://www.codeproject.com/Articles/665527/A
10 Notifying the Monitor agent Shruti -GPS-Location-Plotting-Android-Application
Mahajan
11 Location using GPS : Abhishek Rao
Acquisition: The current
location of the user is
retrieved using GPS.
12 Location history: Delivery Abhishek Rao
and Reception: The user's
recent locations are stored in
SQLite database.
13 Recent Locations: Action: Abhishek Rao
Detailed analysis on the

Você também pode gostar