Java tutorial
//package com.java2s; import android.content.Intent; import android.os.Bundle; public class Main { public static Long getIntentLong(Intent intent, String value) { Bundle extras = intent.getExtras(); Long result = 123456789L; if (extras != null) { result = extras.getLong(value); } return result; } }