Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.preference.PreferenceManager; public class Main { public static int getHeartbeatIntervalMillisForWifi(Context context) { return Integer.parseInt(PreferenceManager.getDefaultSharedPreferences(context) .getString("pref_gcm_heartbeat_interval_wifi", "5")) * 60000; } }