Skip to content

Commit

Permalink
ReceiveSharingIntent update fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HemantKArya committed Apr 9, 2024
1 parent fae925c commit 2a3420a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ jobs:
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ./android/key.properties
- name: Build App files
run: flutter build apk --release --build-number ${{github.run_number}} --scan
run: flutter build apk --release --build-number ${{github.run_number}}

- name: Verify Sign
run: jarsigner --verify --verbose build/app/outputs/flutter-apk/app-release.apk

- name: Rename APK file
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/bloomee_tunes_v2.6.0+${{github.run_number}}.apk
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/bloomee_tunes_v2.6.1+${{github.run_number}}.apk

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Release
path: |
build/app/outputs/flutter-apk/bloomee_tunes_v2.6.0+${{github.run_number}}.apk
build/app/outputs/flutter-apk/bloomee_tunes_v2.6.1+${{github.run_number}}.apk
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/bloomee_tunes_v2.6.0+${{github.run_number}}.apk"
tag: v2.6.0+${{github.run_number}}
artifacts: "build/app/outputs/flutter-apk/bloomee_tunes_v2.6.1+${{github.run_number}}.apk"
tag: v2.6.1+${{github.run_number}}
token: ${{secrets.SECRET_KEY}}
8 changes: 4 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,26 @@ class _MyAppState extends State<MyApp> {
super.initState();

// For sharing or opening urls/text coming from outside the app while the app is in the memory
_intentSub = ReceiveSharingIntent.getMediaStream().listen((event) {
_intentSub = ReceiveSharingIntent.instance.getMediaStream().listen((event) {
sharedMediaFiles.clear();
sharedMediaFiles.addAll(event);
log(sharedMediaFiles[0].mimeType.toString(), name: "Shared Files");
log(sharedMediaFiles[0].path, name: "Shared Files");
processIncomingIntent(sharedMediaFiles);

// Tell the library that we are done processing the intent.
ReceiveSharingIntent.reset();
ReceiveSharingIntent.instance.reset();
});

// For sharing or opening urls/text coming from outside the app while the app is closed
ReceiveSharingIntent.getInitialMedia().then((event) {
ReceiveSharingIntent.instance.getInitialMedia().then((event) {
sharedMediaFiles.clear();
sharedMediaFiles.addAll(event);
log(sharedMediaFiles[0].mimeType.toString(),
name: "Shared Files Offline");
log(sharedMediaFiles[0].path, name: "Shared Files Offline");
processIncomingIntent(sharedMediaFiles);
ReceiveSharingIntent.reset();
ReceiveSharingIntent.instance.reset();
});
}

Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 2.6.0+0
version: 2.6.1+0

environment:
sdk: '>=3.0.6 <4.0.0'
Expand Down Expand Up @@ -62,14 +62,14 @@ dependencies:
flutter_displaymode: ^0.6.0
connectivity_plus: ^5.0.2
share_plus: ^7.2.2
receive_sharing_intent: ^1.6.7
file_picker: ^8.0.0+1
fuzzywuzzy: ^1.1.6
numberpicker: ^2.1.2
image: ^4.1.7
flutter_downloader: ^1.11.6
metadata_god: ^0.5.2+1
permission_handler: ^11.3.1
receive_sharing_intent: ^1.7.0
# mime: ^1.0.5


Expand Down

0 comments on commit 2a3420a

Please sign in to comment.