Skip to content

Image Uploads to Drive

Compare
Choose a tag to compare
@MrPickles MrPickles released this 17 Apr 21:07
· 34 commits to master since this release

This release allows image uploads to Google Drive and adds support for the new app of the week.

You will need to enable the Drive API on the Google Developer Console. Instructions to do so are in a new section in the README.

Here are the API Changes.

  • There's a new method to allow uploads to Drive. It takes in the folder ID, desired file name, and the image to upload as a bitmap.
public void uploadToDrive(String folderId, String fileName, Bitmap image);
  • Due to the new public method, there is a new Action enum to support (REQUEST_CONNECTION_RESOLUTION) when implementing Host.getRequestCode(Action action).
public enum Action {
  REQUEST_PERMISSIONS,
  REQUEST_ACCOUNT_NAME,
  REQUEST_PLAY_SERVICES,
  REQUEST_AUTHORIZATION,
  REQUEST_CONNECTION_RESOLUTION
}
  • There's also a new TestType enum for the new app.
Sheets.TestType.INDOOR_WALKING

The sample app has been adjusted to show the usage for the new API.