1
如何使用意向过滤器和意向过滤器将消息从一个活动发送到另一个活动?通过意向过滤器发送消息
如何使用意向过滤器和意向过滤器将消息从一个活动发送到另一个活动?通过意向过滤器发送消息
使用意向
Bundle extras = new Bundle();
extras.putString("my.unique.extras.key", "this is my message");
myIntent.putExtras(extras);
的putExtras(Bundle)方法然后在Intent您检索的额外
Bundle extras = this.getIntent().getExtras();
if (extras != null) {
if (extras.containsKey("my.unique.extras.key")) {
this.setTitle(extras.getString("my.unique.extras.key"));
}
}