Android Open Source - android-demo-message Text Message






From Project

Back to project page android-demo-message.

License

The source code is released under:

/* ==================================================================== * * Copyright (c) 2013 Daniel Pocock All rights reserved. * * Redistribution and use in source and binary forms, with or wi...

If you think the Android project android-demo-message 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 org.resiprocate.android.basicmessage;
/*  w  w w . j  a  v  a2s .  c o m*/
import android.os.Parcel;
import android.os.Parcelable;

public final class TextMessage implements Parcelable {
  String sender;
  String body;

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

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

    public TextMessage() {
    }

    private TextMessage(Parcel in) {
        readFromParcel(in);
    }

    @Override
    public void writeToParcel(Parcel out, int flags) {
        out.writeString(sender);
        out.writeString(body);
    }

    public void readFromParcel(Parcel in) {
      sender = in.readString();
      body = in.readString();
    }

  @Override
  public int describeContents() {
    // TODO Auto-generated method stub
    return 0;
  }

}




Java Source Code List

org.resiprocate.android.basicmessage.MainActivity.java
org.resiprocate.android.basicmessage.MessageHandler.java
org.resiprocate.android.basicmessage.Settings.java
org.resiprocate.android.basicmessage.SipService.java
org.resiprocate.android.basicmessage.SipStack.java
org.resiprocate.android.basicmessage.TextMessage.java