What is the InstallerPackageName when app is in "pending publication" phase and used/reviewed by reviewers/testers (Google Play Store)?
<p><strong>SITUATION</strong></p>

<p>I have a <strong>set of functionalities in my app which changes based on the store it is installed from</strong>. E.g. I want to have a more restricted set of advertisements displayed for family audiences and children to be eligible for the <code>Google Play for Education</code> category. In other stores i still want to restrict but don't want to be as stringent as I will be in filtering out the ads.</p>

<p>General observation at my end is that if I opt-in for "Google Play for Education" category it takes a few more hours to get published because of the following (as stated on the developer console):</p>

<blockquote>
  <p>Checking this box submits this app for inclusion in the "educator
  recommended" section of Google Play for Education. The final decision
  on which apps to recommend is made by a 3rd party network of teachers.
  If your app is selected, we will notify you by e-mail. If not, your
  app will still be searchable in Google Play for Education.</p>
</blockquote>

<p>Now before the app gets published in this category the network of teachers, I assume, download and test/verify if the guidelines are met and there are no violations.</p>

<p><strong>PROBLEM</strong></p>

<p>To differentiate between the store installed from I'm obviously using this:</p>

<pre><code>    PackageManager packageManager = context.getPackageManager();
    String installer = packageManager.getInstallerPackageName(packageName);

    if (installer == null) installer = ""; //to avoid NPE

    if (installer.equals("com.android.vending")) {
        //It is installed from Google Play store
        //PROBLEM: THIS DOES NOT SEEM TO BE THE PACKAGE NAME RETURNED
        //WHEN GOOGLE PLAY REVIEWERS/TESTERS ARE USING THE APP
    }
    else ... 
    ....
    ....
    //similarly handling other stores here
    ....
    ....
    ....
    //After that also checking by installed app stores
    ....
    ....
</code></pre>

<p><strong>What is happening:</strong> After being published things app properly identifies that it is downloaded from play store i.e. it gets <code>com.android.vending</code> as the installerPackageName. But, <strong>when it is being reviewed or tested by the network of teachers it appears to be getting a different installerPackageName. This is causing the app to think it has been downloaded from an app store other than Google Play Store.</strong> And because of this my app is rejected from the Education category. I need to know this installer package name to handle the scenario correctly.</p>

<p><strong>How do i know this:</strong> I have a dedicated ad unit id to use when the detected app store is Google Play and all requests post successful publication (i.e. from the regular play store users) come to this google dedicated ad unit id. But, <strong>in the short span of time after submitting the app/update and before the app or and update is published</strong>, a few requests come to the non-google ad unit ids, causing the app to fail adherence to the guidelines to be eligible for "Google Play for Education" category. Because, the level of ad filtering in the non-google ad unit ids is slightly less. Hence the teachers evaluating/testing the app see some ads that they think are not as per guidelines and reject it.</p>

<p>Also, <a href="http://techcrunch.com/2015/03/17/app-submissions-on-google-play-now-reviewed-by-staff-will-include-age-based-ratings/" rel="noreferrer">here is an article</a> to support the fact that the app gets reviewed manually as well as by automated script before it is actually published to the store.</p>

<p><strong>Current fix or limitation:</strong> I've disabled all other ad networks and have to use only admob. The setting of filters even at the strictest level in other ad networks doesn't seem to filter all ads that Google reviewers think are not suitable for children and family audiences. When using only admob the process is smooth and I always qualify.</p>

<p><strong>What I'm looking for to overcome this problem:</strong> If i get to know the installerPackageName that is returned when the app is installed from where ever the reviewing network of teachers install the app from, I can handle that case exactly as i handle when i get <code>com.android.vending</code> and everything will be just fine.
I could not find any documentation or reference to obtain this information.</p>

<p>Also, if there is any other way i can identify it the app is in <code>pending publication</code> stage, I force all requests to go to the google ad unit id.</p>

<p><strong>ASSUMPTION:</strong> There is a separate installer app for the reviewers and testers (automated/manual what ever it may be in the background) whose installerPackageName is NOT <code>com.android.vending</code>. If there is some Google guy around and can help confirm this (if allowed by Google), do comment. :-)</p>

<p><strong>Other possibilities which i do not want to go with</strong></p>

<p>Disable all other networks manually while the app is in <code>pending publication</code> phase and re-enable them once published. But, I don't want to do this because this would be like bluffing google and I don't want to go that way. I want my app logic to take care of it so that the same thing that is reviewed is let out in market.</p>

<p>I permanently stick with only admob. But this would be foolish as there are no such restrictions in other stores that I'm publishing my apps to and I will terribly lose on fill rate.</p>

<p>I there anyone who has had this issue before <strong>OR</strong> knows the installerPackageName for the review's download place <strong>OR</strong> knows how to determine if the app is currently in 'pending publication` state on playstore?</p>

<p>I can also possibly filter all by packagenames starting with <code>com.android</code> or <code>com.google</code>, but I want to keep that as last option. Also, would like to know if the installerPackage name is not set at all in case of those users. In that case I'll need to look at a completely different situation to handle the situation.</p>