Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Context;

import android.preference.PreferenceManager;

public class Main {
    public static long getWaitSeconds(Context context) {
        String v = PreferenceManager.getDefaultSharedPreferences(context).getString("key_wait_seconds", "10");
        try {
            return Long.parseLong(v) * 1000;
        } catch (Exception ex) {
            ex.printStackTrace();
            return 10 * 1000;
        }
    }
}