├── .prettierignore ├── android ├── .npmignore ├── .gradle │ ├── 4.10.1 │ │ ├── gc.properties │ │ ├── fileChanges │ │ │ └── last-build.bin │ │ ├── fileHashes │ │ │ ├── fileHashes.lock │ │ │ └── fileHashes.bin │ │ └── fileContent │ │ │ └── fileContent.lock │ └── vcs-1 │ │ └── gc.properties ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── colors.xml │ │ │ │ └── strings.xml │ │ │ └── layout │ │ │ │ └── bridge_layout_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── de │ │ │ └── mindlib │ │ │ └── sendIntent │ │ │ ├── SendIntentActivity.java │ │ │ └── SendIntent.java │ └── test │ │ └── java │ │ └── com │ │ └── getcapacitor │ │ └── ExampleUnitTest.java ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── .idea │ ├── modules.xml │ ├── misc.xml │ ├── gradle.xml │ ├── workspace.xml │ └── codeStyles │ │ └── Project.xml ├── local.properties ├── gradle.properties ├── proguard-rules.pro ├── android.iml ├── build.gradle ├── gradlew.bat └── gradlew ├── .eslintignore ├── Example ├── SendIntentExample │ ├── src │ │ ├── pages │ │ │ ├── Tab1.css │ │ │ ├── Tab2.css │ │ │ ├── Tab3.css │ │ │ ├── Tab2.tsx │ │ │ ├── Tab3.tsx │ │ │ └── Tab1.tsx │ │ ├── react-app-env.d.ts │ │ ├── App.test.tsx │ │ ├── components │ │ │ ├── ExploreContainer.css │ │ │ └── ExploreContainer.tsx │ │ ├── reportWebVitals.ts │ │ ├── setupTests.ts │ │ ├── index.tsx │ │ ├── App.tsx │ │ ├── service-worker.ts │ │ └── serviceWorkerRegistration.ts │ ├── android │ │ ├── app │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ ├── main │ │ │ │ │ ├── res │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ │ ├── splash.png │ │ │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ │ │ ├── values │ │ │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ ├── drawable-land-hdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── drawable-land-mdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── drawable-port-hdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── drawable-port-mdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ │ ├── drawable-land-xhdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── drawable-land-xxhdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── drawable-port-xhdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── drawable-port-xxhdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ │ ├── drawable-land-xxxhdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── drawable-port-xxxhdpi │ │ │ │ │ │ │ └── splash.png │ │ │ │ │ │ ├── xml │ │ │ │ │ │ │ └── file_paths.xml │ │ │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ │ │ ├── layout │ │ │ │ │ │ │ └── activity_main.xml │ │ │ │ │ │ └── drawable-v24 │ │ │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ │ ├── java │ │ │ │ │ │ └── io │ │ │ │ │ │ │ └── ionic │ │ │ │ │ │ │ └── starter │ │ │ │ │ │ │ └── MainActivity.java │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── test │ │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── getcapacitor │ │ │ │ │ └── myapp │ │ │ │ │ └── ExampleUnitTest.java │ │ │ ├── capacitor.build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── build.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── settings.gradle │ │ ├── variables.gradle │ │ ├── build.gradle │ │ ├── capacitor.settings.gradle │ │ ├── gradle.properties │ │ ├── .gitignore │ │ └── gradlew.bat │ ├── .vscode │ │ └── extensions.json │ ├── ios │ │ ├── App │ │ │ ├── App │ │ │ │ ├── Assets.xcassets │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Splash.imageset │ │ │ │ │ │ ├── splash-2732x2732.png │ │ │ │ │ │ ├── splash-2732x2732-1.png │ │ │ │ │ │ ├── splash-2732x2732-2.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ │ ├── AppIcon-512@2x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── App.entitlements │ │ │ │ ├── Base.lproj │ │ │ │ │ ├── Main.storyboard │ │ │ │ │ └── LaunchScreen.storyboard │ │ │ │ ├── Info.plist │ │ │ │ └── AppDelegate.swift │ │ │ ├── App.xcodeproj │ │ │ │ ├── project.xcworkspace │ │ │ │ │ └── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ └── xcschemes │ │ │ │ │ └── App.xcscheme │ │ │ ├── App.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ ├── Share │ │ │ │ ├── Share.entitlements │ │ │ │ ├── Info.plist │ │ │ │ └── Base.lproj │ │ │ │ │ └── MainInterface.storyboard │ │ │ └── Podfile │ │ └── .gitignore │ ├── ionic.config.json │ ├── public │ │ ├── assets │ │ │ ├── icon │ │ │ │ ├── icon.png │ │ │ │ └── favicon.png │ │ │ └── shapes.svg │ │ ├── manifest.json │ │ └── index.html │ ├── capacitor.config.ts │ ├── .gitignore │ ├── tsconfig.json │ └── package.json └── SendIntentExampleAngular │ ├── src │ ├── app │ │ ├── app.component.scss │ │ ├── tab1 │ │ │ ├── tab1.page.scss │ │ │ ├── tab1.page.html │ │ │ ├── tab1.page.spec.ts │ │ │ └── tab1.page.ts │ │ ├── tab2 │ │ │ ├── tab2.page.scss │ │ │ ├── tab2.page.html │ │ │ ├── tab2.page.spec.ts │ │ │ └── tab2.page.ts │ │ ├── tab3 │ │ │ ├── tab3.page.scss │ │ │ ├── tab3.page.html │ │ │ ├── tab3.page.spec.ts │ │ │ └── tab3.page.ts │ │ ├── tabs │ │ │ ├── tabs.page.scss │ │ │ ├── tabs.page.html │ │ │ ├── tabs.page.ts │ │ │ ├── tabs.page.spec.ts │ │ │ └── tabs.routes.ts │ │ ├── app.component.html │ │ ├── app.routes.ts │ │ ├── explore-container │ │ │ ├── explore-container.component.html │ │ │ ├── explore-container.component.ts │ │ │ ├── explore-container.component.scss │ │ │ └── explore-container.component.spec.ts │ │ ├── app.component.ts │ │ └── app.component.spec.ts │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── assets │ │ ├── icon │ │ │ └── favicon.png │ │ └── shapes.svg │ ├── zone-flags.ts │ ├── test.ts │ ├── main.ts │ ├── index.html │ ├── global.scss │ └── polyfills.ts │ ├── android │ ├── app │ │ ├── .gitignore │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── values │ │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── drawable-land-hdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── drawable-land-mdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── drawable-port-hdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── drawable-port-mdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── drawable-land-xhdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── drawable-land-xxhdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── drawable-land-xxxhdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── drawable-port-xhdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── drawable-port-xxhdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── drawable-port-xxxhdpi │ │ │ │ │ │ └── splash.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ │ ├── xml │ │ │ │ │ │ └── file_paths.xml │ │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ │ ├── layout │ │ │ │ │ │ └── activity_main.xml │ │ │ │ │ └── drawable-v24 │ │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── java │ │ │ │ │ └── io │ │ │ │ │ │ └── ionic │ │ │ │ │ │ └── starter │ │ │ │ │ │ └── MainActivity.java │ │ │ │ └── AndroidManifest.xml │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── getcapacitor │ │ │ │ └── myapp │ │ │ │ └── ExampleUnitTest.java │ │ ├── capacitor.build.gradle │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ ├── variables.gradle │ ├── build.gradle │ ├── capacitor.settings.gradle │ ├── gradle.properties │ ├── .gitignore │ └── gradlew.bat │ ├── .vscode │ └── extensions.json │ ├── ionic.config.json │ ├── capacitor.config.ts │ ├── .editorconfig │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── .browserslistrc │ ├── tsconfig.json │ ├── .gitignore │ ├── .eslintrc.json │ ├── karma.conf.js │ ├── package.json │ └── angular.json ├── .idea ├── .gitignore └── vcs.xml ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── ios └── Sources │ └── SendIntentPlugin │ ├── SendIntent.swift │ ├── ShareStore.swift │ └── SendIntentPlugin.swift ├── src ├── definitions.ts ├── index.ts └── web.ts ├── tsconfig.json ├── SendIntent.podspec ├── Package.swift ├── CHANGELOG.md ├── .npmignore ├── LICENSE ├── .gitignore ├── package.json └── CODE_OF_CONDUCT.md /.prettierignore: -------------------------------------------------------------------------------- 1 | example 2 | -------------------------------------------------------------------------------- /android/.npmignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/.gradle/4.10.1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build 2 | dist 3 | example 4 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/pages/Tab1.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/pages/Tab2.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/pages/Tab3.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/.gradle/4.10.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab1/tab1.page.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab2/tab2.page.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab3/tab3.page.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tabs/tabs.page.scss: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/.gradle/4.10.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- 1 | g FB} -------------------------------------------------------------------------------- /android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build/* 2 | !/build/.npmkeep 3 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build/* 2 | !/build/.npmkeep 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [carsten-klaffke] 4 | -------------------------------------------------------------------------------- /android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Example/SendIntentExample/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ionic.ionic" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ionic.ionic" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Just a simple string 3 | 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':capacitor-android' 2 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') -------------------------------------------------------------------------------- /android/.gradle/4.10.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/android/.gradle/4.10.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /android/.gradle/4.10.1/fileContent/fileContent.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/android/.gradle/4.10.1/fileContent/fileContent.lock -------------------------------------------------------------------------------- /Example/SendIntentExample/ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SendIntentExample", 3 | "integrations": { 4 | "capacitor": {} 5 | }, 6 | "type": "react" 7 | } 8 | -------------------------------------------------------------------------------- /Example/SendIntentExample/public/assets/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/public/assets/icon/icon.png -------------------------------------------------------------------------------- /Example/SendIntentExample/public/assets/icon/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/public/assets/icon/favicon.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/assets/icon/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/src/assets/icon/favicon.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SendIntentExampleAngular", 3 | "integrations": { 4 | "capacitor": {} 5 | }, 6 | "type": "angular-standalone" 7 | } 8 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable/splash.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-land-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-land-hdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-land-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-land-mdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-port-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-port-hdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-port-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-port-mdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/java/io/ionic/starter/MainActivity.java: -------------------------------------------------------------------------------- 1 | package io.ionic.starter; 2 | 3 | import com.getcapacitor.BridgeActivity; 4 | 5 | public class MainActivity extends BridgeActivity {} 6 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-land-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-land-xhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-land-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-land-xxhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-port-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-port-xhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-port-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-port-xxhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-land-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-land-xxxhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-port-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/drawable-port-xxxhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/java/io/ionic/starter/MainActivity.java: -------------------------------------------------------------------------------- 1 | package io.ionic.starter; 2 | 3 | import com.getcapacitor.BridgeActivity; 4 | 5 | public class MainActivity extends BridgeActivity {} 6 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-hdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-mdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-hdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-mdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-xhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-xxhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-land-xxxhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-xhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-xxhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/drawable-port-xxxhdpi/splash.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExample/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ios/Sources/SendIntentPlugin/SendIntent.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objc public class SendIntent: NSObject { 4 | @objc public func echo(_ value: String) -> String { 5 | print(value) 6 | return value 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsten-klaffke/send-intent/HEAD/Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/app.routes.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | export const routes: Routes = [ 4 | { 5 | path: '', 6 | loadChildren: () => import('./tabs/tabs.routes').then((m) => m.routes), 7 | }, 8 | ]; 9 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists -------------------------------------------------------------------------------- /Example/SendIntentExample/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':capacitor-cordova-android-plugins' 3 | project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') 4 | 5 | apply from: 'capacitor.settings.gradle' -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/zone-flags.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Prevents Angular change detection from 3 | * running with certain Web Component callbacks 4 | */ 5 | // eslint-disable-next-line no-underscore-dangle 6 | (window as any).__Zone_disable_customElements = true; 7 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':capacitor-cordova-android-plugins' 3 | project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') 4 | 5 | apply from: 'capacitor.settings.gradle' -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders without crashing', () => { 6 | const { baseElement } = render(); 7 | expect(baseElement).toBeDefined(); 8 | }); 9 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/definitions.ts: -------------------------------------------------------------------------------- 1 | export interface Intent { 2 | title?: string; 3 | description?: string; 4 | type?: string; 5 | url?: string; 6 | additionalItems?: any; 7 | } 8 | 9 | export interface SendIntentPlugin { 10 | checkSendIntentReceived(): Promise; 11 | finish(): void; 12 | } 13 | -------------------------------------------------------------------------------- /Example/SendIntentExample/capacitor.config.ts: -------------------------------------------------------------------------------- 1 | import { CapacitorConfig } from '@capacitor/cli'; 2 | 3 | const config: CapacitorConfig = { 4 | appId: 'io.ionic.starter', 5 | appName: 'SendIntentExample', 6 | webDir: 'build', 7 | bundledWebRuntime: false 8 | }; 9 | 10 | export default config; 11 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/.gitignore: -------------------------------------------------------------------------------- 1 | App/build 2 | App/output 3 | App/Pods 4 | App/App/public 5 | DerivedData 6 | xcuserdata 7 | 8 | # Cordova plugins for Capacitor 9 | capacitor-cordova-ios-plugins 10 | 11 | # Generated Config files 12 | App/App/capacitor.config.json 13 | App/App/config.xml 14 | 15 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/capacitor.config.ts: -------------------------------------------------------------------------------- 1 | import { CapacitorConfig } from '@capacitor/cli'; 2 | 3 | const config: CapacitorConfig = { 4 | appId: 'io.ionic.starter', 5 | appName: 'SendIntentExampleAngular', 6 | webDir: 'www', 7 | server: { 8 | androidScheme: 'https' 9 | } 10 | }; 11 | 12 | export default config; 13 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { registerPlugin } from "@capacitor/core"; 2 | import type { SendIntentPlugin } from "./definitions"; 3 | 4 | const SendIntent = registerPlugin("SendIntent", { 5 | web: () => import("./web").then((m) => new m.SendIntentWeb()), 6 | }); 7 | 8 | export * from "./definitions"; 9 | export { SendIntent }; 10 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/explore-container/explore-container.component.html: -------------------------------------------------------------------------------- 1 | 2 | {{ name }} 3 | 4 | Explore 5 | UI Components 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppIcon-512@2x.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "size" : "1024x1024" 8 | } 9 | ], 10 | "info" : { 11 | "author" : "xcode", 12 | "version" : 1 13 | } 14 | } -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SendIntentExample 4 | SendIntentExample 5 | io.ionic.starter 6 | io.ionic.starter 7 | 8 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /ios/Sources/SendIntentPlugin/ShareStore.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Capacitor 3 | 4 | public final class ShareStore { 5 | 6 | public static let store = ShareStore() 7 | 8 | private init() { 9 | self.shareItems = [] 10 | self.processed = false 11 | } 12 | 13 | public var shareItems: [JSObject] 14 | 15 | public var processed: Bool 16 | } 17 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/App.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.SendIntentExample 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/Share/Share.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.SendIntentExample 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: 'app.component.html', 7 | standalone: true, 8 | imports: [IonApp, IonRouterOutlet], 9 | }) 10 | export class AppComponent { 11 | constructor() {} 12 | } 13 | -------------------------------------------------------------------------------- /android/local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Wed Apr 29 15:53:51 CEST 2020 8 | sdk.dir=C\:\\Program Files (x86)\\Android\\android-sdk 9 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SendIntentExampleAngular 4 | SendIntentExampleAngular 5 | io.ionic.starter 6 | io.ionic.starter 7 | 8 | -------------------------------------------------------------------------------- /src/web.ts: -------------------------------------------------------------------------------- 1 | import {WebPlugin} from '@capacitor/core'; 2 | import {SendIntentPlugin} from './definitions'; 3 | 4 | export class SendIntentWeb extends WebPlugin implements SendIntentPlugin { 5 | constructor() { 6 | super(); 7 | } 8 | 9 | async checkSendIntentReceived(): Promise<{ title: string }> { 10 | return {title: ''}; 11 | } 12 | 13 | finish(): void { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/explore-container/explore-container.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-explore-container', 5 | templateUrl: './explore-container.component.html', 6 | styleUrls: ['./explore-container.component.scss'], 7 | standalone: true, 8 | }) 9 | export class ExploreContainerComponent { 10 | @Input() name?: string; 11 | } 12 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/components/ExploreContainer.css: -------------------------------------------------------------------------------- 1 | .container { 2 | text-align: center; 3 | position: absolute; 4 | left: 0; 5 | right: 0; 6 | top: 50%; 7 | transform: translateY(-50%); 8 | } 9 | 10 | .container strong { 11 | font-size: 20px; 12 | line-height: 26px; 13 | } 14 | 15 | .container p { 16 | font-size: 16px; 17 | line-height: 22px; 18 | color: #8c8c8c; 19 | margin: 0; 20 | } 21 | 22 | .container a { 23 | text-decoration: none; 24 | } -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab1/tab1.page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tab 1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Tab 1 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab2/tab2.page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tab 2 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Tab 2 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab3/tab3.page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tab 3 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Tab 3 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/src/test/java/com/getcapacitor/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/explore-container/explore-container.component.scss: -------------------------------------------------------------------------------- 1 | #container { 2 | text-align: center; 3 | 4 | position: absolute; 5 | left: 0; 6 | right: 0; 7 | top: 50%; 8 | transform: translateY(-50%); 9 | } 10 | 11 | #container strong { 12 | font-size: 20px; 13 | line-height: 26px; 14 | } 15 | 16 | #container p { 17 | font-size: 16px; 18 | line-height: 22px; 19 | 20 | color: #8c8c8c; 21 | 22 | margin: 0; 23 | } 24 | 25 | #container a { 26 | text-decoration: none; 27 | } -------------------------------------------------------------------------------- /Example/SendIntentExample/src/components/ExploreContainer.tsx: -------------------------------------------------------------------------------- 1 | import './ExploreContainer.css'; 2 | 3 | interface ContainerProps { 4 | name: string; 5 | } 6 | 7 | const ExploreContainer: React.FC = ({ name }) => { 8 | return ( 9 | 10 | {name} 11 | Explore UI Components 12 | 13 | ); 14 | }; 15 | 16 | export default ExploreContainer; 17 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from 'web-vitals'; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 6 | getCLS(onPerfEntry); 7 | getFID(onPerfEntry); 8 | getFCP(onPerfEntry); 9 | getLCP(onPerfEntry); 10 | getTTFB(onPerfEntry); 11 | }); 12 | } 13 | }; 14 | 15 | export default reportWebVitals; 16 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | 7 | // Mock matchmedia 8 | window.matchMedia = window.matchMedia || function() { 9 | return { 10 | matches: false, 11 | addListener: function() {}, 12 | removeListener: function() {} 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /Example/SendIntentExample/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | /.vscode/* 21 | !/.vscode/extensions.json 22 | .idea 23 | 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # Optional eslint cache 29 | .eslintcache 30 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | // First, initialize the Angular testing environment. 11 | getTestBed().initTestEnvironment( 12 | BrowserDynamicTestingModule, 13 | platformBrowserDynamicTesting(), 14 | ); 15 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor.myapp; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | 14 | @Test 15 | public void addition_isCorrect() throws Exception { 16 | assertEquals(4, 2 + 2); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowUnreachableCode": false, 4 | "declaration": true, 5 | "esModuleInterop": true, 6 | "inlineSources": true, 7 | "lib": ["dom", "es2017"], 8 | "module": "esnext", 9 | "moduleResolution": "node", 10 | "noFallthroughCasesInSwitch": true, 11 | "noUnusedLocals": true, 12 | "noUnusedParameters": true, 13 | "outDir": "dist/esm", 14 | "pretty": true, 15 | "sourceMap": true, 16 | "strict": true, 17 | "target": "es2017" 18 | }, 19 | "files": ["src/index.ts"] 20 | } 21 | -------------------------------------------------------------------------------- /Example/SendIntentExample/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Ionic App", 3 | "name": "My Ionic App", 4 | "icons": [ 5 | { 6 | "src": "assets/icon/favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "assets/icon/icon.png", 12 | "type": "image/png", 13 | "sizes": "512x512", 14 | "purpose": "maskable" 15 | } 16 | ], 17 | "start_url": ".", 18 | "display": "standalone", 19 | "theme_color": "#ffffff", 20 | "background_color": "#ffffff" 21 | } 22 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "splash-2732x2732-2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "splash-2732x2732-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "splash-2732x2732.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor.myapp; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | 14 | @Test 15 | public void addition_isCorrect() throws Exception { 16 | assertEquals(4, 2 + 2); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab1/tab1.page.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { Tab1Page } from './tab1.page'; 4 | 5 | describe('Tab1Page', () => { 6 | let component: Tab1Page; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | fixture = TestBed.createComponent(Tab1Page); 11 | component = fixture.componentInstance; 12 | fixture.detectChanges(); 13 | }); 14 | 15 | it('should create', () => { 16 | expect(component).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab2/tab2.page.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { Tab2Page } from './tab2.page'; 4 | 5 | describe('Tab2Page', () => { 6 | let component: Tab2Page; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | fixture = TestBed.createComponent(Tab2Page); 11 | component = fixture.componentInstance; 12 | fixture.detectChanges(); 13 | }); 14 | 15 | it('should create', () => { 16 | expect(component).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab3/tab3.page.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { Tab3Page } from './tab3.page'; 4 | 5 | describe('Tab3Page', () => { 6 | let component: Tab3Page; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | fixture = TestBed.createComponent(Tab3Page); 11 | component = fixture.componentInstance; 12 | fixture.detectChanges(); 13 | }); 14 | 15 | it('should create', () => { 16 | expect(component).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab3/tab3.page.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone'; 3 | import { ExploreContainerComponent } from '../explore-container/explore-container.component'; 4 | 5 | @Component({ 6 | selector: 'app-tab3', 7 | templateUrl: 'tab3.page.html', 8 | styleUrls: ['tab3.page.scss'], 9 | standalone: true, 10 | imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent], 11 | }) 12 | export class Tab3Page { 13 | constructor() {} 14 | } 15 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/variables.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | minSdkVersion = 23 3 | compileSdkVersion = 35 4 | targetSdkVersion = 35 5 | androidxActivityVersion = '1.7.0' 6 | androidxAppCompatVersion = '1.6.1' 7 | androidxCoordinatorLayoutVersion = '1.2.0' 8 | androidxCoreVersion = '1.10.0' 9 | androidxFragmentVersion = '1.5.6' 10 | coreSplashScreenVersion = '1.0.0' 11 | androidxWebkitVersion = '1.6.1' 12 | junitVersion = '4.13.2' 13 | androidxJunitVersion = '1.1.5' 14 | androidxEspressoCoreVersion = '3.5.1' 15 | cordovaAndroidVersion = '10.1.1' 16 | } -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab2/tab2.page.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone'; 3 | import { ExploreContainerComponent } from '../explore-container/explore-container.component'; 4 | 5 | @Component({ 6 | selector: 'app-tab2', 7 | templateUrl: 'tab2.page.html', 8 | styleUrls: ['tab2.page.scss'], 9 | standalone: true, 10 | imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent] 11 | }) 12 | export class Tab2Page { 13 | 14 | constructor() {} 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | it('should create the app', () => { 7 | TestBed.overrideComponent(AppComponent, { 8 | add: { 9 | imports: [RouterTestingModule] 10 | } 11 | }); 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.componentInstance; 14 | expect(app).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/variables.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | minSdkVersion = 23 3 | compileSdkVersion = 35 4 | targetSdkVersion = 35 5 | androidxActivityVersion = '1.7.0' 6 | androidxAppCompatVersion = '1.6.1' 7 | androidxCoordinatorLayoutVersion = '1.2.0' 8 | androidxCoreVersion = '1.10.0' 9 | androidxFragmentVersion = '1.5.6' 10 | coreSplashScreenVersion = '1.0.0' 11 | androidxWebkitVersion = '1.6.1' 12 | junitVersion = '4.13.2' 13 | androidxJunitVersion = '1.1.5' 14 | androidxEspressoCoreVersion = '3.5.1' 15 | cordovaAndroidVersion = '10.1.1' 16 | } 17 | -------------------------------------------------------------------------------- /SendIntent.podspec: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = 'SendIntent' 7 | s.version = package['version'] 8 | s.summary = package['description'] 9 | s.license = package['license'] 10 | s.homepage = package['repository']['url'] 11 | s.author = package['author'] 12 | s.source = { :git => package['repository']['url'], :tag => s.version.to_s } 13 | s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' 14 | s.ios.deployment_target = '14.0' 15 | s.dependency 'Capacitor' 16 | s.swift_version = '5.1' 17 | end 18 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | Chrome >=79 12 | ChromeAndroid >=79 13 | Firefox >=70 14 | Edge >=79 15 | Safari >=14 16 | iOS >=14 17 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /android/src/main/java/de/mindlib/sendIntent/SendIntentActivity.java: -------------------------------------------------------------------------------- 1 | package de.mindlib.sendIntent; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.getcapacitor.BridgeActivity; 6 | 7 | public class SendIntentActivity extends BridgeActivity { 8 | 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | registerPlugin(SendIntent.class); 13 | } 14 | 15 | @Override 16 | public void onPause() { 17 | super.onPause(); 18 | finish(); 19 | } 20 | 21 | @Override 22 | public void onStop() { 23 | super.onStop(); 24 | finish(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Example/SendIntentExample/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx" 22 | }, 23 | "include": [ 24 | "src" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /android/src/main/res/layout/bridge_layout_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/explore-container/explore-container.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ExploreContainerComponent } from './explore-container.component'; 4 | 5 | describe('ExploreContainerComponent', () => { 6 | let component: ExploreContainerComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | fixture = TestBed.createComponent(ExploreContainerComponent); 11 | component = fixture.componentInstance; 12 | fixture.detectChanges(); 13 | }); 14 | 15 | it('should create', () => { 16 | expect(component).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tabs/tabs.page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Tab 1 6 | 7 | 8 | 9 | 10 | Tab 2 11 | 12 | 13 | 14 | 15 | Tab 3 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tabs/tabs.page.ts: -------------------------------------------------------------------------------- 1 | import { Component, EnvironmentInjector, inject } from '@angular/core'; 2 | import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel } from '@ionic/angular/standalone'; 3 | import { addIcons } from 'ionicons'; 4 | import { triangle, ellipse, square } from 'ionicons/icons'; 5 | 6 | @Component({ 7 | selector: 'app-tabs', 8 | templateUrl: 'tabs.page.html', 9 | styleUrls: ['tabs.page.scss'], 10 | standalone: true, 11 | imports: [IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel], 12 | }) 13 | export class TabsPage { 14 | public environmentInjector = inject(EnvironmentInjector); 15 | 16 | constructor() { 17 | addIcons({ triangle, ellipse, square }); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/capacitor.build.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | 3 | android { 4 | compileOptions { 5 | sourceCompatibility JavaVersion.VERSION_17 6 | targetCompatibility JavaVersion.VERSION_17 7 | } 8 | } 9 | 10 | apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" 11 | dependencies { 12 | implementation project(':capacitor-app') 13 | implementation project(':capacitor-haptics') 14 | implementation project(':capacitor-keyboard') 15 | implementation project(':capacitor-status-bar') 16 | implementation project(':send-intent') 17 | 18 | } 19 | 20 | 21 | if (hasProperty('postBuildExtras')) { 22 | postBuildExtras() 23 | } 24 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/pages/Tab2.tsx: -------------------------------------------------------------------------------- 1 | import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; 2 | import ExploreContainer from '../components/ExploreContainer'; 3 | import './Tab2.css'; 4 | 5 | const Tab2: React.FC = () => { 6 | return ( 7 | 8 | 9 | 10 | Tab 2 11 | 12 | 13 | 14 | 15 | 16 | Tab 2 17 | 18 | 19 | 20 | 21 | 22 | ); 23 | }; 24 | 25 | export default Tab2; 26 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/pages/Tab3.tsx: -------------------------------------------------------------------------------- 1 | import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; 2 | import ExploreContainer from '../components/ExploreContainer'; 3 | import './Tab3.css'; 4 | 5 | const Tab3: React.FC = () => { 6 | return ( 7 | 8 | 9 | 10 | Tab 3 11 | 12 | 13 | 14 | 15 | 16 | Tab 3 17 | 18 | 19 | 20 | 21 | 22 | ); 23 | }; 24 | 25 | export default Tab3; 26 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode, importProvidersFrom } from '@angular/core'; 2 | import { bootstrapApplication } from '@angular/platform-browser'; 3 | import { RouteReuseStrategy, provideRouter } from '@angular/router'; 4 | import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone'; 5 | 6 | import { routes } from './app/app.routes'; 7 | import { AppComponent } from './app/app.component'; 8 | import { environment } from './environments/environment'; 9 | 10 | if (environment.production) { 11 | enableProdMode(); 12 | } 13 | 14 | bootstrapApplication(AppComponent, { 15 | providers: [ 16 | { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, 17 | provideIonicAngular(), 18 | provideRouter(routes), 19 | ], 20 | }); 21 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:8.7.3' 11 | classpath 'com.google.gms:google-services:4.3.15' 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | apply from: "variables.gradle" 19 | 20 | allprojects { 21 | repositories { 22 | google() 23 | mavenCentral() 24 | } 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:8.0.0' 11 | classpath 'com.google.gms:google-services:4.3.15' 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | apply from: "variables.gradle" 19 | 20 | allprojects { 21 | repositories { 22 | google() 23 | mavenCentral() 24 | } 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/capacitor.build.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | 3 | android { 4 | compileOptions { 5 | sourceCompatibility JavaVersion.VERSION_17 6 | targetCompatibility JavaVersion.VERSION_17 7 | } 8 | } 9 | 10 | apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" 11 | dependencies { 12 | implementation project(':capacitor-app') 13 | implementation project(':capacitor-filesystem') 14 | implementation project(':capacitor-haptics') 15 | implementation project(':capacitor-keyboard') 16 | implementation project(':capacitor-status-bar') 17 | implementation project(':send-intent') 18 | 19 | } 20 | 21 | 22 | if (hasProperty('postBuildExtras')) { 23 | postBuildExtras() 24 | } 25 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tabs/tabs.page.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | 4 | import { TabsPage } from './tabs.page'; 5 | 6 | describe('TabsPage', () => { 7 | let component: TabsPage; 8 | let fixture: ComponentFixture; 9 | 10 | beforeEach(async () => { 11 | TestBed.overrideComponent(TabsPage, { 12 | add: { 13 | imports: [RouterTestingModule] 14 | } 15 | }); 16 | }); 17 | 18 | beforeEach(() => { 19 | fixture = TestBed.createComponent(TabsPage); 20 | component = fixture.componentInstance; 21 | fixture.detectChanges(); 22 | }); 23 | 24 | it('should create', () => { 25 | expect(component).toBeTruthy(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | android.useAndroidX=true 13 | org.gradle.jvmargs=-Xmx1536m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | -------------------------------------------------------------------------------- /android/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ionic App 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /android/android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/capacitor.settings.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | include ':capacitor-android' 3 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') 4 | 5 | include ':capacitor-app' 6 | project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android') 7 | 8 | include ':capacitor-haptics' 9 | project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android') 10 | 11 | include ':capacitor-keyboard' 12 | project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android') 13 | 14 | include ':capacitor-status-bar' 15 | project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android') 16 | 17 | include ':send-intent' 18 | project(':send-intent').projectDir = new File('../node_modules/send-intent/android') 19 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tabs/tabs.routes.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | import { TabsPage } from './tabs.page'; 3 | 4 | export const routes: Routes = [ 5 | { 6 | path: 'tabs', 7 | component: TabsPage, 8 | children: [ 9 | { 10 | path: 'tab1', 11 | loadComponent: () => 12 | import('../tab1/tab1.page').then((m) => m.Tab1Page), 13 | }, 14 | { 15 | path: 'tab2', 16 | loadComponent: () => 17 | import('../tab2/tab2.page').then((m) => m.Tab2Page), 18 | }, 19 | { 20 | path: 'tab3', 21 | loadComponent: () => 22 | import('../tab3/tab3.page').then((m) => m.Tab3Page), 23 | }, 24 | { 25 | path: '', 26 | redirectTo: '/tabs/tab1', 27 | pathMatch: 'full', 28 | }, 29 | ], 30 | }, 31 | { 32 | path: '', 33 | redirectTo: '/tabs/tab1', 34 | pathMatch: 'full', 35 | }, 36 | ]; 37 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 5.9 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "SendIntent", 6 | platforms: [.iOS(.v14)], 7 | products: [ 8 | .library( 9 | name: "SendIntent", 10 | targets: ["SendIntentPlugin"]) 11 | ], 12 | dependencies: [ 13 | .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0") 14 | ], 15 | targets: [ 16 | .target( 17 | name: "SendIntentPlugin", 18 | dependencies: [ 19 | .product(name: "Capacitor", package: "capacitor-swift-pm"), 20 | .product(name: "Cordova", package: "capacitor-swift-pm") 21 | ], 22 | path: "ios/Sources/SendIntentPlugin"), 23 | .testTarget( 24 | name: "SendIntentPluginTests", 25 | dependencies: ["SendIntentPlugin"], 26 | path: "ios/Tests/SendIntentPluginTests") 27 | ] 28 | ) -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | import App from './App'; 4 | import * as serviceWorkerRegistration from './serviceWorkerRegistration'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const container = document.getElementById('root'); 8 | const root = createRoot(container!); 9 | root.render( 10 | 11 | 12 | 13 | ); 14 | 15 | // If you want your app to work offline and load faster, you can change 16 | // unregister() to register() below. Note this comes with some pitfalls. 17 | // Learn more about service workers: https://cra.link/PWA 18 | serviceWorkerRegistration.unregister(); 19 | 20 | // If you want to start measuring performance in your app, pass a function 21 | // to log results (for example: reportWebVitals(console.log)) 22 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 23 | reportWebVitals(); 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitOverride": true, 10 | "noPropertyAccessFromIndexSignature": true, 11 | "noImplicitReturns": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "sourceMap": true, 14 | "declaration": false, 15 | "downlevelIteration": true, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "node", 18 | "importHelpers": true, 19 | "target": "es2022", 20 | "module": "es2020", 21 | "lib": ["es2018", "dom"], 22 | "useDefineForClassFields": false 23 | }, 24 | "angularCompilerOptions": { 25 | "enableI18nLegacyMessageIdFormat": false, 26 | "strictInjectionParameters": true, 27 | "strictInputAccessModifiers": true, 28 | "strictTemplates": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/capacitor.settings.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | include ':capacitor-android' 3 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') 4 | 5 | include ':capacitor-app' 6 | project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android') 7 | 8 | include ':capacitor-filesystem' 9 | project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android') 10 | 11 | include ':capacitor-haptics' 12 | project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android') 13 | 14 | include ':capacitor-keyboard' 15 | project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android') 16 | 17 | include ':capacitor-status-bar' 18 | project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android') 19 | 20 | include ':send-intent' 21 | project(':send-intent').projectDir = new File('../../../android') 22 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | #### 5.0.0 (2023-05-05) 2 | * Capacitor 5 Upgrade 3 | * Added up-to-date Example 4 | #### 3.0.10 (2022-08-02) 5 | * Fixed empty ClipData Nullpointer Exception 6 | #### 3.0.9 (2022-21-01) 7 | * replaced deprecated jcenter() with mavenCentral() 8 | #### 3.0.8 (2021-12-19) 9 | * Fixed: "Not receiving actual URL when sharing from chrome #33" 10 | https://github.com/carsten-klaffke/send-intent/issues/33 11 | #### 3.0.6 (2021-12-08) 12 | * Fix: Android Uri instead of regular file paths 13 | * Updated MainActivity-section in Readme for Android multi file send 14 | #### 3.0.5 (2021-12-06) 15 | * Copy file inputs to internal storage to avoid potential access problems 16 | #### 3.0.4 (2021-11-12) 17 | * Bugfix for iOS multi file share 18 | #### 3.0.3 (2021-11-12) 19 | * Multi-file support for iOS 20 | #### 3.0.2 (2021-11-09) 21 | * Multi-file support for Android 22 | #### 3.0.1 (2021-11-02) 23 | * Read correct filenames 24 | #### 3.0.0 (2021-10-25) 25 | * new major version, interface changes 26 | * Files as URLs for any format 27 | #### 2.0.0 (2021-07-26) 28 | * Capacitor 3 Upgrade 29 | -------------------------------------------------------------------------------- /Example/SendIntentExample/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ionic App 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # node files 2 | dist/ 3 | node_modules/ 4 | 5 | # iOS files 6 | Pods 7 | Build 8 | xcuserdata 9 | 10 | # macOS files 11 | .DS_Store 12 | 13 | 14 | 15 | # Based on Android gitignore template: https://github.com/github/gitignore/blob/master/Android.gitignore 16 | 17 | # Built application files 18 | *.apk 19 | *.ap_ 20 | 21 | # Files for the ART/Dalvik VM 22 | *.dex 23 | 24 | # Java class files 25 | *.class 26 | 27 | # Generated files 28 | bin/ 29 | gen/ 30 | out/ 31 | 32 | # Gradle files 33 | .gradle/ 34 | build/ 35 | 36 | # Local configuration file (sdk path, etc) 37 | local.properties 38 | 39 | # Proguard folder generated by Eclipse 40 | proguard/ 41 | 42 | # Log Files 43 | *.log 44 | 45 | # Android Studio Navigation editor temp files 46 | .navigation/ 47 | 48 | # Android Studio captures folder 49 | captures/ 50 | 51 | # IntelliJ 52 | *.iml 53 | .idea 54 | 55 | # Keystore files 56 | # Uncomment the following line if you do not want to check your keystore files in. 57 | #*.jks 58 | 59 | # External native build folder generated in Android Studio 2.2 and later 60 | .externalNativeBuild 61 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | # AndroidX package structure to make it clearer which packages are bundled with the 20 | # Android operating system, and which are packaged with your app's APK 21 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 22 | android.useAndroidX=true 23 | 24 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | # AndroidX package structure to make it clearer which packages are bundled with the 20 | # Android operating system, and which are packaged with your app's APK 21 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 22 | android.useAndroidX=true 23 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | .tmp 7 | *.tmp 8 | *.tmp.* 9 | UserInterfaceState.xcuserstate 10 | $RECYCLE.BIN/ 11 | 12 | *.log 13 | log.txt 14 | 15 | 16 | /.sourcemaps 17 | /.versions 18 | /coverage 19 | 20 | # Ionic 21 | /.ionic 22 | /www 23 | /platforms 24 | /plugins 25 | 26 | # Compiled output 27 | /dist 28 | /tmp 29 | /out-tsc 30 | /bazel-out 31 | 32 | # Node 33 | /node_modules 34 | npm-debug.log 35 | yarn-error.log 36 | 37 | # IDEs and editors 38 | .idea/ 39 | .project 40 | .classpath 41 | .c9/ 42 | *.launch 43 | .settings/ 44 | *.sublime-project 45 | *.sublime-workspace 46 | 47 | # Visual Studio Code 48 | .vscode/* 49 | !.vscode/settings.json 50 | !.vscode/tasks.json 51 | !.vscode/launch.json 52 | !.vscode/extensions.json 53 | .history/* 54 | 55 | 56 | # Miscellaneous 57 | /.angular 58 | /.angular/cache 59 | .sass-cache/ 60 | /connect.lock 61 | /coverage 62 | /libpeerconnection.log 63 | testem.log 64 | /typings 65 | 66 | # System files 67 | .DS_Store 68 | Thumbs.db 69 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Carsten Klaffke 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers' 2 | 3 | platform :ios, '13.0' 4 | use_frameworks! 5 | 6 | # workaround to avoid Xcode caching of Pods that requires 7 | # Product -> Clean Build Folder after new Cordova plugins installed 8 | # Requires CocoaPods 1.6 or newer 9 | install! 'cocoapods', :disable_input_output_paths => true 10 | 11 | def capacitor_pods 12 | pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' 13 | pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' 14 | pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app' 15 | pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem' 16 | pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics' 17 | pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard' 18 | pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar' 19 | pod 'SendIntent', :path => '../../../..' 20 | end 21 | 22 | target 'App' do 23 | capacitor_pods 24 | # Add your Pods here 25 | end 26 | 27 | post_install do |installer| 28 | assertDeploymentTarget(installer) 29 | end 30 | -------------------------------------------------------------------------------- /Example/SendIntentExample/public/assets/shapes.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/assets/shapes.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/global.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * App Global CSS 3 | * ---------------------------------------------------------------------------- 4 | * Put style rules here that you want to apply globally. These styles are for 5 | * the entire app and not just one component. Additionally, this file can be 6 | * used as an entry point to import other CSS/Sass files to be included in the 7 | * output CSS. 8 | * For more information on global stylesheets, visit the documentation: 9 | * https://ionicframework.com/docs/layout/global-stylesheets 10 | */ 11 | 12 | /* Core CSS required for Ionic components to work properly */ 13 | @import "@ionic/angular/css/core.css"; 14 | 15 | /* Basic CSS for apps built with Ionic */ 16 | @import "@ionic/angular/css/normalize.css"; 17 | @import "@ionic/angular/css/structure.css"; 18 | @import "@ionic/angular/css/typography.css"; 19 | @import "@ionic/angular/css/display.css"; 20 | 21 | /* Optional CSS utils that can be commented out */ 22 | @import "@ionic/angular/css/padding.css"; 23 | @import "@ionic/angular/css/float-elements.css"; 24 | @import "@ionic/angular/css/text-alignment.css"; 25 | @import "@ionic/angular/css/text-transformation.css"; 26 | @import "@ionic/angular/css/flex-utils.css"; 27 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/Share/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSExtension 6 | 7 | NSExtensionAttributes 8 | 9 | NSExtensionActivationRule 10 | TRUEPREDICATE 11 | 12 | NSExtensionMainStoryboard 13 | MainInterface 14 | NSExtensionPointIdentifier 15 | com.apple.share-services 16 | 17 | NSExtensionActivationRule 18 | 19 | NSExtensionActivationSupportsFileWithMaxCount 20 | 5 21 | NSExtensionActivationSupportsImageWithMaxCount 22 | 5 23 | NSExtensionActivationSupportsMovieWithMaxCount 24 | 5 25 | NSExtensionActivationSupportsText 26 | 27 | NSExtensionActivationSupportsWebPageWithMaxCount 28 | 1 29 | NSExtensionActivationSupportsWebURLWithMaxCount 30 | 1 31 | NSExtensionActivationUsesStrictMatching 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": ["projects/**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts"], 7 | "parserOptions": { 8 | "project": ["tsconfig.json"], 9 | "createDefaultProgram": true 10 | }, 11 | "extends": [ 12 | "plugin:@angular-eslint/recommended", 13 | "plugin:@angular-eslint/template/process-inline-templates" 14 | ], 15 | "rules": { 16 | "@angular-eslint/component-class-suffix": [ 17 | "error", 18 | { 19 | "suffixes": ["Page", "Component"] 20 | } 21 | ], 22 | "@angular-eslint/component-selector": [ 23 | "error", 24 | { 25 | "type": "element", 26 | "prefix": "app", 27 | "style": "kebab-case" 28 | } 29 | ], 30 | "@angular-eslint/directive-selector": [ 31 | "error", 32 | { 33 | "type": "attribute", 34 | "prefix": "app", 35 | "style": "camelCase" 36 | } 37 | ] 38 | } 39 | }, 40 | { 41 | "files": ["*.html"], 42 | "extends": ["plugin:@angular-eslint/template/recommended"], 43 | "rules": {} 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # node files 2 | dist 3 | node_modules 4 | 5 | # iOS files 6 | Pods 7 | Podfile.lock 8 | Package.resolved 9 | Build 10 | xcuserdata 11 | /.build 12 | /Packages 13 | xcuserdata/ 14 | DerivedData/ 15 | .swiftpm/configuration/registries.json 16 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 17 | .netrc 18 | 19 | 20 | # macOS files 21 | .DS_Store 22 | 23 | 24 | 25 | # Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore 26 | 27 | # Built application files 28 | *.apk 29 | *.ap_ 30 | 31 | # Files for the ART/Dalvik VM 32 | *.dex 33 | 34 | # Java class files 35 | *.class 36 | 37 | # Generated files 38 | bin 39 | gen 40 | out 41 | 42 | # Gradle files 43 | .gradle 44 | build 45 | 46 | # Local configuration file (sdk path, etc) 47 | local.properties 48 | 49 | # Proguard folder generated by Eclipse 50 | proguard 51 | 52 | # Log Files 53 | *.log 54 | 55 | # Android Studio Navigation editor temp files 56 | .navigation 57 | 58 | # Android Studio captures folder 59 | captures 60 | 61 | # IntelliJ 62 | *.iml 63 | .idea 64 | 65 | # Keystore files 66 | # Uncomment the following line if you do not want to check your keystore files in. 67 | #*.jks 68 | 69 | # External native build folder generated in Android Studio 2.2 and later 70 | .externalNativeBuild 71 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/app/tab1/tab1.page.ts: -------------------------------------------------------------------------------- 1 | import {Component, NgZone} from '@angular/core'; 2 | import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone'; 3 | import { ExploreContainerComponent } from '../explore-container/explore-container.component'; 4 | import {SendIntent} from "send-intent"; 5 | 6 | @Component({ 7 | selector: 'app-tab1', 8 | templateUrl: 'tab1.page.html', 9 | styleUrls: ['tab1.page.scss'], 10 | standalone: true, 11 | imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent], 12 | }) 13 | export class Tab1Page { 14 | 15 | result: string = ''; 16 | 17 | constructor(private zone: NgZone) {} 18 | 19 | ngOnInit() { 20 | this.checkIntent(); 21 | 22 | window.addEventListener('sendIntentReceived', () => { 23 | this.zone.run(() => { 24 | console.log('sendIntentReceived event triggered'); 25 | // Hier musst du den Angular Router verwenden, um zur gewünschten Route zu navigieren 26 | // z.B., this.router.navigate(['/tab1']); 27 | this.checkIntent(); 28 | }); 29 | }); 30 | } 31 | 32 | async checkIntent() { 33 | try { 34 | const result: any = await SendIntent.checkSendIntentReceived(); 35 | if (result) { 36 | console.log('SendIntent received'); 37 | let res = JSON.stringify(result); 38 | console.log(res); 39 | this.result = res; 40 | // SendIntent.finish(); 41 | } 42 | } catch (error) { 43 | console.error(error); 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | }, 22 | clearContext: false // leave Jasmine Spec Runner output visible in browser 23 | }, 24 | jasmineHtmlReporter: { 25 | suppressAll: true // removes the duplicated traces 26 | }, 27 | coverageReporter: { 28 | dir: require('path').join(__dirname, './coverage/app'), 29 | subdir: '.', 30 | reporters: [ 31 | { type: 'html' }, 32 | { type: 'text-summary' } 33 | ] 34 | }, 35 | reporters: ['progress', 'kjhtml'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false, 42 | restartOnFileChange: true 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/Share/Base.lproj/MainInterface.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/Sources/SendIntentPlugin/SendIntentPlugin.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Capacitor 3 | 4 | /** 5 | * Please read the Capacitor iOS Plugin Development Guide 6 | * here: https://capacitorjs.com/docs/plugins/ios 7 | */ 8 | @objc(SendIntentPlugin) 9 | public class SendIntentPlugin: CAPPlugin, CAPBridgedPlugin { 10 | public let identifier = "SendIntentPlugin" 11 | public let jsName = "SendIntent" 12 | public let pluginMethods: [CAPPluginMethod] = [ 13 | CAPPluginMethod(name: "checkSendIntentReceived", returnType: CAPPluginReturnPromise) 14 | ] 15 | private let implementation = SendIntent() 16 | 17 | let store = ShareStore.store 18 | 19 | @objc func checkSendIntentReceived(_ call: CAPPluginCall) { 20 | if !store.processed { 21 | let firstItem: JSObject? = store.shareItems.first 22 | let additionalItems: Array = store.shareItems.count > 1 ? Array(store.shareItems[1...]) : [] 23 | 24 | call.resolve([ 25 | "title": firstItem?["title"] ?? "", 26 | "description": firstItem?["description"] ?? "", 27 | "type": firstItem?["type"] ?? "", 28 | "url": firstItem?["url"] ?? "", 29 | "additionalItems": additionalItems 30 | ]) 31 | store.processed = true 32 | } else { 33 | call.reject("No processing needed.") 34 | } 35 | } 36 | 37 | @objc func finish(_ call: CAPPluginCall) { 38 | call.resolve(); 39 | } 40 | 41 | public override func load() { 42 | let nc = NotificationCenter.default 43 | nc.addObserver(self, selector: #selector(eval), name: Notification.Name("triggerSendIntent"), object: nil) 44 | } 45 | 46 | @objc open func eval(){ 47 | self.bridge?.eval(js: "window.dispatchEvent(new Event('sendIntentReceived'))"); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | SendIntentExample 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleURLTypes 22 | 23 | 24 | CFBundleTypeRole 25 | Viewer 26 | CFBundleURLName 27 | 28 | CFBundleURLSchemes 29 | 30 | sendintentexample 31 | 32 | 33 | 34 | CFBundleVersion 35 | $(CURRENT_PROJECT_VERSION) 36 | LSRequiresIPhoneOS 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIMainStoryboardFile 41 | Main 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | UIViewControllerBasedStatusBarAppearance 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /android/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 1588168432047 48 | 49 | 50 | 1588168432047 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 52 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' 4 | androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' 5 | androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' 6 | androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' 7 | kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.25' 8 | } 9 | 10 | repositories { 11 | mavenCentral() 12 | google() 13 | } 14 | 15 | dependencies { 16 | classpath 'com.android.tools.build:gradle:8.7.2' 17 | } 18 | } 19 | 20 | apply plugin: 'com.android.library' 21 | 22 | android { 23 | namespace "de.mindlib.sendIntent.sendintent" 24 | compileSdkVersion 35 25 | 26 | defaultConfig { 27 | minSdkVersion 23 28 | targetSdkVersion 35 29 | versionCode 1 30 | versionName "1.0" 31 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 32 | } 33 | 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_21 36 | targetCompatibility JavaVersion.VERSION_21 37 | } 38 | 39 | buildTypes { 40 | release { 41 | minifyEnabled false 42 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 43 | } 44 | } 45 | 46 | lintOptions { 47 | abortOnError false 48 | } 49 | dependencies{ 50 | implementation 'commons-io:commons-io:2.5' 51 | } 52 | } 53 | 54 | repositories { 55 | google() 56 | mavenCentral() 57 | } 58 | 59 | dependencies { 60 | implementation fileTree(dir: 'libs', include: ['*.jar']) 61 | implementation project(':capacitor-android') 62 | testImplementation "junit:junit:$junitVersion" 63 | androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" 64 | androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" 65 | implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" 66 | } -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | namespace "io.ionic.starter" 5 | compileSdkVersion rootProject.ext.compileSdkVersion 6 | defaultConfig { 7 | applicationId "io.ionic.starter" 8 | minSdkVersion rootProject.ext.minSdkVersion 9 | targetSdkVersion rootProject.ext.targetSdkVersion 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | aaptOptions { 14 | // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. 15 | // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 16 | ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' 17 | } 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | repositories { 28 | flatDir{ 29 | dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' 30 | } 31 | } 32 | 33 | dependencies { 34 | implementation fileTree(include: ['*.jar'], dir: 'libs') 35 | implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" 36 | implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" 37 | implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" 38 | implementation project(':capacitor-android') 39 | testImplementation "junit:junit:$junitVersion" 40 | androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" 41 | androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" 42 | implementation project(':capacitor-cordova-android-plugins') 43 | } 44 | 45 | apply from: 'capacitor.build.gradle' 46 | 47 | try { 48 | def servicesJSON = file('google-services.json') 49 | if (servicesJSON.text) { 50 | apply plugin: 'com.google.gms.google-services' 51 | } 52 | } catch(Exception e) { 53 | logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") 54 | } 55 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | namespace "io.ionic.starter" 5 | compileSdkVersion rootProject.ext.compileSdkVersion 6 | defaultConfig { 7 | applicationId "io.ionic.starter" 8 | minSdkVersion rootProject.ext.minSdkVersion 9 | targetSdkVersion rootProject.ext.targetSdkVersion 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | aaptOptions { 14 | // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. 15 | // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 16 | ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' 17 | } 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | repositories { 28 | flatDir{ 29 | dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' 30 | } 31 | } 32 | 33 | dependencies { 34 | implementation fileTree(include: ['*.jar'], dir: 'libs') 35 | implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" 36 | implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" 37 | implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" 38 | implementation project(':capacitor-android') 39 | testImplementation "junit:junit:$junitVersion" 40 | androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" 41 | androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" 42 | implementation project(':capacitor-cordova-android-plugins') 43 | } 44 | 45 | apply from: 'capacitor.build.gradle' 46 | 47 | try { 48 | def servicesJSON = file('google-services.json') 49 | if (servicesJSON.text) { 50 | apply plugin: 'com.google.gms.google-services' 51 | } 52 | } catch(Exception e) { 53 | logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") 54 | } 55 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/pages/Tab1.tsx: -------------------------------------------------------------------------------- 1 | import {IonContent, IonHeader, IonPage, IonTitle, IonToolbar} from '@ionic/react'; 2 | import ExploreContainer from '../components/ExploreContainer'; 3 | import './Tab1.css'; 4 | import {SendIntent} from "send-intent"; 5 | import {Filesystem} from '@capacitor/filesystem'; 6 | import {RouteComponentProps} from "react-router"; 7 | import React, {useEffect, useState} from "react"; 8 | 9 | 10 | const Tab1: React.FC = ({history, location, match}) => { 11 | 12 | const [result, setResult] = useState(''); 13 | 14 | async function checkIntent() { 15 | console.log("check intent") 16 | return SendIntent.checkSendIntentReceived().then(async (result: any) => { 17 | console.log("checked") 18 | console.log(result) 19 | if (result) { 20 | console.log('SendIntent received'); 21 | let res = JSON.stringify(result); 22 | console.log(res); 23 | setResult(res) 24 | 25 | //SendIntent.finish(); 26 | } 27 | } 28 | ).catch(err => console.error(err)); 29 | } 30 | 31 | checkIntent(); 32 | 33 | useEffect(() => { 34 | console.log("adding listener") 35 | //Check-Intent: Es werden beide Varianten benötigt, mit und ohne Listener. Denn je nachdem wie das share 36 | //angesteuert wird lädt die App neu (normaler Aufruf) oder nicht (Listener) 37 | window.addEventListener("sendIntentReceived", () => { 38 | history.push("/tab1") 39 | checkIntent(); 40 | }); 41 | 42 | checkIntent(); 43 | }, []) 44 | 45 | return ( 46 | 47 | 48 | 49 | Tab 1 50 | 51 | 52 | 53 | 54 | 55 | Share object 56 | 57 | 58 | 59 | {result} 60 | 61 | 62 | 63 | ); 64 | }; 65 | 66 | export default Tab1; 67 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/.gitignore: -------------------------------------------------------------------------------- 1 | # Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore 2 | 3 | # Built application files 4 | *.apk 5 | *.aar 6 | *.ap_ 7 | *.aab 8 | 9 | # Files for the ART/Dalvik VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # Generated files 16 | bin/ 17 | gen/ 18 | out/ 19 | # Uncomment the following line in case you need and you don't have the release build type files in your app 20 | # release/ 21 | 22 | # Gradle files 23 | .gradle/ 24 | build/ 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Log Files 33 | *.log 34 | 35 | # Android Studio Navigation editor temp files 36 | .navigation/ 37 | 38 | # Android Studio captures folder 39 | captures/ 40 | 41 | # IntelliJ 42 | *.iml 43 | .idea/workspace.xml 44 | .idea/tasks.xml 45 | .idea/gradle.xml 46 | .idea/assetWizardSettings.xml 47 | .idea/dictionaries 48 | .idea/libraries 49 | # Android Studio 3 in .gitignore file. 50 | .idea/caches 51 | .idea/modules.xml 52 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 53 | .idea/navEditor.xml 54 | 55 | # Keystore files 56 | # Uncomment the following lines if you do not want to check your keystore files in. 57 | #*.jks 58 | #*.keystore 59 | 60 | # External native build folder generated in Android Studio 2.2 and later 61 | .externalNativeBuild 62 | .cxx/ 63 | 64 | # Google Services (e.g. APIs or Firebase) 65 | # google-services.json 66 | 67 | # Freeline 68 | freeline.py 69 | freeline/ 70 | freeline_project_description.json 71 | 72 | # fastlane 73 | fastlane/report.xml 74 | fastlane/Preview.html 75 | fastlane/screenshots 76 | fastlane/test_output 77 | fastlane/readme.md 78 | 79 | # Version control 80 | vcs.xml 81 | 82 | # lint 83 | lint/intermediates/ 84 | lint/generated/ 85 | lint/outputs/ 86 | lint/tmp/ 87 | # lint/reports/ 88 | 89 | # Android Profiling 90 | *.hprof 91 | 92 | # Cordova plugins for Capacitor 93 | capacitor-cordova-android-plugins 94 | 95 | # Copied web assets 96 | app/src/main/assets/public 97 | 98 | # Generated Config files 99 | app/src/main/assets/capacitor.config.json 100 | app/src/main/assets/capacitor.plugins.json 101 | app/src/main/res/xml/config.xml 102 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/.gitignore: -------------------------------------------------------------------------------- 1 | # Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore 2 | 3 | # Built application files 4 | *.apk 5 | *.aar 6 | *.ap_ 7 | *.aab 8 | 9 | # Files for the ART/Dalvik VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # Generated files 16 | bin/ 17 | gen/ 18 | out/ 19 | # Uncomment the following line in case you need and you don't have the release build type files in your app 20 | # release/ 21 | 22 | # Gradle files 23 | .gradle/ 24 | build/ 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Log Files 33 | *.log 34 | 35 | # Android Studio Navigation editor temp files 36 | .navigation/ 37 | 38 | # Android Studio captures folder 39 | captures/ 40 | 41 | # IntelliJ 42 | *.iml 43 | .idea/workspace.xml 44 | .idea/tasks.xml 45 | .idea/gradle.xml 46 | .idea/assetWizardSettings.xml 47 | .idea/dictionaries 48 | .idea/libraries 49 | # Android Studio 3 in .gitignore file. 50 | .idea/caches 51 | .idea/modules.xml 52 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 53 | .idea/navEditor.xml 54 | 55 | # Keystore files 56 | # Uncomment the following lines if you do not want to check your keystore files in. 57 | #*.jks 58 | #*.keystore 59 | 60 | # External native build folder generated in Android Studio 2.2 and later 61 | .externalNativeBuild 62 | .cxx/ 63 | 64 | # Google Services (e.g. APIs or Firebase) 65 | # google-services.json 66 | 67 | # Freeline 68 | freeline.py 69 | freeline/ 70 | freeline_project_description.json 71 | 72 | # fastlane 73 | fastlane/report.xml 74 | fastlane/Preview.html 75 | fastlane/screenshots 76 | fastlane/test_output 77 | fastlane/readme.md 78 | 79 | # Version control 80 | vcs.xml 81 | 82 | # lint 83 | lint/intermediates/ 84 | lint/generated/ 85 | lint/outputs/ 86 | lint/tmp/ 87 | # lint/reports/ 88 | 89 | # Android Profiling 90 | *.hprof 91 | 92 | # Cordova plugins for Capacitor 93 | capacitor-cordova-android-plugins 94 | 95 | # Copied web assets 96 | app/src/main/assets/public 97 | 98 | # Generated Config files 99 | app/src/main/assets/capacitor.config.json 100 | app/src/main/assets/capacitor.plugins.json 101 | app/src/main/res/xml/config.xml 102 | -------------------------------------------------------------------------------- /Example/SendIntentExample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SendIntentExample", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": { 6 | "@capacitor/android": "7.0.1", 7 | "@capacitor/app": "7.0.0", 8 | "@capacitor/core": "7.0.1", 9 | "@capacitor/filesystem": "7.0.0", 10 | "@capacitor/haptics": "7.0.0", 11 | "@capacitor/ios": "7.0.1", 12 | "@capacitor/keyboard": "7.0.0", 13 | "@capacitor/status-bar": "7.0.0", 14 | "@ionic/react": "^8.2.7", 15 | "@ionic/react-router": "^8.2.7", 16 | "@testing-library/jest-dom": "^5.11.9", 17 | "@testing-library/react": "^13.3.0", 18 | "@testing-library/user-event": "^12.6.3", 19 | "@types/jest": "^26.0.20", 20 | "@types/node": "^12.19.15", 21 | "@types/react": "^18.0.17", 22 | "@types/react-dom": "^18.0.6", 23 | "@types/react-router": "^5.1.11", 24 | "@types/react-router-dom": "^5.1.7", 25 | "history": "^4.9.0", 26 | "ionicons": "^7.0.0", 27 | "react": "^18.2.0", 28 | "react-dom": "^18.2.0", 29 | "react-router": "^5.2.0", 30 | "react-router-dom": "^5.2.0", 31 | "react-scripts": "^5.0.0", 32 | "send-intent": "file:../../", 33 | "typescript": "^4.1.3", 34 | "web-vitals": "^0.2.4", 35 | "workbox-background-sync": "^5.1.4", 36 | "workbox-broadcast-update": "^5.1.4", 37 | "workbox-cacheable-response": "^5.1.4", 38 | "workbox-core": "^5.1.4", 39 | "workbox-expiration": "^5.1.4", 40 | "workbox-google-analytics": "^5.1.4", 41 | "workbox-navigation-preload": "^5.1.4", 42 | "workbox-precaching": "^5.1.4", 43 | "workbox-range-requests": "^5.1.4", 44 | "workbox-routing": "^5.1.4", 45 | "workbox-strategies": "^5.1.4", 46 | "workbox-streams": "^5.1.4" 47 | }, 48 | "scripts": { 49 | "start": "react-scripts start", 50 | "build": "react-scripts build", 51 | "test": "react-scripts test --transformIgnorePatterns 'node_modules/(?!(@ionic/react|@ionic/react-router|@ionic/core|@stencil/core|ionicons)/)'", 52 | "eject": "react-scripts eject" 53 | }, 54 | "eslintConfig": { 55 | "extends": [ 56 | "react-app", 57 | "react-app/jest" 58 | ] 59 | }, 60 | "browserslist": [ 61 | "Chrome >=79", 62 | "ChromeAndroid >=79", 63 | "Firefox >=70", 64 | "Edge >=79", 65 | "Safari >=14", 66 | "iOS >=14" 67 | ], 68 | "devDependencies": { 69 | "@capacitor/cli": "^6.1.2" 70 | }, 71 | "description": "An Ionic project" 72 | } 73 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/App.tsx: -------------------------------------------------------------------------------- 1 | import { Redirect, Route } from 'react-router-dom'; 2 | import { 3 | IonApp, 4 | IonIcon, 5 | IonLabel, 6 | IonRouterOutlet, 7 | IonTabBar, 8 | IonTabButton, 9 | IonTabs, 10 | setupIonicReact 11 | } from '@ionic/react'; 12 | import { IonReactRouter } from '@ionic/react-router'; 13 | import { ellipse, square, triangle } from 'ionicons/icons'; 14 | import Tab1 from './pages/Tab1'; 15 | import Tab2 from './pages/Tab2'; 16 | import Tab3 from './pages/Tab3'; 17 | 18 | /* Core CSS required for Ionic components to work properly */ 19 | import '@ionic/react/css/core.css'; 20 | 21 | /* Basic CSS for apps built with Ionic */ 22 | import '@ionic/react/css/normalize.css'; 23 | import '@ionic/react/css/structure.css'; 24 | import '@ionic/react/css/typography.css'; 25 | 26 | /* Optional CSS utils that can be commented out */ 27 | import '@ionic/react/css/padding.css'; 28 | import '@ionic/react/css/float-elements.css'; 29 | import '@ionic/react/css/text-alignment.css'; 30 | import '@ionic/react/css/text-transformation.css'; 31 | import '@ionic/react/css/flex-utils.css'; 32 | import '@ionic/react/css/display.css'; 33 | 34 | /* Theme variables */ 35 | import './theme/variables.css'; 36 | 37 | setupIonicReact(); 38 | 39 | const App: React.FC = () => ( 40 | 41 | 42 | 43 | 44 | }> 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | Tab 1 60 | 61 | 62 | 63 | Tab 2 64 | 65 | 66 | 67 | Tab 3 68 | 69 | 70 | 71 | 72 | 73 | ); 74 | 75 | export default App; 76 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SendIntentExampleAngular", 3 | "version": "0.0.1", 4 | "author": "Ionic Framework", 5 | "homepage": "https://ionicframework.com/", 6 | "scripts": { 7 | "ng": "ng", 8 | "start": "ng serve", 9 | "build": "ng build", 10 | "watch": "ng build --watch --configuration development", 11 | "test": "ng test", 12 | "lint": "ng lint" 13 | }, 14 | "private": true, 15 | "dependencies": { 16 | "@angular/animations": "^16.0.0", 17 | "@angular/common": "^16.0.0", 18 | "@angular/compiler": "^16.0.0", 19 | "@angular/core": "^16.0.0", 20 | "@angular/forms": "^16.0.0", 21 | "@angular/platform-browser": "^16.0.0", 22 | "@angular/platform-browser-dynamic": "^16.0.0", 23 | "@angular/router": "^16.0.0", 24 | "@capacitor/android": "5.5.0", 25 | "@capacitor/app": "5.0.6", 26 | "@capacitor/core": "5.5.0", 27 | "@capacitor/haptics": "5.0.6", 28 | "@capacitor/keyboard": "5.0.6", 29 | "@capacitor/status-bar": "5.0.6", 30 | "@ionic/angular": "^7.5.0", 31 | "ionicons": "^7.2.1", 32 | "rxjs": "~7.8.0", 33 | "send-intent": "^5.0.0", 34 | "tslib": "^2.3.0", 35 | "zone.js": "~0.13.0" 36 | }, 37 | "devDependencies": { 38 | "@angular-devkit/build-angular": "^16.0.0", 39 | "@angular-eslint/builder": "^16.0.0", 40 | "@angular-eslint/eslint-plugin": "^16.0.0", 41 | "@angular-eslint/eslint-plugin-template": "^16.0.0", 42 | "@angular-eslint/schematics": "^16.0.0", 43 | "@angular-eslint/template-parser": "^16.0.0", 44 | "@angular/cli": "^16.0.0", 45 | "@angular/compiler-cli": "^16.0.0", 46 | "@angular/language-service": "^16.0.0", 47 | "@capacitor/cli": "5.5.0", 48 | "@ionic/angular-toolkit": "^9.0.0", 49 | "@types/jasmine": "~4.3.0", 50 | "@types/node": "^12.11.1", 51 | "@typescript-eslint/eslint-plugin": "5.3.0", 52 | "@typescript-eslint/parser": "5.3.0", 53 | "eslint": "^7.26.0", 54 | "eslint-plugin-import": "2.22.1", 55 | "eslint-plugin-jsdoc": "30.7.6", 56 | "eslint-plugin-prefer-arrow": "1.2.2", 57 | "jasmine-core": "~4.6.0", 58 | "jasmine-spec-reporter": "~5.0.0", 59 | "karma": "~6.4.0", 60 | "karma-chrome-launcher": "~3.2.0", 61 | "karma-coverage": "~2.2.0", 62 | "karma-coverage-istanbul-reporter": "~3.0.2", 63 | "karma-jasmine": "~5.1.0", 64 | "karma-jasmine-html-reporter": "~2.0.0", 65 | "ts-node": "^8.3.0", 66 | "typescript": "~5.0.2" 67 | }, 68 | "description": "An Ionic project" 69 | } 70 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 50 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes recent versions of Safari, Chrome (including 12 | * Opera), Edge on the desktop, and iOS and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** 22 | * By default, zone.js will patch all possible macroTask and DomEvents 23 | * user can disable parts of macroTask/DomEvents patch by setting following flags 24 | * because those flags need to be set before `zone.js` being loaded, and webpack 25 | * will put import in the top of bundle, so user need to create a separate file 26 | * in this directory (for example: zone-flags.ts), and put the following flags 27 | * into that file, and then add the following code before importing zone.js. 28 | * import './zone-flags'; 29 | * 30 | * The flags allowed in zone-flags.ts are listed here. 31 | * 32 | * The following flags will work for all browsers. 33 | * 34 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 35 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 36 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 37 | * 38 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 39 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 40 | * 41 | * (window as any).__Zone_enable_cross_context_check = true; 42 | * 43 | */ 44 | 45 | import './zone-flags'; 46 | 47 | /*************************************************************************************************** 48 | * Zone JS is required by default for Angular itself. 49 | */ 50 | import 'zone.js'; // Included with Angular CLI. 51 | 52 | 53 | /*************************************************************************************************** 54 | * APPLICATION IMPORTS 55 | */ 56 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "send-intent", 3 | "version": "7.0.0", 4 | "description": "SendIntent", 5 | "main": "dist/plugin.cjs.js", 6 | "module": "dist/esm/index.js", 7 | "types": "dist/esm/index.d.ts", 8 | "unpkg": "dist/plugin.js", 9 | "files": [ 10 | "android/src/main/", 11 | "android/build.gradle", 12 | "dist/", 13 | "ios/Sources", 14 | "ios/Tests", 15 | "Package.swift", 16 | "SendIntent.podspec" 17 | ], 18 | "author": "Carsten Klaffke", 19 | "license": "MIT", 20 | "publishConfig": { 21 | "registry": "https://npm.pkg.github.com/" 22 | }, 23 | "repository": { 24 | "type": "git", 25 | "url": "git+https://github.com/carsten-klaffke/send-intent.git" 26 | }, 27 | "bugs": { 28 | "url": "https://github.com/carsten-klaffke/send-intent/issues" 29 | }, 30 | "keywords": [ 31 | "capacitor", 32 | "plugin", 33 | "native" 34 | ], 35 | "scripts": { 36 | "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", 37 | "verify:ios": "xcodebuild -scheme SendIntent -destination generic/platform=iOS", 38 | "verify:android": "cd android && ./gradlew clean build test && cd ..", 39 | "verify:web": "npm run build", 40 | "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", 41 | "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format", 42 | "eslint": "eslint . --ext ts", 43 | "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java", 44 | "swiftlint": "node-swiftlint", 45 | "docgen": "docgen --api SendIntentPlugin --output-readme README.md --output-json dist/docs.json", 46 | "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", 47 | "clean": "rimraf ./dist", 48 | "watch": "tsc --watch", 49 | "prepublishOnly": "npm run build" 50 | }, 51 | "devDependencies": { 52 | "@capacitor/android": "^7.0.0", 53 | "@capacitor/core": "^7.0.0", 54 | "@capacitor/docgen": "^0.3.0", 55 | "@capacitor/ios": "^7.0.0", 56 | "@ionic/eslint-config": "^0.4.0", 57 | "@ionic/prettier-config": "^4.0.0", 58 | "@ionic/swiftlint-config": "^2.0.0", 59 | "@types/node": "^22.13.5", 60 | "eslint": "^8.57.0", 61 | "prettier": "^3.4.2", 62 | "prettier-plugin-java": "^2.6.6", 63 | "rimraf": "^6.0.1", 64 | "rollup": "^4.30.1", 65 | "swiftlint": "^2.0.0", 66 | "typescript": "^5.7.3" 67 | }, 68 | "peerDependencies": { 69 | "@capacitor/core": ">=7.0.0" 70 | }, 71 | "prettier": "@ionic/prettier-config", 72 | "swiftlint": "@ionic/swiftlint-config", 73 | "eslintConfig": { 74 | "extends": "@ionic/eslint-config/recommended" 75 | }, 76 | "capacitor": { 77 | "ios": { 78 | "src": "ios" 79 | }, 80 | "android": { 81 | "src": "android" 82 | } 83 | }, 84 | "dependencies": { 85 | "@capacitor/cli": "^7.0.0" 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 42 | 44 | 50 | 51 | 52 | 53 | 59 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/service-worker.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /* eslint-disable no-restricted-globals */ 3 | 4 | // This service worker can be customized! 5 | // See https://developers.google.com/web/tools/workbox/modules 6 | // for the list of available Workbox modules, or add any other 7 | // code you'd like. 8 | // You can also remove this file if you'd prefer not to use a 9 | // service worker, and the Workbox build step will be skipped. 10 | 11 | import { clientsClaim } from 'workbox-core'; 12 | import { ExpirationPlugin } from 'workbox-expiration'; 13 | import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'; 14 | import { registerRoute } from 'workbox-routing'; 15 | import { StaleWhileRevalidate } from 'workbox-strategies'; 16 | 17 | declare const self: ServiceWorkerGlobalScope; 18 | 19 | clientsClaim(); 20 | 21 | // Precache all of the assets generated by your build process. 22 | // Their URLs are injected into the manifest variable below. 23 | // This variable must be present somewhere in your service worker file, 24 | // even if you decide not to use precaching. See https://cra.link/PWA 25 | precacheAndRoute(self.__WB_MANIFEST); 26 | 27 | // Set up App Shell-style routing, so that all navigation requests 28 | // are fulfilled with your index.html shell. Learn more at 29 | // https://developers.google.com/web/fundamentals/architecture/app-shell 30 | const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$'); 31 | registerRoute( 32 | // Return false to exempt requests from being fulfilled by index.html. 33 | ({ request, url }: { request: Request; url: URL }) => { 34 | // If this isn't a navigation, skip. 35 | if (request.mode !== 'navigate') { 36 | return false; 37 | } 38 | 39 | // If this is a URL that starts with /_, skip. 40 | if (url.pathname.startsWith('/_')) { 41 | return false; 42 | } 43 | 44 | // If this looks like a URL for a resource, because it contains 45 | // a file extension, skip. 46 | if (url.pathname.match(fileExtensionRegexp)) { 47 | return false; 48 | } 49 | 50 | // Return true to signal that we want to use the handler. 51 | return true; 52 | }, 53 | createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html') 54 | ); 55 | 56 | // An example runtime caching route for requests that aren't handled by the 57 | // precache, in this case same-origin .png requests like those from in public/ 58 | registerRoute( 59 | // Add in any other file extensions or routing criteria as needed. 60 | ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'), 61 | // Customize this strategy as needed, e.g., by changing to CacheFirst. 62 | new StaleWhileRevalidate({ 63 | cacheName: 'images', 64 | plugins: [ 65 | // Ensure that once this runtime cache reaches a maximum size the 66 | // least-recently used images are removed. 67 | new ExpirationPlugin({ maxEntries: 50 }), 68 | ], 69 | }) 70 | ); 71 | 72 | // This allows the web app to trigger skipWaiting via 73 | // registration.waiting.postMessage({type: 'SKIP_WAITING'}) 74 | self.addEventListener('message', (event) => { 75 | if (event.data && event.data.type === 'SKIP_WAITING') { 76 | self.skipWaiting(); 77 | } 78 | }); 79 | 80 | // Any other custom service worker logic can go here. 81 | -------------------------------------------------------------------------------- /android/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 | 32 | 33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 | 88 | 89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 | 100 | 101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /android/src/main/java/de/mindlib/sendIntent/SendIntent.java: -------------------------------------------------------------------------------- 1 | package de.mindlib.sendIntent; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.database.Cursor; 6 | import android.net.Uri; 7 | import android.provider.OpenableColumns; 8 | 9 | import com.getcapacitor.JSArray; 10 | import com.getcapacitor.JSObject; 11 | import com.getcapacitor.Plugin; 12 | import com.getcapacitor.PluginCall; 13 | import com.getcapacitor.PluginMethod; 14 | import com.getcapacitor.annotation.CapacitorPlugin; 15 | 16 | import org.apache.commons.io.IOUtils; 17 | 18 | import java.io.File; 19 | import java.io.FileNotFoundException; 20 | import java.io.FileOutputStream; 21 | import java.io.IOException; 22 | import java.io.InputStream; 23 | import java.util.ArrayList; 24 | import java.util.List; 25 | 26 | @CapacitorPlugin() 27 | public class SendIntent extends Plugin { 28 | 29 | @PluginMethod 30 | public void checkSendIntentReceived(PluginCall call) { 31 | Intent intent = bridge.getActivity().getIntent(); 32 | String action = intent.getAction(); 33 | String type = intent.getType(); 34 | if (Intent.ACTION_SEND.equals(action) && type != null) { 35 | call.resolve(readItemAt(intent, type, 0)); 36 | } else if (Intent.ACTION_SEND_MULTIPLE.equals(action) && type != null) { 37 | JSObject ret = readItemAt(intent, type, 0); 38 | List additionalItems = new ArrayList(); 39 | 40 | for (int index = 1; index < intent.getClipData().getItemCount(); index++) { 41 | additionalItems.add(readItemAt(intent, type, index)); 42 | } 43 | ret.put("additionalItems", new JSArray(additionalItems)); 44 | call.resolve(ret); 45 | } else { 46 | call.reject("No processing needed"); 47 | } 48 | } 49 | 50 | @PluginMethod 51 | public void finish(PluginCall call) { 52 | bridge.getActivity().finish(); 53 | } 54 | 55 | private JSObject readItemAt(Intent intent, String type, int index) { 56 | JSObject ret = new JSObject(); 57 | String title = intent.getStringExtra(Intent.EXTRA_SUBJECT); 58 | Uri uri = null; 59 | 60 | if (intent.getClipData() != null && intent.getClipData().getItemAt(index) != null) 61 | uri = intent.getClipData().getItemAt(index).getUri(); 62 | 63 | String url = null; 64 | 65 | //Handling web links as url 66 | if ("text/plain".equals(type) && intent.getStringExtra(Intent.EXTRA_TEXT) != null) { 67 | url = intent.getStringExtra(Intent.EXTRA_TEXT); 68 | } 69 | //Handling files as url 70 | else if (uri != null) { 71 | final Uri copyfileUri = copyfile(uri); 72 | url = (copyfileUri != null) ? copyfileUri.toString() : null; 73 | } 74 | 75 | if (title == null && uri != null) 76 | title = readFileName(uri); 77 | 78 | ret.put("title", title); 79 | ret.put("description", null); 80 | ret.put("type", type); 81 | ret.put("url", url); 82 | return ret; 83 | } 84 | 85 | public String readFileName(Uri uri) { 86 | Cursor returnCursor = 87 | getContext().getContentResolver().query(uri, null, null, null, null); 88 | /* 89 | * Get the column indexes of the data in the Cursor, 90 | * move to the first row in the Cursor, get the data, 91 | * and display it. 92 | */ 93 | returnCursor.moveToFirst(); 94 | return returnCursor.getString(returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); 95 | } 96 | 97 | Uri copyfile(Uri uri) { 98 | final String fileName = readFileName(uri); 99 | File file = new File(getContext().getFilesDir(), fileName); 100 | 101 | try (FileOutputStream outputStream = getContext().openFileOutput(fileName, Context.MODE_PRIVATE); 102 | InputStream inputStream = getContext().getContentResolver().openInputStream(uri)) { 103 | IOUtils.copy(inputStream, outputStream); 104 | return Uri.fromFile(file); 105 | } catch (FileNotFoundException fileNotFoundException) { 106 | fileNotFoundException.printStackTrace(); 107 | } catch (IOException ioException) { 108 | ioException.printStackTrace(); 109 | } 110 | return null; 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /Example/SendIntentExample/ios/App/App/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import SendIntent 2 | import UIKit 3 | import Capacitor 4 | 5 | @UIApplicationMain 6 | class AppDelegate: UIResponder, UIApplicationDelegate { 7 | 8 | var window: UIWindow? 9 | 10 | let store = ShareStore.store 11 | 12 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 13 | // Override point for customization after application launch. 14 | return true 15 | } 16 | 17 | func applicationWillResignActive(_ application: UIApplication) { 18 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 19 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 20 | } 21 | 22 | func applicationDidEnterBackground(_ application: UIApplication) { 23 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 24 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 25 | } 26 | 27 | func applicationWillEnterForeground(_ application: UIApplication) { 28 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 29 | } 30 | 31 | func applicationDidBecomeActive(_ application: UIApplication) { 32 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 33 | } 34 | 35 | func applicationWillTerminate(_ application: UIApplication) { 36 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 37 | } 38 | 39 | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { 40 | 41 | var success = true 42 | if CAPBridge.handleOpenUrl(url, options) { 43 | success = ApplicationDelegateProxy.shared.application(app, open: url, options: options) 44 | } 45 | 46 | guard let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true), 47 | let params = components.queryItems else { 48 | return false 49 | } 50 | let titles = params.filter { $0.name == "title" } 51 | let descriptions = params.filter { $0.name == "description" } 52 | let types = params.filter { $0.name == "type" } 53 | let urls = params.filter { $0.name == "url" } 54 | 55 | store.shareItems.removeAll() 56 | 57 | if(titles.count > 0){ 58 | for index in 0...titles.count-1 { 59 | var shareItem: JSObject = JSObject() 60 | shareItem["title"] = titles[index].value! 61 | shareItem["description"] = descriptions[index].value! 62 | shareItem["type"] = types[index].value! 63 | shareItem["url"] = urls[index].value! 64 | store.shareItems.append(shareItem) 65 | } 66 | } 67 | 68 | store.processed = false 69 | let nc = NotificationCenter.default 70 | nc.post(name: Notification.Name("triggerSendIntent"), object: nil ) 71 | 72 | return success 73 | } 74 | 75 | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { 76 | // Called when the app was launched with an activity, including Universal Links. 77 | // Feel free to add additional processing here, but if you want the App API to support 78 | // tracking app url opens, make sure to keep this call 79 | return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler) 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /Example/SendIntentExampleAngular/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "app": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@ionic/angular-toolkit:page": { 10 | "styleext": "scss", 11 | "standalone": true 12 | } 13 | }, 14 | "root": "", 15 | "sourceRoot": "src", 16 | "prefix": "app", 17 | "architect": { 18 | "build": { 19 | "builder": "@angular-devkit/build-angular:browser", 20 | "options": { 21 | "outputPath": "www", 22 | "index": "src/index.html", 23 | "main": "src/main.ts", 24 | "polyfills": "src/polyfills.ts", 25 | "tsConfig": "tsconfig.app.json", 26 | "inlineStyleLanguage": "scss", 27 | "assets": [ 28 | { 29 | "glob": "**/*", 30 | "input": "src/assets", 31 | "output": "assets" 32 | } 33 | ], 34 | "styles": ["src/theme/variables.scss", "src/global.scss"], 35 | "scripts": [] 36 | }, 37 | "configurations": { 38 | "production": { 39 | "budgets": [ 40 | { 41 | "type": "initial", 42 | "maximumWarning": "2mb", 43 | "maximumError": "5mb" 44 | }, 45 | { 46 | "type": "anyComponentStyle", 47 | "maximumWarning": "2kb", 48 | "maximumError": "4kb" 49 | } 50 | ], 51 | "fileReplacements": [ 52 | { 53 | "replace": "src/environments/environment.ts", 54 | "with": "src/environments/environment.prod.ts" 55 | } 56 | ], 57 | "outputHashing": "all" 58 | }, 59 | "development": { 60 | "buildOptimizer": false, 61 | "optimization": false, 62 | "vendorChunk": true, 63 | "extractLicenses": false, 64 | "sourceMap": true, 65 | "namedChunks": true 66 | }, 67 | "ci": { 68 | "progress": false 69 | } 70 | }, 71 | "defaultConfiguration": "production" 72 | }, 73 | "serve": { 74 | "builder": "@angular-devkit/build-angular:dev-server", 75 | "configurations": { 76 | "production": { 77 | "browserTarget": "app:build:production" 78 | }, 79 | "development": { 80 | "browserTarget": "app:build:development" 81 | }, 82 | "ci": { 83 | "progress": false 84 | } 85 | }, 86 | "defaultConfiguration": "development" 87 | }, 88 | "extract-i18n": { 89 | "builder": "@angular-devkit/build-angular:extract-i18n", 90 | "options": { 91 | "browserTarget": "app:build" 92 | } 93 | }, 94 | "test": { 95 | "builder": "@angular-devkit/build-angular:karma", 96 | "options": { 97 | "main": "src/test.ts", 98 | "polyfills": "src/polyfills.ts", 99 | "tsConfig": "tsconfig.spec.json", 100 | "karmaConfig": "karma.conf.js", 101 | "inlineStyleLanguage": "scss", 102 | "assets": [ 103 | { 104 | "glob": "**/*", 105 | "input": "src/assets", 106 | "output": "assets" 107 | } 108 | ], 109 | "styles": ["src/theme/variables.scss", "src/global.scss"], 110 | "scripts": [] 111 | }, 112 | "configurations": { 113 | "ci": { 114 | "progress": false, 115 | "watch": false 116 | } 117 | } 118 | }, 119 | "lint": { 120 | "builder": "@angular-eslint/builder:lint", 121 | "options": { 122 | "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"] 123 | } 124 | } 125 | } 126 | } 127 | }, 128 | "cli": { 129 | "schematicCollections": [ 130 | "@ionic/angular-toolkit" 131 | ], 132 | "analytics": false 133 | }, 134 | "schematics": { 135 | "@ionic/angular-toolkit:component": { 136 | "styleext": "scss" 137 | }, 138 | "@ionic/angular-toolkit:page": { 139 | "styleext": "scss" 140 | }, 141 | "@angular-eslint/schematics:application": { 142 | "setParserOptionsProject": true 143 | }, 144 | "@angular-eslint/schematics:library": { 145 | "setParserOptionsProject": true 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | mail@carsten-klaffke.de. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /Example/SendIntentExample/src/serviceWorkerRegistration.ts: -------------------------------------------------------------------------------- 1 | // This optional code is used to register a service worker. 2 | // register() is not called by default. 3 | 4 | // This lets the app load faster on subsequent visits in production, and gives 5 | // it offline capabilities. However, it also means that developers (and users) 6 | // will only see deployed updates on subsequent visits to a page, after all the 7 | // existing tabs open on the page have been closed, since previously cached 8 | // resources are updated in the background. 9 | 10 | // To learn more about the benefits of this model and instructions on how to 11 | // opt-in, read https://cra.link/PWA 12 | 13 | const isLocalhost = Boolean( 14 | window.location.hostname === 'localhost' || 15 | // [::1] is the IPv6 localhost address. 16 | window.location.hostname === '[::1]' || 17 | // 127.0.0.0/8 are considered localhost for IPv4. 18 | window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) 19 | ); 20 | 21 | type Config = { 22 | onSuccess?: (registration: ServiceWorkerRegistration) => void; 23 | onUpdate?: (registration: ServiceWorkerRegistration) => void; 24 | }; 25 | 26 | export function register(config?: Config) { 27 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 28 | // The URL constructor is available in all browsers that support SW. 29 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); 30 | if (publicUrl.origin !== window.location.origin) { 31 | // Our service worker won't work if PUBLIC_URL is on a different origin 32 | // from what our page is served on. This might happen if a CDN is used to 33 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374 34 | return; 35 | } 36 | 37 | window.addEventListener('load', () => { 38 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 39 | 40 | if (isLocalhost) { 41 | // This is running on localhost. Let's check if a service worker still exists or not. 42 | checkValidServiceWorker(swUrl, config); 43 | 44 | // Add some additional logging to localhost, pointing developers to the 45 | // service worker/PWA documentation. 46 | navigator.serviceWorker.ready.then(() => { 47 | console.log( 48 | 'This web app is being served cache-first by a service ' + 49 | 'worker. To learn more, visit https://cra.link/PWA' 50 | ); 51 | }); 52 | } else { 53 | // Is not localhost. Just register service worker 54 | registerValidSW(swUrl, config); 55 | } 56 | }); 57 | } 58 | } 59 | 60 | function registerValidSW(swUrl: string, config?: Config) { 61 | navigator.serviceWorker 62 | .register(swUrl) 63 | .then((registration) => { 64 | registration.onupdatefound = () => { 65 | const installingWorker = registration.installing; 66 | if (installingWorker == null) { 67 | return; 68 | } 69 | installingWorker.onstatechange = () => { 70 | if (installingWorker.state === 'installed') { 71 | if (navigator.serviceWorker.controller) { 72 | // At this point, the updated precached content has been fetched, 73 | // but the previous service worker will still serve the older 74 | // content until all client tabs are closed. 75 | console.log( 76 | 'New content is available and will be used when all ' + 77 | 'tabs for this page are closed. See https://cra.link/PWA.' 78 | ); 79 | 80 | // Execute callback 81 | if (config && config.onUpdate) { 82 | config.onUpdate(registration); 83 | } 84 | } else { 85 | // At this point, everything has been precached. 86 | // It's the perfect time to display a 87 | // "Content is cached for offline use." message. 88 | console.log('Content is cached for offline use.'); 89 | 90 | // Execute callback 91 | if (config && config.onSuccess) { 92 | config.onSuccess(registration); 93 | } 94 | } 95 | } 96 | }; 97 | }; 98 | }) 99 | .catch((error) => { 100 | console.error('Error during service worker registration:', error); 101 | }); 102 | } 103 | 104 | function checkValidServiceWorker(swUrl: string, config?: Config) { 105 | // Check if the service worker can be found. If it can't reload the page. 106 | fetch(swUrl, { 107 | headers: { 'Service-Worker': 'script' }, 108 | }) 109 | .then((response) => { 110 | // Ensure service worker exists, and that we really are getting a JS file. 111 | const contentType = response.headers.get('content-type'); 112 | if ( 113 | response.status === 404 || 114 | (contentType != null && contentType.indexOf('javascript') === -1) 115 | ) { 116 | // No service worker found. Probably a different app. Reload the page. 117 | navigator.serviceWorker.ready.then((registration) => { 118 | registration.unregister().then(() => { 119 | window.location.reload(); 120 | }); 121 | }); 122 | } else { 123 | // Service worker found. Proceed as normal. 124 | registerValidSW(swUrl, config); 125 | } 126 | }) 127 | .catch(() => { 128 | console.log('No internet connection found. App is running in offline mode.'); 129 | }); 130 | } 131 | 132 | export function unregister() { 133 | if ('serviceWorker' in navigator) { 134 | navigator.serviceWorker.ready 135 | .then((registration) => { 136 | registration.unregister(); 137 | }) 138 | .catch((error) => { 139 | console.error(error.message); 140 | }); 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /Example/SendIntentExample/android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | --------------------------------------------------------------------------------
4 | Explore 5 | UI Components 11 |
Explore UI Components