put Date value to Bundle by converting Date value to long value - Android android.os

Android examples for android.os:Bundle

Description

put Date value to Bundle by converting Date value to long value

Demo Code

import android.os.Bundle;
import java.util.Date;

public class Main{

    public static void putDate(Bundle bundle, String key, Date date) {
        bundle.putLong(key, date.getTime());
    }//from   w  w  w  . ja  v  a 2  s . co  m

}

Related Tutorials