2013-02-19 71 views
0

的時候,我想運行的應用程序我想啓動應用

的開始時間是有可能還是不

感謝

+0

類似:http://stackoverflow.com/questions/5552125/running-process-start-time和http://stackoverflow.com/questions/3677229/how-to-find-out-the-running-start安卓應用程序的時間 – 2013-02-19 12:11:49

+0

你想要什麼時間,作爲日誌語句或吐司或其他方式? – 2013-02-19 12:19:06

+0

任何事情都很好 – saritha 2013-02-19 12:30:56

回答

1

你可以得到的價值System.getCurrentTimeMillis()在您的第一個活動的開始,並將其用於您的目的。

+0

但我想獲得正在運行的應用程序進程開始時間 – saritha 2013-02-19 13:06:26

0

您可以使用此應用程序。在應用程序中,您將創建這是確切的應用程序啓動時間。它也像活動一樣。

public class Ap extends Application { 
@Override 
public void onCreate() { 
    // TODO Auto-generated method stub 
    super.onCreate(); 
} 
} 

清單中,你需要添加此像爲遵循

<application 
     android:allowBackup="true" 
     android:name="Ap" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 

希望這會幫助你。

+0

但我想從應用程序中只知道正在運行的應用程序進程開始時間 – saritha 2013-02-19 13:07:08

+0

? – itsrajesh4uguys 2013-02-19 13:19:11

相關問題