I need to measure the send speed of SMS in an Android device. I'm thinking on the below approach. Please let me know if it is correct, or if there is a better solution.
Calculate the time spent sending 10 messages, and calculate the average time spent for sending each. But where is the speed amount here? Does the number of characters increase the time spent?
Here is the code I have written.
SmsManager smsManager = SmsManager.getDefault();
long startTime = System.currentTimeMillis();
smsManager.sendTextMessage("1234567890",null,text,null,null);
smsManager.sendTextMessage("1234567890",null,text,null,null);
smsManager.sendTextMessage("1234567890",null,text,null,null);
smsManager.sendTextMessage("1234567890",null,text,null,null);
smsManager.sendTextMessage("1234567890",null,text,null,null);
smsManager.sendTextMessage("1234567890",null,text,null,null);
smsManager.sendTextMessage("1234567890",null,text,null,null);
smsManager.sendTextMessage("1234567890",null,text,null,null);
smsManager.sendTextMessage("1234567890",null,text,null,null);
long endTime = System.currentTimeMillis();
long result = endTime - startTime;
The result
is 742 milliseconds, but I doubt that is correct. It means that each SMS only takes 74 milliseconds.