Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set IS_TESTING Environment Variable for Android #25695

Closed
amadeu01 opened this issue Jul 17, 2019 · 2 comments
Closed

How to set IS_TESTING Environment Variable for Android #25695

amadeu01 opened this issue Jul 17, 2019 · 2 comments
Labels
Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon. Type: Docs Issues concerning the docs are tracked elsewhere: https://github.com/facebook/react-native-website

Comments

@amadeu01
Copy link

Here at https://facebook.github.io/react-native/docs/debugging#warnings is mention the variable

The usage of the variable can be found here:

constants.put(
"isTesting", "true".equals(System.getProperty(IS_TESTING)) || isRunningScreenshotTest());
constants.put("reactNativeVersion", ReactNativeVersion.VERSION);

However, I'm not sure we are able to change the value from gradle config or any sort of build configuration.

Also, I opened a question here
regarding to how set environment variable on android and the comment

the application code is running in Android, not on your development machine. There are no configurable system properties in Android, short of creating a custom ROM. If you want to have a system property on your development machine be embedded in your Android app. have your Gradle script use buildConfigField to put the system property value into BuildConfig, or use resValue to put the system property value in a string resource

suggest that is not possible to change the System.property of the emulator, or device.

@amadeu01 amadeu01 added the Type: Docs Issues concerning the docs are tracked elsewhere: https://github.com/facebook/react-native-website label Jul 17, 2019
@react-native-bot react-native-bot added the Platform: Android Android applications. label Jul 17, 2019
@stale
Copy link

stale bot commented Oct 15, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 15, 2019
@stale
Copy link

stale bot commented Oct 22, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Oct 22, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon. Type: Docs Issues concerning the docs are tracked elsewhere: https://github.com/facebook/react-native-website
2 participants