Example usage for android.os Parcel writeLong

List of usage examples for android.os Parcel writeLong

Introduction

In this page you can find the example usage for android.os Parcel writeLong.

Prototype

public final void writeLong(long val) 

Source Link

Document

Write a long integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed.

Usage

From source file:app.com.example.android.sunshine.ItemChoiceManager.java

public void onSaveInstanceState(Bundle outState) {
    Parcel outParcel = Parcel.obtain();
    outParcel.writeSparseBooleanArray(mCheckStates);
    final int numStates = mCheckedIdStates.size();
    outParcel.writeInt(numStates);/*w w w  .j ava 2  s.c  o m*/
    for (int i = 0; i < numStates; i++) {
        outParcel.writeLong(mCheckedIdStates.keyAt(i));
        outParcel.writeInt(mCheckedIdStates.valueAt(i));
    }
    byte[] states = outParcel.marshall();
    outState.putByteArray(SELECTED_ITEMS_KEY, states);
    outParcel.recycle();
}

From source file:moodle.android.moodle.model.Content.java

public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(type);/*from w w  w .j  a v a  2  s  .com*/
    dest.writeString(filename);
    dest.writeString(filepath);
    dest.writeInt(filesize);
    dest.writeString(fileurl);
    dest.writeString(content);
    dest.writeLong(timecreated);
    dest.writeLong(timemodified);
    dest.writeInt(sortorder);
    dest.writeInt(userid);
    dest.writeString(author);
    dest.writeString(license);
}

From source file:com.fanfou.app.opensource.api.bean.DirectMessage.java

@Override
public void writeToParcel(final Parcel dest, final int flags) {
    dest.writeString(this.id);
    dest.writeString(this.ownerId);
    dest.writeLong(this.createdAt.getTime());
    dest.writeInt(this.type);

    dest.writeString(this.senderId);
    dest.writeString(this.recipientId);
    dest.writeString(this.text);

    dest.writeString(this.senderScreenName);
    dest.writeString(this.recipientScreenName);
    dest.writeString(this.senderProfileImageUrl);
    dest.writeString(this.recipientProfileImageUrl);

    dest.writeString(this.threadUserId);
    dest.writeString(this.threadUserName);

    dest.writeInt(this.isRead ? 1 : 0);

}

From source file:com.cas.model.Content.java

public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(type);//from ww w  .  jav  a2s.  c  o  m
    dest.writeString(filename);
    dest.writeString(filepath);
    dest.writeInt(filesize);
    dest.writeString(fileurl);
    dest.writeString(content);
    dest.writeLong(timecreated);
    dest.writeLong(timemodified);
    dest.writeInt(sortorder);
    dest.writeInt(userid);
    dest.writeString(author);
    dest.writeString(license);
    dest.writeString(transition);
    dest.writeString(mode);
}

From source file:com.vk.sdk.api.model.VKApiPhotoAlbum.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeString(this.title);
    dest.writeInt(this.size);
    dest.writeInt(this.privacy);
    dest.writeString(this.description);
    dest.writeInt(this.owner_id);
    dest.writeByte(can_upload ? (byte) 1 : (byte) 0);
    dest.writeLong(this.updated);
    dest.writeLong(this.created);
    dest.writeInt(this.thumb_id);
    dest.writeString(this.thumb_src);
    dest.writeParcelable(this.photo, flags);
}

From source file:com.facebook.AccessToken.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(expires.getTime());
    dest.writeStringList(new ArrayList<String>(permissions));
    dest.writeStringList(new ArrayList<String>(declinedPermissions));
    dest.writeString(token);/*from ww  w  .j  ava 2 s  . c om*/
    dest.writeString(source.name());
    dest.writeLong(lastRefresh.getTime());
    dest.writeString(applicationId);
    dest.writeString(userId);
}

From source file:com.vk.sdk.api.model.VKApiPhoto.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeInt(this.album_id);
    dest.writeInt(this.owner_id);
    dest.writeInt(this.width);
    dest.writeInt(this.height);
    dest.writeString(this.text);
    dest.writeLong(this.date);
    dest.writeParcelable(this.src, flags);
    dest.writeString(this.photo_75);
    dest.writeString(this.photo_130);
    dest.writeString(this.photo_604);
    dest.writeString(this.photo_807);
    dest.writeString(this.photo_1280);
    dest.writeString(this.photo_2560);
    dest.writeByte(user_likes ? (byte) 1 : (byte) 0);
    dest.writeByte(can_comment ? (byte) 1 : (byte) 0);
    dest.writeInt(this.likes);
    dest.writeInt(this.comments);
    dest.writeInt(this.tags);
    dest.writeString(this.access_key);
}

From source file:com.jbirdvegas.mgerrit.objects.GooFileObject.java

@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeInt(mId);/*from w w  w .ja  v a 2  s.c  o  m*/
    parcel.writeString(mFileName);
    parcel.writeString(mPath);
    parcel.writeString(mFolder);
    parcel.writeString(mMd5);
    parcel.writeString(mType);
    parcel.writeString(mDescription);
    parcel.writeString(String.valueOf(mIsFlashable));
    parcel.writeLong(mModified);
    parcel.writeLong(mDownloads);
    parcel.writeInt(mStatus);
    parcel.writeString(mAdditionalInfo);
    parcel.writeString(mShortUrl);
    parcel.writeInt(mDeveloperId);
    parcel.writeString(mRO_DeveloperId);
    parcel.writeString(mRO_Board);
    parcel.writeString(mRO_Rom);
    parcel.writeInt(mRO_Version);
    parcel.writeLong(mGappsPackage);
    parcel.writeInt(mIncrementalFile);
    parcel.writeString(mGappsLink);
    parcel.writeString(mGappsMd5);
}

From source file:cx.ring.model.CallContact.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(id);
    dest.writeString(key);/*from w ww  . ja v a2 s .  c o m*/
    dest.writeString(mDisplayName);
    dest.writeLong(photo_id);
    dest.writeTypedList(phones);
    dest.writeString(mEmail);
    dest.writeByte((byte) (isUser ? 1 : 0));
    dest.writeByte(stared ? (byte) 1 : (byte) 0);
}

From source file:com.wellsandwhistles.android.redditsp.reddit.things.RedditSubreddit.java

public void writeToParcel(final Parcel out, final int flags) {
    out.writeString(header_img);//w ww .  j av a2s. co  m
    out.writeString(header_title);
    out.writeString(description);
    out.writeString(description_html);
    out.writeString(public_description);
    out.writeString(id);
    out.writeString(name);
    out.writeString(title);
    out.writeString(display_name);
    out.writeString(url);
    out.writeLong(created);
    out.writeLong(created_utc);
    out.writeInt(accounts_active == null ? -1 : accounts_active);
    out.writeInt(subscribers == null ? -1 : subscribers);
    out.writeInt(over18 ? 1 : 0);
}