Android examples for android.os:Bundle
intercept Long Param from Bundle
import android.content.Intent; import android.os.Bundle; import android.os.Parcelable; public class Main{ public static long interceptLongParam(Bundle savedInstanceState, Intent intent, String paramName) { long ret = 0; if (savedInstanceState != null) { ret = savedInstanceState.getLong(paramName); } else {/*from w w w . ja va 2s . co m*/ if (intent != null) { Bundle incomming = intent.getExtras(); if (incomming != null) { ret = incomming.getLong(paramName); } } } return ret; } }