Setting release channel for detached Android app


This question seems to have been answered before, but, to the best of my knowledge, the current answer doesn’t seem to line up with the files that actually show up in a detached project.

The Expo docs state that the release channel should be changed in, but this file doesn’t exist in my detached project (SDK 28). My experience here seems to line up with comments in this forum post, and this GitHub issue. We don’t have a file in main/java/host/exp/exponent. Instead, there’s an file in main/java/host/exp/exponent/generated. This file does have a RELEASE_CHANNEL variable, but it also has some “embedded responses” code that appears to be autogenerated. I’m guessing this file is affected by the contents of and is altered by the build process, so I’m not sure I really should be changing it.

Long-story short, looking for clarification as to what we’re actually supposed to change in an Android project in order to change the release channel. I don’t think it’s, because none of us seem to have that file. Thanks!

Bumping this because I’ve reached the point where I’m writing defensive code to account for the fact that I don’t really know what I’m supposed to be changing here :-).

Hi @llamaluvr - sorry for the confusion here. is the correct file to modify. I’m updating the docs accordingly right now.

Thanks! If you could specify whether we’re supposed to do anything with those embeddedResponses variables, that’d be great, too.

Also curious if we need to change the publishedUrl in I forget where, but someone on an issue or stackoverflow mentioned changing MainActivity to include the release channel in the URL, like:

  public String publishedUrl() {
    return "exp://";

I originally did just this and didn’t even touch AppConstants, and it seemed like it actually worked as expected!

@llamaluvr no, you should leave the embeddedResponses alone. And there shouldn’t be any need to include the release channel directly in the publishedUrl return value – just updating the value in should do the trick.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.