write String from Parcel - Android android.os

Android examples for android.os:Parcel

Description

write String from Parcel

Demo Code


//package com.java2s;
import android.os.Parcel;

public class Main {
    public static void writeString(Parcel dest, String value) {
        dest.writeByte((byte) (value != null ? 1 : 0));
        if (value != null)
            dest.writeString(value);/* ww  w . j  a v  a  2  s. c o m*/
    }
}

Related Tutorials