-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement google picker * Disable workflows * Disable workflows
- Loading branch information
1 parent
3117a21
commit 70caa64
Showing
5 changed files
with
73 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Build | ||
|
||
on: push | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
name: Publish to Google Play Store | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
name: Publish to App Store Connect | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Cloud Gallery - Google Picker</title> | ||
<script> | ||
let accessToken = null; | ||
let appId = null; | ||
let apiKey = null; | ||
|
||
function onApiLoad() { | ||
gapi.load('picker', onPickerApiLoad); | ||
} | ||
|
||
function onPickerApiLoad() { | ||
console.log("Google Picker API Loaded"); | ||
} | ||
|
||
function createPicker() { | ||
if (!accessToken || !appId || !apiKey) { | ||
console.error("Authentication Failed"); | ||
return; | ||
} | ||
|
||
const picker = new google.picker.PickerBuilder() | ||
.addView(google.picker.ViewId.DOCS_IMAGES_AND_VIDEOS) | ||
.addView(google.picker.ViewId.FOLDERS) | ||
.enableFeature(google.picker.Feature.MULTISELECT_ENABLED) | ||
.setOAuthToken(accessToken) | ||
.setDeveloperKey(apiKey) | ||
.setCallback(pickerCallback) | ||
.setAppId(appId) | ||
.build(); | ||
picker.setVisible(true); | ||
} | ||
|
||
function pickerCallback(data) { | ||
if (data.action === google.picker.Action.PICKED) { | ||
console.log("Picked:", data.docs); | ||
window.flutterWebView.postMessage(JSON.stringify(data.docs)); | ||
} | ||
} | ||
|
||
function receiveAccessToken(token, key, id) { | ||
accessToken = token; | ||
appId = id; | ||
apiKey = key; | ||
console.log("Authentication with", accessToken, appId, apiKey); | ||
} | ||
</script> | ||
<script async defer src="https://apis.google.com/js/api.js" onload="onApiLoad()"></script> | ||
</head> | ||
<body> | ||
<center> | ||
<h1>Grant Access</h1> | ||
<br> | ||
<p>Click the button below to grant access to your Google Drive</p> | ||
<br> | ||
<button onclick="createPicker()">Show Picker</button> | ||
</center> | ||
</body> | ||
</html> |