A Product Management System was under development by vteam #266. This application should be different from such products available in market, which target mostly technical persons but our customer required that this PMS application should benefit non-technical people equally. While working on this application, Google Drive API integration was required so that App Users:
- Would be able to upload files directly from this application
- Would be able to add/attach file with the product by selecting from files list
- Could be able to share files with all product users just a single click away
- Could download files
The major challenge was that users should be able to perform all operations right directly from this application, instead of going to and signing in to Google Drive for performing some operations as per our Client’s requirement. The limitation was that PHP API was getting the list of only those files which were uploaded through this PMS application.
Our engineer Sabeeh Faseeh had two options; Either to use PHP API for performing all file operations or use Google Picker App to meet this requirement.
To achieve the required functionality, Sabeeh had to use both PHP API and Google Picker App. Google Picker App was the right solution for uploading files to Google Drive and adding it to the product as it provides pretty good interface. As far as sharing file with all product users was concerned, PHP API was a better solution, otherwise users would have to go to Google Drive page and enter email addresses of all the product users manually, which was definitely not a good way. Client wanted it to be done by just a single click.
Google Picker would start working with an already running Google session in your browser window. But if a user wants to use a different Google Login for this PMS application, then it would not match with PHP API. This thing was not acceptable because this application’s purpose was to provide a seamless experience for the product user. Reason being that Google Picker was in its initial stages at that time. If it was not tied to OAuth token, then it was picking up the existing Google session but as far as PHP API was concerned, it required OAuth token. Our engineer did a little hack and created a component for establishing harmony between these two libraries.