Skip to content

Instantly share code, notes, and snippets.

@julioz
Last active April 27, 2016 01:19
Show Gist options
  • Save julioz/9b272eb0cce728dfe6a868087d14a532 to your computer and use it in GitHub Desktop.
Save julioz/9b272eb0cce728dfe6a868087d14a532 to your computer and use it in GitHub Desktop.
Upload do APK
private static final String APK_MIME_TYPE = "application/vnd.android.package-archive";
...
Edits edits = publisher.edits();
Apks apks = edits.apks();
File apkFile = new File(APP_APK_PATH); // File pointing to the new APK to be uploaded
FileContent apkContent = new FileContent(APK_MIME_TYPE, apkFile);
Apk apk = apks.upload(PACKAGE, transactionId, apkContent).execute();
int versionCode = apk.getVersionCode();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment