package com.example.service03;

import android.app.Activity;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class autre_activity extends Activity 
{

	private SharePreference sharePreference;
	autre_activity context = this;
	
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
			super.onCreate(savedInstanceState);
			setContentView(R.layout.autre_activity);
			
	
	        //   Activity context = this;
	        // sharePreference = new SharePreference();
	        // sharePreference.save(context, "text");
	         
	         
	        // SharedPreferences pref = getApplicationContext().getSharedPreferences("Store_preferences", MODE_PRIVATE); 
	        // Editor editor = pref.edit();
	      
	         //editor.putBoolean("key_name1", true);           // Saving boolean - true/false
	         //editor.putInt("key_name2", "int value");        // Saving integer
	         //editor.putFloat("key_name3", "float value");    // Saving float
	         //editor.putLong("key_name4", "long value");      // Saving long
	     //    editor.putString("key_name5", "fjlkfjgkjlkgjkgjkljdkfjlkjkljstring value");  // Saving string
	          
	     //    editor.commit(); // commit changes
		
	    //     String value = pref.getString("key_name5", null);          // getting String
	         
	         
	         MainActivity.sharedpreferences = getSharedPreferences(MainActivity.MyPREFERENCES, Context.MODE_PRIVATE);
		        SharedPreferences.Editor editor = MainActivity.sharedpreferences.edit();
				editor.putString("Name", "changement");
	            editor.commit();
	         
	}
}	