Reputation: 89
I want to get the starting time of the running application process
is it possible or not
thanks
Upvotes: 0
Views: 253
Reputation: 4638
You can use Application for this. In Application you will have oncreate That is the exact Application Launching time. its also like as Activity only.
public class Ap extends Application {
@Override
public void onCreate() {
// TODO Auto-generated method stub
super.onCreate();
}
}
in manifest you need to add this as like as follow
<application
android:allowBackup="true"
android:name="Ap"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
hope this will help you.
Upvotes: 0
Reputation: 49
You could get the value from the System.getCurrentTimeMillis() at the beginning of your first activity and use it for your purpose.
Upvotes: 1