Created
February 3, 2012 13:04
-
-
Save Amokrane/1730078 to your computer and use it in GitHub Desktop.
AB Testing on Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final boolean isA = UUID.randomUUID().getLeastSignificantBits() % 2 == 0; | |
@Override | |
public void onCreate(...) { | |
super.onCreate(saved...); | |
if(!isA) { | |
setContentView(R.layout.mainA); | |
MyApp.getInstance().tracker().trackPageView("/AUser"); | |
} else { | |
setContentView(R.layout.mainB); | |
MyApp.getInstance().tracker().trackPageView("/BUser"); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment