Bugs were all fixed,now this project can calculate a specific app's wifi and 2g/3g traffic separately by the wifi state broadcast receiver. Yet the ConnectivityReceiver.java and ShutDownReceiver.java are not finished, which means this project is not perfect enough for what it was meant to be.