Skip to content

Instantly share code, notes, and snippets.

@SanojPunchihewa
Last active August 2, 2019 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SanojPunchihewa/73642e402280e3f5a444a73ae9b41739 to your computer and use it in GitHub Desktop.
Save SanojPunchihewa/73642e402280e3f5a444a73ae9b41739 to your computer and use it in GitHub Desktop.
Initialize the UpdateManager in Activity
// Declare the UpdateManager
UpdateManager mUpdateManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Initialize the Update Manager with the Activity and the Update Mode
mUpdateManager = UpdateManager.Builder(this).mode(UpdateManagerConstant.FLEXIBLE);
// Call start() to check for updates and install them
mUpdateManager.start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment