Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for android view intent action #160

Closed
wants to merge 3 commits into from

Conversation

odam1
Copy link

@odam1 odam1 commented May 4, 2021

No description provided.

@@ -717,7 +755,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = BN2V9FW285;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is set to "" on purpose ;-) I suggest leaving it out.

Suggested change
DEVELOPMENT_TEAM = BN2V9FW285;
DEVELOPMENT_TEAM = "";

@@ -596,7 +634,7 @@
MARKETING_VERSION = 1.0.0;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.kasem.sharing.Sharing-Extension";
PRODUCT_BUNDLE_IDENTIFIER = "com.odamsoft.sharing.Sharing-Extension";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep it like com.kasem....

Suggested change
PRODUCT_BUNDLE_IDENTIFIER = "com.odamsoft.sharing.Sharing-Extension";
PRODUCT_BUNDLE_IDENTIFIER = "com.kasem.sharing.Sharing-Extension";

@GRBurst
Copy link

GRBurst commented Sep 1, 2021

I added some representative change request, but there is more of your personal ids that need to be reverted ;-)

@odam1 odam1 closed this Oct 30, 2021
@filipenanclarez
Copy link

intent.action.VIEW is handled in package as url type. When user try open a file, android system send the uri of this file to intent.

if you need open file with dart:io functions like readAdBytes or readAsString, you should convert the Uri to full path. You can do this with uri_to_file package.

So, you can handle action.VIEW with this code in flutter side:

import 'package:uri_to_file/uri_to_file.dart';
...
// For sharing or opening urls/text coming from outside the app while the app is closed
ReceiveSharingIntent.getInitialText().then((String? value) async {
    String _sharedText = value ?? "";
    debugPrint('path of file: ${Uri.parse(_sharedText).path}');
    File file = await toFile(_sharedText);
    var fileContent = await file.readAsString();
    ...
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants