Android Open Source - AndroidCloud Message Activity






From Project

Back to project page AndroidCloud.

License

The source code is released under:

GNU General Public License

If you think the Android project AndroidCloud 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 com.twlkyao.androidcloud;
//from www. ja v a2s. c  o  m
import com.twlkyao.utils.ExportSms;
import com.twlkyao.utils.ImportSms;
import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.widget.Button;

public class MessageActivity extends Activity {

  // Buttons to operate Sms.
  private Button backupSmsButton;
  private Button recoverSmsButton;
    
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_message);
    findViews();
    setListeners();
  }

  /**
   * Find the Views on the layout file.
   */
  public void findViews() {
    backupSmsButton = (Button) this.findViewById(R.id.backupSms);
    recoverSmsButton = (Button) this.findViewById(R.id.recoverSms);
  }
  
  /**
   * Set listeners for the Buttons.
   */
  public void setListeners() {
  
  /**
   * Backup Sms Button Listener.
   */

  backupSmsButton.setOnClickListener(new View.OnClickListener() {
  
    @Override
    public void onClick(View v) {
      // TODO Auto-generated method stub
      ExportSms exportSmsXml = new ExportSms(getApplicationContext());
        try {
          exportSmsXml.createXml();
        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
    });
    
    /**
     * Recover Sms Button Listener.
     */
    recoverSmsButton.setOnClickListener(new View.OnClickListener() {
    
      @Override
      public void onClick(View v) {
        // TODO Auto-generated method stub
        ImportSms importSms = new ImportSms(getApplicationContext());
        importSms.InsertSMS();
      }
    });
  }
}




Java Source Code List

com.twlkyao.androidcloud.ApkValidate.java
com.twlkyao.androidcloud.ContactsActivity.java
com.twlkyao.androidcloud.FileListAdapter.java
com.twlkyao.androidcloud.KuaipanDiskActivity.java
com.twlkyao.androidcloud.LoginActivity.java
com.twlkyao.androidcloud.MainActivity.java
com.twlkyao.androidcloud.MessageActivity.java
com.twlkyao.androidcloud.ObserverService.java
com.twlkyao.androidcloud.RegisterActivity.java
com.twlkyao.androidcloud.SetEncryptLevelActivity.java
com.twlkyao.androidcloud.StartUpReceiver.java
com.twlkyao.dao.DaoMaster.java
com.twlkyao.dao.DaoSession.java
com.twlkyao.dao.FileInfoDao.java
com.twlkyao.dao.FileInfo.java
com.twlkyao.kuaipan.DownloadTask.java
com.twlkyao.kuaipan.MkdirTask.java
com.twlkyao.kuaipan.RequestBase.java
com.twlkyao.kuaipan.ResultBase.java
com.twlkyao.kuaipan.TransportListener.java
com.twlkyao.kuaipan.UploadTask.java
com.twlkyao.utils.ApkOperation.java
com.twlkyao.utils.ConstantVariables.java
com.twlkyao.utils.ExportSms.java
com.twlkyao.utils.FileDEncryption.java
com.twlkyao.utils.FileOperation.java
com.twlkyao.utils.ImportSms.java
com.twlkyao.utils.LogUtils.java
com.twlkyao.utils.SmsField.java
com.twlkyao.utils.SmsItem.java
com.twlkyao.utils.StringSplice.java