Skip to content

Commit 059067f

Browse files
committed
Support for sharing hex files through mobile share APIs
1 parent 1221de2 commit 059067f

34 files changed

+885
-24
lines changed

android/app/capacitor.build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies {
1313
implementation project(':capacitor-community-safe-area')
1414
implementation project(':capacitor-app')
1515
implementation project(':capacitor-filesystem')
16+
implementation project(':capacitor-share')
1617
implementation project(':microbit-capacitor-community-nordic-dfu')
1718

1819
}

android/capacitor.settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/
1414
include ':capacitor-filesystem'
1515
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
1616

17+
include ':capacitor-share'
18+
project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android')
19+
1720
include ':microbit-capacitor-community-nordic-dfu'
1821
project(':microbit-capacitor-community-nordic-dfu').projectDir = new File('../node_modules/@microbit/capacitor-community-nordic-dfu/android')

ios/App/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def capacitor_pods
1515
pod 'CapacitorCommunitySafeArea', :path => '../../node_modules/@capacitor-community/safe-area'
1616
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
1717
pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem'
18+
pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share'
1819
pod 'MicrobitCapacitorCommunityNordicDfu', :path => '../../node_modules/@microbit/capacitor-community-nordic-dfu'
1920
end
2021

ios/App/Podfile.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ PODS:
1111
- CapacitorFilesystem (7.1.6):
1212
- Capacitor
1313
- IONFilesystemLib (~> 1.0.1)
14+
- CapacitorShare (7.0.3):
15+
- Capacitor
1416
- IONFilesystemLib (1.0.1)
1517
- MicrobitCapacitorCommunityNordicDfu (7.0.0-microbit.3):
1618
- Capacitor
@@ -26,6 +28,7 @@ DEPENDENCIES:
2628
- "CapacitorCommunitySafeArea (from `../../node_modules/@capacitor-community/safe-area`)"
2729
- "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"
2830
- "CapacitorFilesystem (from `../../node_modules/@capacitor/filesystem`)"
31+
- "CapacitorShare (from `../../node_modules/@capacitor/share`)"
2932
- "MicrobitCapacitorCommunityNordicDfu (from `../../node_modules/@microbit/capacitor-community-nordic-dfu`)"
3033

3134
SPEC REPOS:
@@ -47,6 +50,8 @@ EXTERNAL SOURCES:
4750
:path: "../../node_modules/@capacitor/ios"
4851
CapacitorFilesystem:
4952
:path: "../../node_modules/@capacitor/filesystem"
53+
CapacitorShare:
54+
:path: "../../node_modules/@capacitor/share"
5055
MicrobitCapacitorCommunityNordicDfu:
5156
:path: "../../node_modules/@microbit/capacitor-community-nordic-dfu"
5257

@@ -57,11 +62,12 @@ SPEC CHECKSUMS:
5762
CapacitorCommunitySafeArea: 53e3ad999bada9892cb4e9aca8fa8012aabad4b2
5863
CapacitorCordova: bf648a636f3c153f652d312ae145fb508b6ffced
5964
CapacitorFilesystem: 66f05ee0d8b1ccdc00d509091273a9b3b57c4a0b
65+
CapacitorShare: a4f4f86eabd4b3ff52ba6a11b754713c6926a8d1
6066
IONFilesystemLib: 89258b8e3e85465da93127d25d7ce37f977e8a6f
6167
MicrobitCapacitorCommunityNordicDfu: 2fc86a9ebd698d5609023cafd74ece8b5d64a59e
6268
NordicDFU: 116a4ec458945889f8e0e71759e03b23c39c3482
6369
ZIPFoundation: b8c29ea7ae353b309bc810586181fd073cb3312c
6470

65-
PODFILE CHECKSUM: 1b18202e6f59ad2a7694de09b5a672105ac90e81
71+
PODFILE CHECKSUM: b4fd1fe7cd243f3e6da8924a0ec5f1728011559c
6672

6773
COCOAPODS: 1.16.2

lang/ui.ca.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@
163163
"defaultMessage": "Confirma i desa",
164164
"description": "Confirm and save action label"
165165
},
166+
"confirm-share-action": {
167+
"defaultMessage": "Confirm and share",
168+
"description": "Confirm and share action label"
169+
},
166170
"connect-action": {
167171
"defaultMessage": "Connecta",
168172
"description": "Connect action to connect to data collection micro:bit via Bluetooth or micro:bit radio"
@@ -1611,6 +1615,30 @@
16111615
"defaultMessage": "Menú de les accions de configuració",
16121616
"description": "Label for settings actions menu button"
16131617
},
1618+
"share-action": {
1619+
"defaultMessage": "Share",
1620+
"description": "Label for action that intiiates sharing the project on mobile"
1621+
},
1622+
"share-hex-dialog-heading": {
1623+
"defaultMessage": "Share project as hex file",
1624+
"description": "Heading for the dialog shown when sharing a hex file on mobile"
1625+
},
1626+
"share-hex-dialog-message1": {
1627+
"defaultMessage": "The shared object contains your actions, data samples and your MakeCode project.",
1628+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1629+
},
1630+
"share-hex-dialog-message2": {
1631+
"defaultMessage": "You can also share it to the Files app on your device, or send to cloud storage.",
1632+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1633+
},
1634+
"sharing-description": {
1635+
"defaultMessage": "Preparing project for sharing.",
1636+
"description": "Sharing progress dialog text for mobile"
1637+
},
1638+
"sharing-title": {
1639+
"defaultMessage": "Sharing…",
1640+
"description": "Sharing progress title"
1641+
},
16141642
"show-graphs-checkbox-label-text": {
16151643
"defaultMessage": "Mostra gràfics",
16161644
"description": "Show graphs checkbox label text"

lang/ui.en.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@
163163
"defaultMessage": "Confirm and save",
164164
"description": "Confirm and save action label"
165165
},
166+
"confirm-share-action": {
167+
"defaultMessage": "Confirm and share",
168+
"description": "Confirm and share action label"
169+
},
166170
"connect-action": {
167171
"defaultMessage": "Connect",
168172
"description": "Connect action to connect to data collection micro:bit via Bluetooth or micro:bit radio"
@@ -1611,6 +1615,30 @@
16111615
"defaultMessage": "Settings actions menu",
16121616
"description": "Label for settings actions menu button"
16131617
},
1618+
"share-action": {
1619+
"defaultMessage": "Share",
1620+
"description": "Label for action that intiiates sharing the project on mobile"
1621+
},
1622+
"share-hex-dialog-heading": {
1623+
"defaultMessage": "Share project as hex file",
1624+
"description": "Heading for the dialog shown when sharing a hex file on mobile"
1625+
},
1626+
"share-hex-dialog-message1": {
1627+
"defaultMessage": "The shared object contains your actions, data samples and your MakeCode project.",
1628+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1629+
},
1630+
"share-hex-dialog-message2": {
1631+
"defaultMessage": "You can also share it to the Files app on your device, or send to cloud storage.",
1632+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1633+
},
1634+
"sharing-description": {
1635+
"defaultMessage": "Preparing project for sharing.",
1636+
"description": "Sharing progress dialog text for mobile"
1637+
},
1638+
"sharing-title": {
1639+
"defaultMessage": "Sharing…",
1640+
"description": "Sharing progress title"
1641+
},
16141642
"show-graphs-checkbox-label-text": {
16151643
"defaultMessage": "Show graphs",
16161644
"description": "Show graphs checkbox label text"

lang/ui.es-es.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@
163163
"defaultMessage": "Confirmar y guardar",
164164
"description": "Confirm and save action label"
165165
},
166+
"confirm-share-action": {
167+
"defaultMessage": "Confirm and share",
168+
"description": "Confirm and share action label"
169+
},
166170
"connect-action": {
167171
"defaultMessage": "Conectar",
168172
"description": "Connect action to connect to data collection micro:bit via Bluetooth or micro:bit radio"
@@ -1611,6 +1615,30 @@
16111615
"defaultMessage": "Menú de acciones de configuración",
16121616
"description": "Label for settings actions menu button"
16131617
},
1618+
"share-action": {
1619+
"defaultMessage": "Share",
1620+
"description": "Label for action that intiiates sharing the project on mobile"
1621+
},
1622+
"share-hex-dialog-heading": {
1623+
"defaultMessage": "Share project as hex file",
1624+
"description": "Heading for the dialog shown when sharing a hex file on mobile"
1625+
},
1626+
"share-hex-dialog-message1": {
1627+
"defaultMessage": "The shared object contains your actions, data samples and your MakeCode project.",
1628+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1629+
},
1630+
"share-hex-dialog-message2": {
1631+
"defaultMessage": "You can also share it to the Files app on your device, or send to cloud storage.",
1632+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1633+
},
1634+
"sharing-description": {
1635+
"defaultMessage": "Preparing project for sharing.",
1636+
"description": "Sharing progress dialog text for mobile"
1637+
},
1638+
"sharing-title": {
1639+
"defaultMessage": "Sharing…",
1640+
"description": "Sharing progress title"
1641+
},
16141642
"show-graphs-checkbox-label-text": {
16151643
"defaultMessage": "Mostrar gráficos",
16161644
"description": "Show graphs checkbox label text"

lang/ui.fr.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@
163163
"defaultMessage": "Confirmer et enregistrer",
164164
"description": "Confirm and save action label"
165165
},
166+
"confirm-share-action": {
167+
"defaultMessage": "Confirm and share",
168+
"description": "Confirm and share action label"
169+
},
166170
"connect-action": {
167171
"defaultMessage": "Se connecter",
168172
"description": "Connect action to connect to data collection micro:bit via Bluetooth or micro:bit radio"
@@ -1611,6 +1615,30 @@
16111615
"defaultMessage": "Menu d'actions des paramètres",
16121616
"description": "Label for settings actions menu button"
16131617
},
1618+
"share-action": {
1619+
"defaultMessage": "Share",
1620+
"description": "Label for action that intiiates sharing the project on mobile"
1621+
},
1622+
"share-hex-dialog-heading": {
1623+
"defaultMessage": "Share project as hex file",
1624+
"description": "Heading for the dialog shown when sharing a hex file on mobile"
1625+
},
1626+
"share-hex-dialog-message1": {
1627+
"defaultMessage": "The shared object contains your actions, data samples and your MakeCode project.",
1628+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1629+
},
1630+
"share-hex-dialog-message2": {
1631+
"defaultMessage": "You can also share it to the Files app on your device, or send to cloud storage.",
1632+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1633+
},
1634+
"sharing-description": {
1635+
"defaultMessage": "Preparing project for sharing.",
1636+
"description": "Sharing progress dialog text for mobile"
1637+
},
1638+
"sharing-title": {
1639+
"defaultMessage": "Sharing…",
1640+
"description": "Sharing progress title"
1641+
},
16141642
"show-graphs-checkbox-label-text": {
16151643
"defaultMessage": "Afficher les graphiques",
16161644
"description": "Show graphs checkbox label text"

lang/ui.ja.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@
163163
"defaultMessage": "確認して保存",
164164
"description": "Confirm and save action label"
165165
},
166+
"confirm-share-action": {
167+
"defaultMessage": "Confirm and share",
168+
"description": "Confirm and share action label"
169+
},
166170
"connect-action": {
167171
"defaultMessage": "接続",
168172
"description": "Connect action to connect to data collection micro:bit via Bluetooth or micro:bit radio"
@@ -1611,6 +1615,30 @@
16111615
"defaultMessage": "設定アクションメニュー",
16121616
"description": "Label for settings actions menu button"
16131617
},
1618+
"share-action": {
1619+
"defaultMessage": "Share",
1620+
"description": "Label for action that intiiates sharing the project on mobile"
1621+
},
1622+
"share-hex-dialog-heading": {
1623+
"defaultMessage": "Share project as hex file",
1624+
"description": "Heading for the dialog shown when sharing a hex file on mobile"
1625+
},
1626+
"share-hex-dialog-message1": {
1627+
"defaultMessage": "The shared object contains your actions, data samples and your MakeCode project.",
1628+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1629+
},
1630+
"share-hex-dialog-message2": {
1631+
"defaultMessage": "You can also share it to the Files app on your device, or send to cloud storage.",
1632+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1633+
},
1634+
"sharing-description": {
1635+
"defaultMessage": "Preparing project for sharing.",
1636+
"description": "Sharing progress dialog text for mobile"
1637+
},
1638+
"sharing-title": {
1639+
"defaultMessage": "Sharing…",
1640+
"description": "Sharing progress title"
1641+
},
16141642
"show-graphs-checkbox-label-text": {
16151643
"defaultMessage": "グラフを表示",
16161644
"description": "Show graphs checkbox label text"

lang/ui.ko.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@
163163
"defaultMessage": "확인 및 저장",
164164
"description": "Confirm and save action label"
165165
},
166+
"confirm-share-action": {
167+
"defaultMessage": "Confirm and share",
168+
"description": "Confirm and share action label"
169+
},
166170
"connect-action": {
167171
"defaultMessage": "연결하기",
168172
"description": "Connect action to connect to data collection micro:bit via Bluetooth or micro:bit radio"
@@ -1611,6 +1615,30 @@
16111615
"defaultMessage": "설정 행동 메뉴",
16121616
"description": "Label for settings actions menu button"
16131617
},
1618+
"share-action": {
1619+
"defaultMessage": "Share",
1620+
"description": "Label for action that intiiates sharing the project on mobile"
1621+
},
1622+
"share-hex-dialog-heading": {
1623+
"defaultMessage": "Share project as hex file",
1624+
"description": "Heading for the dialog shown when sharing a hex file on mobile"
1625+
},
1626+
"share-hex-dialog-message1": {
1627+
"defaultMessage": "The shared object contains your actions, data samples and your MakeCode project.",
1628+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1629+
},
1630+
"share-hex-dialog-message2": {
1631+
"defaultMessage": "You can also share it to the Files app on your device, or send to cloud storage.",
1632+
"description": "Text in the dialog shown when sharing a hex file on mobile"
1633+
},
1634+
"sharing-description": {
1635+
"defaultMessage": "Preparing project for sharing.",
1636+
"description": "Sharing progress dialog text for mobile"
1637+
},
1638+
"sharing-title": {
1639+
"defaultMessage": "Sharing…",
1640+
"description": "Sharing progress title"
1641+
},
16141642
"show-graphs-checkbox-label-text": {
16151643
"defaultMessage": "그래프 표시",
16161644
"description": "Show graphs checkbox label text"

0 commit comments

Comments
 (0)