I have only been able to find solutions for getting the status bar to change colour while the app is running. And I have successfully done it but I need it to remain the new colour when the app is put into the background (like when the user hits the home button). Similar to how the status bar changes colour when you call somebody and hit the home button.
In my OnCreate method I have:
Window window = this.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
SystemBarTintManager tintManager = new SystemBarTintManager(this);
tintManager.setStatusBarTintEnabled(true);
tintManager.setStatusBarTintColor(Color.GREEN);
tintManager.setStatusBarTintEnabled(true);
So the solutions I found heavily depend on the app being open. When the user hits the home button the colour for the status bar "shrinks" with the rest of the app.