意图这东西说来也是奇怪,但总体来说意图主要有两种用途。 1.调用statractivity启动Activity 这里有显示意图和隐士意图 2.启动startrever启动服务
Intent intent
=new Intent(services
.this,MyService
.class);
startService(intent
);
3.启动广播发送者 Intent intent=new Intent(); intent.setAction(“Help”); //startActivity(intent); sendBroadcast(intent);
我觉得这篇解析,写的就挺不错的https://www.jianshu.com/p/67d99a82509b