chinh
chinh

Reputation: 291

Is there way to determine if apps has just finished installing the first time?

My app download 5 files .apk from internet and after each file of 5 install successful first time, I want to send device id to the server.

so is there way to check apps installed success the first time

Upvotes: 0

Views: 291

Answers (2)

Nargis
Nargis

Reputation: 4787

you can track your app usage and other statistics through Google Analytics.You can also send any data like device id through Google Analytics to Google Analytics Site.

Upvotes: 1

MysticMagicϡ
MysticMagicϡ

Reputation: 28823

You can get first installation time using

Date app_install_date = null;
long installation_date = context.getPackageManager()
                    .getPackageInfo(context.getPackageName(), 0).firstInstallTime;
app_install_date = new Date(installation_date);

I think you can compare that to current time and do what you require.

Upvotes: 5

Related Questions