Android Open Source - websms Default S M S Length Calculator






From Project

Back to project page websms.

License

The source code is released under:

GNU General Public License

If you think the Android project websms listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.ub0r.android.websms;
//  w w  w  . j  a v a 2s . co m
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.SmsMessage;
import de.ub0r.android.websms.connector.common.SMSLengthCalculator;

/**
 * A SMSLengthCalculator that just delegates to SmsMessage.calculateLength().
 * 
 * @author Fintan Fairmichael / Felix Bechstein
 */
public class DefaultSMSLengthCalculator implements SMSLengthCalculator {
  /** Serial Version UID. */
  private static final long serialVersionUID = -1021281060248896432L;

  @Override
  public void writeToParcel(final Parcel dest, final int flags) {
  }

  @Override
  public int describeContents() {
    return 0;
  }

  @Override
  public int[] calculateLength(final String messageBody,
      final boolean use7bitOnly) {
    return SmsMessage.calculateLength(messageBody, use7bitOnly);
  }

  /** Parcel stuff. */
  public static final Parcelable.Creator<DefaultSMSLengthCalculator> CREATOR = new Parcelable.Creator<DefaultSMSLengthCalculator>() {
    public DefaultSMSLengthCalculator createFromParcel(final Parcel in) {
      return new DefaultSMSLengthCalculator();
    }

    public DefaultSMSLengthCalculator[] newArray(final int size) {
      return new DefaultSMSLengthCalculator[size];
    }
  };
}




Java Source Code List

de.ub0r.android.websms.AboutActivity.java
de.ub0r.android.websms.Ads.java
de.ub0r.android.websms.CaptchaActivity.java
de.ub0r.android.websms.DefaultSMSLengthCalculator.java
de.ub0r.android.websms.HeaderPreferenceFragment.java
de.ub0r.android.websms.HelpActivity.java
de.ub0r.android.websms.MobilePhoneAdapter.java
de.ub0r.android.websms.MyTimePickerDialog.java
de.ub0r.android.websms.Preferences11Activity.java
de.ub0r.android.websms.PreferencesActivity.java
de.ub0r.android.websms.PreferencesAppearanceActivity.java
de.ub0r.android.websms.PreferencesBehaviorActivity.java
de.ub0r.android.websms.WebSMSApp.java
de.ub0r.android.websms.WebSMSReceiver.java
de.ub0r.android.websms.WebSMS.java
de.ub0r.android.websms.connector.sms.ConnectorSMS.java