1

I need to know how can I know from where to application apk downloaded from so I can make layout changes according to the download source?

Is there a way knowing it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Adler
  • 1,432
  • 3
  • 15
  • 27

1 Answers1

1

No. You cannot get from the android system where the APK is downloaded from.

But you could use different signatures for different sources and do as I explained here:
Supporting Amazon and Android market (Google Play) links inside application

What I explain in the above question is specific to an app for amazon and an app for Android Market, but the same approach applies - as far as checking signatures and things.

Community
  • 1
  • 1
Reed
  • 14,703
  • 8
  • 66
  • 110
  • I don't see INSTALL_REFERRER in the official documentation, so it is not a viable solution. And regardless, if you downloaded the app from an email or website or whatever - or if it were moved from computer to their SD card, the only thing that Android would possibly be able to tell you is that the install happened from a file on the sdcard, or that it was installed with the market app. But INSTALL_REFERRER still is not something that should be used because it is not in the official docs from what I could find. – Reed Dec 22 '11 at 09:53
  • see http://code.google.com/intl/iw-IL/apis/analytics/docs/mobile/android.html#referrals – Adler Dec 22 '11 at 12:31
  • It may show you what installed it - Market/built in installer/etc but there is no way that it would be able to track where it was actually downloaded from because that information is not on the .apk file that was downloaded unless you hardcoded it prior to the download. – Reed Dec 22 '11 at 12:42