回答

0

您可以用發射方式幫助

去體現您的活動被宣佈實現這一目標。 併爲您的活動聲明添加以下屬性。

機器人:launchMode = 「singleTask」

而在你的活動類ovveride以下方法

public void onNewIntent(Intent intent) { 
    setIntent(intent); 
    //do other stuff with new intent 
} 

我也建議你閱讀更多關於活動的啓動模式https://developer.android.com/guide/topics/manifest/activity-element.html

+0

感謝。它運作良好, –

相關問題