Java Code Examples for android.os.Parcel.writeByte()

The following are Jave code examples for showing how to use writeByte() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: GongXianSheng   File: OrderResponse.java   Source Code and License Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.productUom);
    dest.writeDouble(this.priceUnit);
    dest.writeDouble(this.discount);
    dest.writeDouble(this.returnAmount);
    dest.writeDouble(this.deliveredQty);
    dest.writeDouble(this.priceSubtotal);
    dest.writeInt(this.productID);
    dest.writeDouble(this.tallyingAmount);
    dest.writeInt(this.saleOrderProductID);
    dest.writeString(this.stockType);
    dest.writeString(this.category);
    dest.writeDouble(this.settleAmount);
    dest.writeDouble(this.productUomQty);
    dest.writeStringList(this.lotIDs);
    dest.writeTypedList(this.lotList);
    dest.writeByte(this.isChanged ? (byte) 1 : (byte) 0);
}
 
Example 2
Project: Phoenix-for-VK   File: User.java   Source Code and License Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeInt(id);
    dest.writeString(firstName);
    dest.writeString(lastName);
    dest.writeByte((byte) (online ? 1 : 0));
    dest.writeByte((byte) (onlineMobile ? 1 : 0));
    dest.writeInt(onlineApp);
    dest.writeString(photo50);
    dest.writeString(photo100);
    dest.writeString(photo200);
    dest.writeLong(lastSeen);
    dest.writeInt(platform);
    dest.writeString(status);
    dest.writeInt(sex);
    dest.writeString(domain);
    dest.writeByte((byte) (friend ? 1 : 0));
    dest.writeInt(friendStatus);
}
 
Example 3
Project: BLPlayer   File: BangumiItem.java   Source Code and License Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.area);
    dest.writeInt(this.arealimit);
    dest.writeInt(this.attention);
    dest.writeString(this.badge);
    dest.writeInt(this.bangumi_id);
    dest.writeString(this.bgmcount);
    dest.writeString(this.cover);
    dest.writeInt(this.danmaku_count);
    dest.writeInt(this.ep_id);
    dest.writeInt(this.favorites);
    dest.writeInt(this.is_finish);
    dest.writeInt(this.lastupdate);
    dest.writeString(this.lastupdate_at);
    dest.writeByte(this.newest ? (byte) 1 : (byte) 0);
    dest.writeInt(this.play_count);
    dest.writeString(this.pub_time);
    dest.writeInt(this.season_id);
    dest.writeInt(this.season_status);
    dest.writeInt(this.spid);
    dest.writeString(this.square_cover);
    dest.writeString(this.title);
    dest.writeInt(this.viewRank);
    dest.writeInt(this.weekday);
}
 
Example 4
Project: VirtualHook   File: SessionInfo.java   Source Code and License Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.sessionId);
    dest.writeString(this.installerPackageName);
    dest.writeString(this.resolvedBaseCodePath);
    dest.writeFloat(this.progress);
    dest.writeByte(this.sealed ? (byte) 1 : (byte) 0);
    dest.writeByte(this.active ? (byte) 1 : (byte) 0);
    dest.writeInt(this.mode);
    dest.writeLong(this.sizeBytes);
    dest.writeString(this.appPackageName);
    dest.writeParcelable(this.appIcon, flags);
    if (appLabel != null) {
        dest.writeString(appLabel.toString());
    }
}
 
Example 5
Project: EMQ-Android-Toolkit   File: Publication.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.topic);
    dest.writeString(this.payload);
    dest.writeInt(this.QoS);
    dest.writeByte(this.isRetained ? (byte) 1 : (byte) 0);
    dest.writeString(this.time);
}
 
Example 6
Project: GongXianSheng   File: OrderResponse.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest,flags);
    dest.writeDouble(amountTotal);
    dest.writeString(driver);
    dest.writeString(endUnloadDatetime);
    dest.writeString(estimatedDate);
    dest.writeByte((byte) (isTwoUnit ? 1 : 0));
    dest.writeInt(hasReturn);
    dest.writeString(loadingTime);
    dest.writeString(estimatedTime);
    dest.writeString(createDate);
    dest.writeString(startUnloadDatetime);
    dest.writeString(state);
    dest.writeString(receiveUserName);
    dest.writeString(tallyingUserName);
    dest.writeByte((byte) (isDoubleReceive ? 1 : 0));
    dest.writeByte((byte) (unApplyService ? 1 : 0));
    dest.writeDouble(settleAmountTotal);
    dest.writeParcelable(waybill,flags);
    dest.writeInt(hasAttachment);
    dest.writeByte((byte) (isFinishTallying ? 1 : 0));
    dest.writeString(createUserName);
    dest.writeString(orderSettleName);
    dest.writeDouble(publicAmountTotal);
    dest.writeDouble(deliveredQty);
    dest.writeString(confirmationDate);
    dest.writeInt(orderID);
    dest.writeString(name);
    dest.writeString(appraisalUserName);
    dest.writeDouble(amount);
    dest.writeByte((byte) (isToday ? 1 : 0));
    dest.writeString(doneDatetime);
    dest.writeString(deliveryType);
    dest.writeTypedList(lines);
    dest.writeStringList(stateTracker);
    dest.writeStringList(returnOrders);
}
 
Example 7
Project: anycall   File: Anycall.java   Source Code and License Vote up 5 votes
public void callMethod(final String className, final String serviceName,
                       final String methodName, final Object... paramsAndListener) {
    Parcel data = Parcel.obtain();
    data.writeInterfaceToken(className);
    for (int i = 0; i < paramsAndListener.length - 1; i++) {
        Object p = paramsAndListener[i];
        if (p instanceof Byte)
            data.writeByte((Byte) p);
        else if (p instanceof Integer)
            data.writeInt((Integer) p);
        else if (p instanceof Long)
            data.writeLong((Long) p);
        else if (p instanceof String)
            data.writeString((String) p);
        else if (p instanceof Bundle)
            data.writeBundle((Bundle) p);
        else if (p instanceof Float)
            data.writeFloat((Float) p);
        else if (p instanceof FileDescriptor)
            data.writeFileDescriptor((FileDescriptor) p);
        else if (p instanceof List)
            data.writeList((List) p);
        else if (p instanceof Exception)
            data.writeException((Exception) p);
        else if (p instanceof IBinder)
            data.writeStrongBinder((IBinder) p);
        else if (p instanceof Double)
            data.writeDouble((Double) p);
        else if (p instanceof Map)
            data.writeMap((Map) p);
        else if (p instanceof boolean[])
            data.writeBooleanArray((boolean[]) p);
        else if (p instanceof byte[])
            data.writeByteArray((byte[]) p);
        else if (p instanceof char[])
            data.writeCharArray((char[]) p);
        else if (p instanceof int[])
            data.writeIntArray((int[]) p);
        else if (p instanceof IBinder[])
            data.writeBinderArray((IBinder[]) p);
        else if (p instanceof double[])
            data.writeDoubleArray((double[]) p);
        else if (p instanceof Object[])
            data.writeArray((Object[]) p);
        else data.writeValue(p);
    }

    Object lastParam = paramsAndListener[paramsAndListener.length - 1];
    CallMethodResultListener listener = lastParam == null ? null :
            (CallMethodResultListener) lastParam;

    callMethod(className, serviceName, methodName, data, listener);
    data.recycle();
}
 
Example 8
Project: Sega   File: Image.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(this.id);
    dest.writeString(this.name);
    dest.writeString(this.path);
    dest.writeByte(this.isSelected ? (byte) 1 : (byte) 0);
}
 
Example 9
Project: nongbeer-mvp-android-demo   File: HistoryItemGroup.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel( Parcel dest, int flags ){
    dest.writeString( this.status );
    dest.writeString( this.message );
    dest.writeByte( this.nextOrderAvailable ? (byte) 1 : (byte) 0 );
    dest.writeInt( this.nextOrderIndex );
    dest.writeTypedList( this.orders );
}
 
Example 10
Project: Farmacias   File: PharmacyObjectMap.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    //since we inherit from FarmaciasCsvBean that implements parcelable, we override its writeToParcel
    //method if we want this object to also be parcelable
    //the first thing is to write to parcel member variables of super class
    super.writeToParcel(dest,flags);
    dest.writeValue(this.distance);
    dest.writeString(this.hours);
    dest.writeValue(this.isOpen);
    dest.writeString(this.order);
    dest.writeString(this.phoneFormatted);
    dest.writeString(this.addressFormatted);
    dest.writeParcelable(this.markerImage, flags);
    dest.writeByte(this.isFavorite ? (byte) 1 : (byte) 0);
}
 
Example 11
Project: Coder   File: Information.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this._id);
    dest.writeString(this.createdAt);
    dest.writeString(this.desc);
    dest.writeString(this.publishedAt);
    dest.writeString(this.source);
    dest.writeString(this.type);
    dest.writeString(this.url);
    dest.writeByte(this.used ? (byte) 1 : (byte) 0);
    dest.writeString(this.who);
    dest.writeStringList(this.images);
}
 
Example 12
Project: spline   File: Layer.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(id.toString());
    dest.writeString(name);
    dest.writeByte((byte) (selected ? 1 : 0));
    dest.writeByte((byte) (visible ? 1 : 0));
    dest.writeInt(opacity);
    dest.writeFloat(x);
    dest.writeFloat(y);
    dest.writeFloat(width);
    dest.writeFloat(height);
}
 
Example 13
Project: FileDownloader-master   File: FileDownloadModel.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeString(this.url);
    dest.writeString(this.path);
    dest.writeByte(this.pathAsDirectory ? (byte) 1 : (byte) 0);
    dest.writeString(this.filename);
    dest.writeByte(this.status);
    dest.writeLong(this.soFar.get());
    dest.writeLong(this.total);
    dest.writeString(this.errMsg);
    dest.writeString(this.eTag);
    dest.writeInt(this.connectionCount);
    dest.writeByte(this.isLargeFile ? (byte) 1 : (byte) 0);
}
 
Example 14
Project: Simpler   File: User.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(this.id);
    dest.writeString(this.idstr);
    dest.writeString(this.screen_name);
    dest.writeString(this.name);
    dest.writeInt(this.province);
    dest.writeInt(this.city);
    dest.writeString(this.location);
    dest.writeString(this.description);
    dest.writeString(this.url);
    dest.writeString(this.profile_image_url);
    dest.writeString(this.profile_url);
    dest.writeString(this.domain);
    dest.writeString(this.weihao);
    dest.writeString(this.gender);
    dest.writeInt(this.followers_count);
    dest.writeInt(this.friends_count);
    dest.writeInt(this.statuses_count);
    dest.writeInt(this.favourites_count);
    dest.writeString(this.created_at);
    dest.writeByte(this.following ? (byte) 1 : (byte) 0);
    dest.writeByte(this.allow_all_act_msg ? (byte) 1 : (byte) 0);
    dest.writeByte(this.geo_enabled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.verified ? (byte) 1 : (byte) 0);
    dest.writeInt(this.verified_type);
    dest.writeString(this.remark);
    dest.writeByte(this.allow_all_comment ? (byte) 1 : (byte) 0);
    dest.writeString(this.avatar_large);
    dest.writeString(this.avatar_hd);
    dest.writeString(this.verified_reason);
    dest.writeByte(this.follow_me ? (byte) 1 : (byte) 0);
    dest.writeInt(this.online_status);
    dest.writeInt(this.bi_followers_count);
    dest.writeString(this.lang);
    dest.writeString(this.star);
    dest.writeString(this.mbtype);
    dest.writeString(this.mbrank);
    dest.writeString(this.block_word);
}
 
Example 15
Project: XposedNavigationBar   File: ShortCut.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeInt(code);
    parcel.writeByte((byte) (open ? 1 : 0));
    parcel.writeInt(page);
    parcel.writeInt(postion);
    parcel.writeString(iconPath);
    parcel.writeString(shellStr);
}
 
Example 16
Project: music-player   File: PlayList.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeString(this.name);
    dest.writeInt(this.numOfSongs);
    dest.writeByte(this.favorite ? (byte) 1 : (byte) 0);
    dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1);
    dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1);
    dest.writeTypedList(this.songs);
    dest.writeInt(this.playingIndex);
    dest.writeInt(this.playMode == null ? -1 : this.playMode.ordinal());
}
 
Example 17
Project: AndroidSerialPort   File: Control.java   Source Code and License Vote up 4 votes
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeByte(value);
}
 
Example 18
Project: Bigbang   File: CropImageOptions.java   Source Code and License Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(cropShape.ordinal());
    dest.writeFloat(snapRadius);
    dest.writeFloat(touchRadius);
    dest.writeInt(guidelines.ordinal());
    dest.writeInt(scaleType.ordinal());
    dest.writeByte((byte) (showCropOverlay ? 1 : 0));
    dest.writeByte((byte) (showProgressBar ? 1 : 0));
    dest.writeByte((byte) (autoZoomEnabled ? 1 : 0));
    dest.writeByte((byte) (multiTouchEnabled ? 1 : 0));
    dest.writeInt(maxZoom);
    dest.writeFloat(initialCropWindowPaddingRatio);
    dest.writeByte((byte) (fixAspectRatio ? 1 : 0));
    dest.writeInt(aspectRatioX);
    dest.writeInt(aspectRatioY);
    dest.writeFloat(borderLineThickness);
    dest.writeInt(borderLineColor);
    dest.writeFloat(borderCornerThickness);
    dest.writeFloat(borderCornerOffset);
    dest.writeFloat(borderCornerLength);
    dest.writeInt(borderCornerColor);
    dest.writeFloat(guidelinesThickness);
    dest.writeInt(guidelinesColor);
    dest.writeInt(backgroundColor);
    dest.writeInt(minCropWindowWidth);
    dest.writeInt(minCropWindowHeight);
    dest.writeInt(minCropResultWidth);
    dest.writeInt(minCropResultHeight);
    dest.writeInt(maxCropResultWidth);
    dest.writeInt(maxCropResultHeight);
    dest.writeString(activityTitle);
    dest.writeInt(activityMenuIconColor);
    dest.writeParcelable(outputUri, flags);
    dest.writeString(outputCompressFormat.name());
    dest.writeInt(outputCompressQuality);
    dest.writeInt(outputRequestWidth);
    dest.writeInt(outputRequestHeight);
    dest.writeInt(outputRequestSizeOptions.ordinal());
    dest.writeInt(noOutputImage ? 1 : 0);
    dest.writeParcelable(initialCropWindowRectangle, flags);
    dest.writeInt(initialRotation);
    dest.writeByte((byte) (allowRotation ? 1 : 0));
    dest.writeByte((byte) (allowCounterRotation ? 1 : 0));
    dest.writeInt(rotationDegrees);
}
 
Example 19
Project: BlogBookApp   File: Content.java   Source Code and License Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(rendered);
    dest.writeByte((byte) (jsonMemberProtected ? 0x01 : 0x00));
}
 
Example 20
Project: GitHub   File: AbsParcelableLceViewState.java   Source Code and License Vote up 4 votes
protected void writeBoolean(Parcel dest, boolean b) {
  dest.writeByte((byte) (b ? 1 : 0));
}