You can start by reviewing Data Usage on the Android tech info page.
Each network device driver reports its use of statsitics for the xt_qtaguid module in the android-3.0 Linux kernel. Then from the framework you can specify additional rules to limit the background data traffic for the application.
Try providing the counterSet and UID parameters for the com.android.server.NetworkManagementSocketTagger setKernelCounterSet() method. Where counterSet values counterSet defined in android.net.NetworkPolicyManager and the UID will be your application identifier obtained through ContextWrapper.getApplicationInfo().uid .
Hope this helps you.
source share