Exemplo n.º 1
0
 /**
  * Calculates max possible length of sms-text to send according to sms used
  *
  * @param amountOfSMS amount of SMS that is required to send the message
  * @return max possible length of sms-text to send
  */
 private int getMaxSMSLengthPossible(int amountOfSMS) {
   if (app.getMaxSMSpossible() == 0) {
     return 0;
   } else {
     return app.getSmsLength() * app.getMaxSMSpossible() - calculateCharDelta(amountOfSMS);
   }
 }
Exemplo n.º 2
0
 /**
  * Calculates the amount of SMS required for sending the entire message
  *
  * @param messageLength length of SMS as base for calculation
  * @return int amount of SMS required for sending the entire message
  */
 private int calculateSMSCount(int messageLength) {
   int amountOfSMS = (messageLength + app.getSmsLength() - 1) / app.getSmsLength();
   messageLength += calculateCharDelta(amountOfSMS);
   return (messageLength + app.getSmsLength() - 1) / app.getSmsLength();
 }