140 likes | 293 Views
ANDROID PACKET MONITOR. Backend. By: Chisha Malama Supervisor: Dr. WD Tucker Co-Supervisor: Mr. M Norman. FRONTEND BACKEND COMMUNICATION. Frontend App Developed by Mr J Martins. Backend App Developed by Mr C Malama. Android OS. WHAT IS ANDROID PACKET MONITOR. Monitors data usage
E N D
ANDROID PACKET MONITOR Backend By: Chisha Malama Supervisor: Dr. WD Tucker Co-Supervisor: Mr. M Norman
FRONTEND BACKEND COMMUNICATION Frontend App Developed by Mr J Martins Backend App • Developed by MrC Malama Android OS
WHAT IS ANDROID PACKET MONITOR • Monitors data usage • Adds a cost to data usage • Works on Android OS • Runs in the background • Stores data usage accumulatively
How does it work • Tracks bytes being sent/received • Detects the application sending/receiving bytes • Uses a database to store all collected information • Is able to retrieve totals based on each application
DATABSE TABLE: Wi-Fi/3G
Database to backend app SQLite Database Backend App ContentProvider Class WifiReadWrite class Backend App ContentProvider Class ThreeGReadWrite class
Classes and communication ANDROID OS Wi-Fi TRAFFIC CORE CLASS MAIN CLASS ANDROID OS 3G DATA TRAFFIC WifiReadWrite Class ThreeGReadWrite Class SQLite Database ContentProvider Class
MEDIATOR Frontend App Mediator Backend App
FRONTEND APP MEDIATOR BACKENDAPP ANDROID OS Wi-Fi TRAFFIC CORE CLASS MAIN CLASS ANDROID OS 3G DATA TRAFFIC WifiReadWrite Class ThreeGReadWrite Class SQLite Database ContentProvider Class
Some methods Private long getTotalReceivedTraffic(){ TrafficStatisticstrf = new TrafficStatistics() long sntbytes sntbytes = trf.getTotalbytesSent() return sntbytes } Private long getTotalSentTraffic(){ TrafficStatisticstrf = new TrafficStatistics() long rtbytes rtbytes= trf.getTotalbytesReceived() return rtbytes }
Bytes conversion • Byte = 8 bits • Kilobyte = 1024 bytes • Megabyte = 1024 Kilobytes or 1.048.576 (1024 x 1024) bytes or 8.388.608 bits • Gigabyte = 1024 Megabytes or 1.073.741.824 bytes • Terabyte = 1024 Gigabytes or 1.099.511.627.776 bytes
Prototype demo • We shall track all the bytes that are being sent or received. • Show total bytes that have been used without specifying which application is using it.
REFERENCES • Leslie, Ben (13 November 2007). "Native C application for Android". Benno's blog. Retrieved 2009-09-04. • Chen, Jason (12 May 2008). "The Top 50 Applications". Android Developers Blog. Retrieved 2009-09-04. • http://source.android.com/source/building-devices.html • "Complications looming for Android developers". androidandme.com. 2009-11-06. Retrieved 2010-01-15.