v0.8.2: added some basic support for demo and instant app functionality

This commit is contained in:
Evan Debenham
2020-07-25 16:15:33 -04:00
parent 666e009334
commit 6cca2154d6
11 changed files with 124 additions and 22 deletions

View File

@@ -29,6 +29,11 @@ public class DebugUpdates extends UpdateService {
private static AvailableUpdateData debugUpdateInfo;
@Override
public boolean isUpdateable() {
return false; //turn on to debug update prompts
}
@Override
public void checkForUpdate(boolean useMetered, UpdateResultCallback callback) {
@@ -37,18 +42,11 @@ public class DebugUpdates extends UpdateService {
return;
}
//turn on to test update UI
if (false){
debugUpdateInfo = new AvailableUpdateData();
debugUpdateInfo.versionCode = Game.versionCode+1;
debugUpdateInfo.URL = "http://www.google.com";
debugUpdateInfo = new AvailableUpdateData();
debugUpdateInfo.versionCode = Game.versionCode+1;
debugUpdateInfo.URL = "http://www.google.com";
callback.onUpdateAvailable(debugUpdateInfo);
} else {
debugUpdateInfo = null;
callback.onNoUpdateFound();
}
callback.onUpdateAvailable(debugUpdateInfo);
}
@@ -57,4 +55,14 @@ public class DebugUpdates extends UpdateService {
DeviceCompat.openURI( update.URL );
}
@Override
public boolean isInstallable() {
return false; //turn on to test install prompts
}
@Override
public void initializeInstall() {
//does nothing
}
}