/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sendcode_screen); setTitle(LOG_TAG); serverProvider = new ServerProvider(this); SessionManager.init(this); SessionManager.readSession(); BookManager.BuildBook(getResources().openRawResource(R.raw.json)); if (SessionManager.getS().isAuthKeyOk()) { Log.i(LOG_TAG, "auth_key loaded from preferences."); } else { Log.i(LOG_TAG, "Generating new Auth key..."); new AuthKeyGenerator().execute(); } sendCodeButton = (Button) findViewById(R.id.button222); sendCodeButton.setOnClickListener(sendCodeButtonClickListener); tel1Text = (EditText) findViewById(R.id.tel1); tel2Text = (EditText) findViewById(R.id.tel2); control = IMControl.getInstance(); control.setServer(serverProvider.getServerInfo()); connectAction(); }