1

I'm using the Android Management API to provision kiosk tablets. I'm going through app testing - note that I'm using managed google play, and that this app is tied to an organization. I was able to provision via QR code, it downloaded the app to all of our devices (we have a separate policy per device). This all went swimmingly, really appreciate everyone that worked on this... it has made my life easier!

I didn't realize during this process that you could specify track id's; I had just pushed the app to the production track. Going forward, I want to provision devices with either alpha, beta, or internal app testing tracks. I did a release for internal 3 days ago, and a release for alpha and beta respectively yesterday. I created a new policy for a new test device and specified the track ids. I've done one id a time, just wanting to test that it downloads the app version from the track, and have also done it where I have specified all 3 track ids in the policy. No matter, it keeps downloading the version that I have on production track. For reference, the prod. version code is 5 @ 0.1.3, and the other 3 tracks are all higher version codes: Internal, 7 @ 0.1.4; Alpha, 10 @ 0.1.4, and Beta, 9 @0.1.4.

Am I misunderstanding how all of this is supposed to work? I'm wondering if perhaps not enough time has passed, that maybe the app's track info is just not updated yet. When I query enterprises.applications.get for the app, the appTracks[] are empty.

Side note, if I try to set a min. version code that is > 5, I get this error message: "Invalid minimum version code 7 for <app_name>. The published version code is 5".

  1. How and when will my app get updated with the track releases I've created?
  2. When the app does get the track updates, am I doing this correctly via the policies?
  3. Once I'm able to provision an app that corresponds to the track, am I still bound by the 'published' version code? Meaning, if my test tracks are of a higher version code, can they be recognized and a higher minimum set for these these tracks on the policy?

Hope this is all clear enough; I could be misunderstanding. I appreciate any help.

theDude
  • 132
  • 1
  • 9
  • I'm also struggling with the same issue, did you manage to solve this? – Johan Ferreira Feb 07 '21 at 12:57
  • @Johan I've just now gotten back to this. I have an app on the production track (although it's technically still not live yet), and did a build last night to open testing. It is 1.0.19, while the production is 1.0.18. I did a policy and put the track ID in there for the open testing deployment. Just deployed it, but the app info still says 1.0.18 (the production one). I'll have to keep looking. Did you find anything out? – theDude Mar 09 '21 at 17:39

1 Answers1

1

For the release tracks to be available to your organization, you have to add the enterprise ID in the track under Manage testers > Organizations. For reference, you can check this link under Add organizations to the test section.

Once the track is added, it should be shown in the appTracks[] when calling enterprises.applications.get.

Track ID is added under Application Policy with the accessibleTrackIds field.

Your policy should look similar to this one:

{
                "packageName": "this.is.an.app",
                "installType": "FORCE_INSTALLED",
                "accessibleTrackIds":[
                    "XXXXXXXXXXXXXXXXXX"
                ]
            }
}
Kevin
  • 321
  • 2
  • 19
  • 1
    Although I originally add the enterprise at some point (and could have sworn that it still wasn't picking up my test track), this is indeed what you need to do. Follow the docs as the answer suggests. Though suggested/documented, the two big things I feel like people will miss are: 1) Make sure your enterprise ID is made available to the test track via the Play Console, and 2) Make sure your version code is HIGHER than whatever you have on the production release track. – theDude Jul 28 '21 at 22:59