[android-developers] NetworkStatsManager querySummary returning incorrect data for specific time interval

2018-02-15 Thread Gourav Gour


I am using following code to get data used per application for a given time 
interval

long t1 = System.currentTimeMillis()-(60*1000);long t2 = 
System.currentTimeMillis();NetworkStats networkStats = 
networkStatsManager.querySummary(ConnectivityManager.TYPE_WIFI, null, t1, t2);
long data_tx = 0;long data_rx = 0;
NetworkStats.Bucket bucket = new NetworkStats.Bucket();while 
(networkStats.hasNextBucket()) {
networkStats.getNextBucket(bucket);
String callingApp = 
context.getPackageManager().getNameForUid(bucket.getUid());
data_tx = bucket.getTxBytes();
data_rx = bucket.getRxBytes();
}

but the values of bucket.getTxBytes() and bucket.getRxBytes() for any given 
application for given time interval is too big which can not be true as i 
have checked it with glasswire data monitoring app. So is this the right 
way to get data usage per application for any given time interval and also 
how can we have real time watch on application to monitor their internet 
activities?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/3fab0caf-773e-4662-872b-7616fbfcaac0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] live video streaming

2009-11-15 Thread gour
Hi all,
  i need help on live video streaming. I want to do the following
things in live video streaming.
  1. I want to broadcast the live video which is recording by camera
from one android mobile directly to a particular ip address.
 2. now i want to play that video to another android mobile from that
ip address without storing that video.

 can i do it ? if so please help me regarding this.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] broadcast data to other application

2009-05-15 Thread gour

Hi
I create an application where i get the various data from net (say
for example i am getting the temperature information of particular
city and another data is the information of stock value of a
particular company) now i want to broadcast that various data to all
application. I create a registration process for diff application for
diff data (EX app A is registrar for temp of city). so application is
registrar for  particular data will get that data.

How can i broadcast the information to all application which are
registrar .

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] contact listener

2009-02-03 Thread gour

How to listen if any contact is added or deleted or updated in the
address book. How do i implement that listener in my application.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---