Skip to content

Commit

Permalink
Demo/ionic (#46)
Browse files Browse the repository at this point in the history
* add go pro demo (ionic + capacitor 3)
  • Loading branch information
sultanmyrza authored Sep 8, 2021
1 parent ca375d8 commit 3f87d28
Show file tree
Hide file tree
Showing 158 changed files with 40,754 additions and 7 deletions.
15 changes: 8 additions & 7 deletions demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ This directory contains demos using the Open GoPro API with varying language and
The following table briefly describes each directory and its supported systems. See the individual subdirectory
for more information.

| Directory | Summary | Windows | Mac | Linux | Mobile |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------- | --- | ----- | ------ |
| python/sdk_wireless_camera_control | a Python package to easily exercise the Open GoPro API's + CLI's for taking pictures, videos, etc | ✔️ | ✔️ | ✔️ ||
| python/tutorial | short Python scripts to accompany the [Python Tutorials](https://gopro.github.io/OpenGoPro/tutorials/#python) | ✔️ | ✔️ | ✔️ ||
| swift/EnableWiFiDemo | a swift demo for discovering, connecting and enabling Wi-Fi on GoPro Camera |||| ✔️ |
| csharp/GoProCSharpSample | a C# demo for discovering, pairing, connecting and manipulating a camera | ✔️ ||||
| c_c++/GoProC_C++Demo | 2 C / C++ demos to send media commands and start/stop the preview stream | ✔️ | ✔️ | ✔️ ||
| Directory | Summary | Windows | Mac | Linux | Mobile |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --- | ----- | ------ |
| ionic/file_transfer | ionic demo for transfering files from GoPro to Mobile over Wi-Fi here are demos for [ios](https://github.com/sultanmyrza/OpenGoPro/tree/demo/ionic/demos/ionic#ios) & [android](https://github.com/sultanmyrza/OpenGoPro/tree/demo/ionic/demos/ionic#android) |||| ✔️ |
| python/sdk_wireless_camera_control | a Python package to easily exercise the Open GoPro API's + CLI's for taking pictures, videos, etc | ✔️ | ✔️ | ✔️ ||
| python/tutorial | short Python scripts to accompany the [Python Tutorials](https://gopro.github.io/OpenGoPro/tutorials/#python) | ✔️ | ✔️ | ✔️ ||
| swift/EnableWiFiDemo | a swift demo for discovering, connecting and enabling Wi-Fi on GoPro Camera |||| ✔️ |
| csharp/GoProCSharpSample | a C# demo for discovering, pairing, connecting and manipulating a camera | ✔️ ||||
| c_c++/GoProC_C++Demo | 2 C / C++ demos to send media commands and start/stop the preview stream | ✔️ | ✔️ | ✔️ ||

## Contributing

Expand Down
17 changes: 17 additions & 0 deletions demos/ionic/file_transfer/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
16 changes: 16 additions & 0 deletions demos/ionic/file_transfer/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
47 changes: 47 additions & 0 deletions demos/ionic/file_transfer/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": ["Page", "Component"]
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
31 changes: 31 additions & 0 deletions demos/ionic/file_transfer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore

*~
*.sw[mnpcod]
.tmp
*.tmp
*.tmp.*
*.sublime-project
*.sublime-workspace
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
$RECYCLE.BIN/

*.log
log.txt
npm-debug.log*

/.idea
/.ionic
/.sass-cache
/.sourcemaps
/.versions
/.vscode
/coverage
/dist
/node_modules
/platforms
/plugins
/www
96 changes: 96 additions & 0 deletions demos/ionic/file_transfer/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore

# Built application files
*.apk
*.aar
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/

# Android Profiling
*.hprof

# Cordova plugins for Capacitor
capacitor-cordova-android-plugins

# Copied web assets
app/src/main/assets/public
3 changes: 3 additions & 0 deletions demos/ionic/file_transfer/android/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions demos/ionic/file_transfer/android/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions demos/ionic/file_transfer/android/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions demos/ionic/file_transfer/android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions demos/ionic/file_transfer/android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/*
!/build/.npmkeep
51 changes: 51 additions & 0 deletions demos/ionic/file_transfer/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "io.numbersprotocol.capturelite.experiments.gopro"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}

apply from: 'capacitor.build.gradle'

try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
27 changes: 27 additions & 0 deletions demos/ionic/file_transfer/android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-bluetooth-le')
implementation project(':capacitor-community-http')
implementation project(':capacitor-community-wifi')
implementation project(':capacitor-app')
implementation project(':capacitor-filesystem')
implementation project(':capacitor-haptics')
implementation project(':capacitor-keyboard')
implementation project(':capacitor-status-bar')
implementation project(':capacitor-storage')

}


if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
21 changes: 21 additions & 0 deletions demos/ionic/file_transfer/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Loading

0 comments on commit 3f87d28

Please sign in to comment.