Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当用户单击通知时,我看不到如何启动两者。
我认为答案是肯定的,但不是直接的。
您可以指定一个额外的意图是否启动服务并在您的活动启动时解析这个额外的内容。如果需要,活动可以相应地启动服务。
如果您不想弄乱您当前的活动,您可以创建另一个活动“A”来启动您的活动“B”和您的服务,并从待处理的意图启动活动 A