我有服务A和B;服务A启动服务B.
服务A:
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Intent serviceB = new Intent(this, ServiceB.class);
startService(serviceB);
...
Toast.makeText(getApplicationContext(),"A",Toast.LENGTH_SHORT).show();
}
服务B:
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Toast.makeText(getApplicationContext(),"B",Toast.LENGTH_SHORT).show();
...
}
此代码显示Toast A,然后显示Toast B.如何在服务B上的Toast上显示服务A上的Toast?