Android Open Source - TurkcellUpdater_android_sdk Splash Activity






From Project

Back to project page TurkcellUpdater_android_sdk.

License

The source code is released under:

Apache License

If you think the Android project TurkcellUpdater_android_sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package tr.com.turkcellteknoloji.turkcellupdatersampleapp;
/*from  w w  w . ja  v  a  2 s.  c om*/
import java.io.Serializable;

import tr.com.turkcellteknoloji.turkcellupdater.Message;
import tr.com.turkcellteknoloji.turkcellupdater.UpdaterDialogManager;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import tr.com.turkcellteknoloji.turkcellupdatersampleapp.R;

public class SplashActivity extends Activity implements UpdaterDialogManager.UpdaterUiListener {
  Message message;

  private EditText serverAddressEditText;

  private CheckBox postPropertiesCheckBox;

  private Button startUpdateCheckButton;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setTheme(android.R.style.Theme_NoTitleBar);
    setContentView(R.layout.activity_splash);
    serverAddressEditText = (EditText) findViewById(R.id.serverAddressEditText);
    postPropertiesCheckBox = (CheckBox) findViewById(R.id.postPropertiesCheckbox);
    startUpdateCheckButton = (Button) findViewById(R.id.startUpdateCheckButton);
    startUpdateCheckButton.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        v.setEnabled(false);
        UpdaterDialogManager updaterUI = new UpdaterDialogManager(serverAddressEditText.getText().toString());
        updaterUI.setPostProperties(postPropertiesCheckBox.isChecked());
        updaterUI.setPostProperties(true);
        updaterUI.startUpdateCheck(SplashActivity.this, SplashActivity.this);
      }
    });

  }

  @Override
  public void onExitApplication() {
    finish();
  }

  @Override
  public void onUpdateCheckCompleted() {
    final Intent intent = new Intent(this, LoginActivity.class);
    intent.putExtra("message", (Serializable) message);
    startActivity(intent);
    finish();
  }

  @Override
  public boolean onDisplayMessage(Message message) {
    // To automatically display message:
    // return false;
    this.message = message;
    return true;
  }
}




Java Source Code List

tr.com.turkcellteknoloji.turkcellupdater.Configuration.java
tr.com.turkcellteknoloji.turkcellupdater.DownloadHandler.java
tr.com.turkcellteknoloji.turkcellupdater.DownloadRequest.java
tr.com.turkcellteknoloji.turkcellupdater.Filter.java
tr.com.turkcellteknoloji.turkcellupdater.FilteredEntry.java
tr.com.turkcellteknoloji.turkcellupdater.LocalizedStringMap.java
tr.com.turkcellteknoloji.turkcellupdater.Log.java
tr.com.turkcellteknoloji.turkcellupdater.MessageDescription.java
tr.com.turkcellteknoloji.turkcellupdater.MessageDisplayRecords.java
tr.com.turkcellteknoloji.turkcellupdater.MessageEntry.java
tr.com.turkcellteknoloji.turkcellupdater.Message.java
tr.com.turkcellteknoloji.turkcellupdater.Properties.java
tr.com.turkcellteknoloji.turkcellupdater.RestFailureHandler.java
tr.com.turkcellteknoloji.turkcellupdater.RestJsonObjectResultHandler.java
tr.com.turkcellteknoloji.turkcellupdater.RestNoValueResultHandler.java
tr.com.turkcellteknoloji.turkcellupdater.RestRequest.java
tr.com.turkcellteknoloji.turkcellupdater.UpdateDescription.java
tr.com.turkcellteknoloji.turkcellupdater.UpdateEntry.java
tr.com.turkcellteknoloji.turkcellupdater.UpdateManager.java
tr.com.turkcellteknoloji.turkcellupdater.Update.java
tr.com.turkcellteknoloji.turkcellupdater.UpdaterDialogManager.java
tr.com.turkcellteknoloji.turkcellupdater.UpdaterException.java
tr.com.turkcellteknoloji.turkcellupdater.Utilities.java
tr.com.turkcellteknoloji.turkcellupdater.VersionsMap.java
tr.com.turkcellteknoloji.turkcellupdater.package-info.java
tr.com.turkcellteknoloji.turkcellupdatersampleapp.LoginActivity.java
tr.com.turkcellteknoloji.turkcellupdatersampleapp.SplashActivity.java