Created
April 27, 2016 02:19
-
-
Save julioz/49ead7afabb3cff3f46f812e4e5aa67d to your computer and use it in GitHub Desktop.
Rotina de atualização de um app
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
Edits edits = publisher.edits(); | |
Apks apks = edits.apks(); | |
File apkFile = new File(APP_APK_PATH); | |
FileContent apkContent = new FileContent(APK_MIME_TYPE, apkFile); | |
Apk apk = apks.upload(PACKAGE, transactionId, apkContent).execute(); | |
int versionCode = apk.getVersionCode(); | |
Tracks tracks = edits.tracks(); | |
List<Integer> versions = Collections.singletonList(versionCode); | |
Track track = new Track().setVersionCodes(versions); | |
tracks.update(PACKAGE, transactionId, trackId, track).execute(); | |
Apklistings apklistings = edits.apklistings(); | |
ApkListing whatsnew = new ApkListing().setRecentChanges(whatsNewDescription); | |
apklistings.update(PACKAGE, transactionId, versionCode, language, whatsnew).execute(); | |
edits.validate(PACKAGE, transactionId).execute(); | |
edits.commit(PACKAGE, transactionId).execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment