I need to know which store is the App's installer so that I know which store to communicate with for in-App purchase functionality.
Is the definitive 100% reliable approach to generate two separate binaries? Or is there a 100% reliable code-based runtime approach?
There are many similar Stackoverflow questions. All have answers that suggest using methods like getInstallerPackageName on the PackageManager class. All also have comments or conflicting answers saying that this is not a reliable approach, suggesting that the only way to reliably check which store installed a given App is to generate two separate binaries, each with a storeFlag set, and upload one binary to Amazon and one to Google Play.
 
     
    