![](/img/trans.png)
[英]Software deleting the Android application from the list of recent applications
[英]Removing an application from recent applications stack android
我現在要從地圖應用程序中按“后退”按鈕,從應用程序中啟動內置地圖應用程序。我需要從最近的堆棧中清除地圖應用程序,因為它與我的應用程序無關,沒有用。
如果我正確理解您的問題,那么這就是您的答案。
Intent intent = new Intent(FirstActivity.this,
SecondActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
嘗試這個 ;
您可能需要使用Map應用程序的“ getPackageManager()”獲取程序包名稱,然后獲取其進程ID,然后在退出應用程序時停止Map應用程序。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.