这是任何需要它的人的代码示例...
列表消息
public void next() {
Intent intent = new Intent(getApplicationContext(), ViewMessages.class);
startActivity(intent);
}
查看消息
public void next() {
Intent intent = new Intent(getApplicationContext(), AckMessage.class);
startActivityForResult(intent, 0);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != Activity.RESULT_OK) return;
finish();
}
确认消息
public void next() {
Intent intent = new Intent(getApplicationContext(), ReplyMessage.class);
startActivityForResult(intent, 0);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != Activity.RESULT_OK) return;
setResult(Activity.RESULT_OK);
finish();
}
回复消息
public void complete() {
setResult(Activity.RESULT_OK);
finish();
}