Android App + Cordova + HTML5 + Google Drive Api -


i developed html5 page list google drive files , test phonegap server. works fine, because created oauth2 http://localhost:3000 configured.

when tried test apk file, sha1 (also configured on oauth2 in google drive console), received error:

refused display 'https://accounts.google.com/o/oauth2/auth?client_id=<key>' in frame because set 'x-frame-options' 'sameorigin'. understand error because oauth2 doesn't expect origin. origin not http, if file know... (file:///android_asset/www/index.html). googleapi console doesn't accept 'file' protocol... 'http'.

how can solve this?

according solution given in post - refused display in frame because set 'x-frame-options' 'sameorigin', regarding error encountered:

this not related disabling security in chrome browser. believe there might me issues xampp windows local host.deploying same application in node.js server or hosting dropbox/google drive web app works fine.

additionally, make request, discussed in step #2 basic steps in using oauth 2.0 access google apis, obtain access token google authorization server. ways make request follows:

  • a javascript application might request access token using browser redirect google
  • an application installed on device has no browser uses web service requests.

sample scenarios can use can found in documentation.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -