Code example for ContextWrapper

Methods: getSharedPreferences

		return "Munin"; 
	public Void run(Handler handler) {
        final SharedPreferences settings = context.getSharedPreferences("Munin_Node", 0);
        Long start = settings.getLong("start_time", 0);
        Long end = settings.getLong("end_time", 0);
        final Editor editor = settings.edit();
        editor.putLong("start_time", settings.getLong("new_start_time", 0));
        Long processing_time = end-start;
		StringBuffer output = new StringBuffer();
		output.append("graph_title Munin Processing Time\n");
		output.append("graph_vlabel ms\n");
		output.append("graph_info This graph shows how much time is spent running the munin service, its data is delayed by one run.\n");
		output.append("graph_category munin\n");
		output.append("graph_scale no\n");
		output.append("time.label Service\n");
		output.append("time.draw LINE\n");
Connect your IDE to all the code out there  Get Codota for Java