Is there any way to find out where the APK file downloaded from?

I have to make my apk downloaded from several websites (not the google store)
and make them works with their own server url.

At first I was going to use webbrowser’s cookie to store informations
but it failed giving me the knowledge that the cookies are not shared with different apps.

thought about making a temporary file to store informations the intalled app would use but
maybe that won’t be welcomed by the players.

In fact, I don’t think it’s possible but I heard
that there ARE many developers who already done this. (No evidence at all btw)

As so, I want to borrow your kind ideas or solutions.
Thx

APK holds no such data. The only thing that is checked before APK installation is started is if the APK is signed. It can only remain signed if it wasn’t tempered with. That the only thing the “allow APKs from unknown sources” does.

You’re going to have to build and publish multiple APKs, one for every server. I welcome any corrections.

And where would you get that data before APK is even installed?

It sounds wierd right? But someone’s telling me it’s possible and never give me any clue.
That’s why I tried browser cookie. (which not worked)