@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    state = savedInstanceState;
    data = getIntent().getExtras();

    // Mark as read
    SMILMessageProxy sm = SMILActivity.inbox.get(data.getInt("index"));
    AsyncFetchSMILMessage async = new AsyncFetchSMILMessage(this);
    sm = async.editMessage(sm);
    sm.setRead(true);
    async.updateMessage(sm);

    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.message_view);

    SharedPreferences myPrefs = this.getSharedPreferences("username", MODE_WORLD_READABLE);
    autoPlay = myPrefs.getBoolean("autoPlay", true);

    alertAutoPlay = new AlertDialog.Builder(this).create();
    alertAutoPlay.setTitle("Did you know?");
    alertAutoPlay.setMessage(
        "If you turn your phone into landscape mode the message will automatically play. Turn your phone back up to return to the message screen.");
    alertAutoPlay.setButton(
        "Let me try!",
        new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int which) {
            return;
          }
        });
    alertAutoPlay.setButton2(
        "Not for me! (disable feature)",
        new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int which) {
            SharedPreferences.Editor myPrefEdit =
                ViewMessageActivity.this
                    .getSharedPreferences("username", MODE_WORLD_READABLE)
                    .edit();
            myPrefEdit.putBoolean("autoPlay", false);
            myPrefEdit.commit();
            ViewMessageActivity.autoPlay = false;
            playMessage(true);
            return;
          }
        });

    _actionBar = (ActionBar) findViewById(R.id.actionBar);
    _actionBar.setTitle("Message Details");
    _actionBar.setHomeListener(
        new OnClickListener() {
          public void onClick(View v) {
            ViewMessageActivity.this.finish();
          }
        });

    workingDir += "/" + data.getString("title");

    items = new ScrollItemManager(findViewById(R.id.scrollHolder));
    items.addItem(getApplicationContext(), true);
    items.setTitle(data.getString("title"));
    items.setIcon(R.drawable.ic_home);
    items.setListener(this, 1);
    TextView item1Text1 = new TextView(this);
    item1Text1.setText(
        "From: " + data.getString("Sender") + "                   on " + data.getString("date"));
    item1Text1.setTextColor(Color.BLACK);
    items.addToLinear(item1Text1);

    items.addItem(getApplicationContext(), true);
    TextView item2Text1 = new TextView(this);
    item2Text1.setText("Subject:");
    item2Text1.setTextColor(Color.BLACK);
    TextView item2Text2 = new TextView(this);
    item2Text2.setText(data.getString("message"));
    item2Text2.setTextColor(Color.BLACK);
    items.addToLinear(item2Text1);
    items.addLine(getApplicationContext());
    items.addToLinear(item2Text2);

    items.addItem(getApplicationContext());
    items.setTitle("Play Message");
    items.setListener(this, 1);

    items.addItem(getApplicationContext());
    items.setTitle("Reply");
    // items.setListener(this, 1);

    items.addItem(getApplicationContext());
    items.setTitle("Forward");
    items.setListener(this, 2);

    items.addItem(getApplicationContext());
    items.setTitle("Reset Preference");
    items.setListener(this, 3);
  }