Friends I am using intent to navigate from one activity to another.How ever the navigation process is taking about a minute.Please find logs
08-21 18:01:32.719: I/System.out(4636): Button has been clicked
08-21 18:02:32.999: I/System.out(4636): successfull navigation
Code:
public void onClick(View v) {
if(v==refreshButton)
{
System.out.println("Button has been clicked");
startActivity(new Intent(this,Refresh.class));
}
Please help me in the same. I have tried cleaning the project and restarted the smartphone also.
Refresh Class
public class RefreshSettings extends Activity implements android.view.View.OnClickListener
{
Button refresh;
EditText code;
String pinCode;
TelephonyManager telephonyManager;
String imei;
@Override
protected void onSaveInstanceState(Bundle outState) {
System.out.println("successfull navigation");
super.onSaveInstanceState(outState);
setContentView(R.layout.refresh_settings);
telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
imei=telephonyManager.getDeviceId();
refresh=(Button)findViewById(R.id.button_Refresh_Settings);
refresh.setOnClickListener(this);
code=(EditText)findViewById(R.id.edittext_Refresh_Code);
}
}
Change
onSaveInstanceState()toonCreate().From the documentation I understand that onSaveInstanceState() should be called to store only temporary information,