This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[android_intent] Adds canResolveActivity method#2598
Merged
ened merged 10 commits intoflutter:masterfrom Apr 4, 2020
Merged
Conversation
mklim
approved these changes
Mar 25, 2020
Contributor
mklim
left a comment
There was a problem hiding this comment.
Thanks for the contribution! LGTM modulo some nits.
packages/android_intent/example/test_driver/android_intent_e2e.dart
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@mklim thank you for reviewing. Have added a few more tests & addressed your feedback. I assume the submit-queue check fails because currently master does not build. As the message says. Doh. :) |
Contributor
Author
|
@mklim still happy after the extended unit test? If so I shall merge soon. :) |
mklim
approved these changes
Apr 4, 2020
Contributor
mklim
left a comment
There was a problem hiding this comment.
Sorry about the delay, still LGTM!
jerryzhoujw
pushed a commit
to jerryzhoujw/plugins
that referenced
this pull request
Apr 10, 2020
* Adds canResolveActivity method
Contributor
Author
|
@mklim could you please help to get this new version (0.3.7) uploaded to pub ? |
Contributor
|
@ened sorry about the delay, done. |
EdwinRomelta
pushed a commit
to EdwinRomelta/plugins
that referenced
this pull request
Jun 11, 2020
* Adds canResolveActivity method
jorgefspereira
pushed a commit
to jorgefspereira/plugins_flutter
that referenced
this pull request
Oct 10, 2020
* Adds canResolveActivity method
FlutterSu
pushed a commit
to FlutterSu/flutter-plugins
that referenced
this pull request
Nov 20, 2020
* Adds canResolveActivity method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As outlined in flutter/flutter#51942, I needed a method to check whether a particular activity is reachable on a target device.
I have marked the PR WIP for the following reasons:
canResolvecurrently only checks for Activities, using this method [resolveActivity(android.content.Intent,%20int)](https://developer.android.com/reference/android/content/pm/PackageManager#resolveActivity(android.content.Intent, int)) . It also sets a default flag here.resolveService&resolveContentProviderwhich can be helpful respectively. I don't see the need for them just yetflagis fixed toPackageManager.MATCHDEFAULTONLY, which somewhat makes sense for activities. It could be copied to the dart side so that developers can specify itresolve*methods return information on, well, how to resolve a component. We can't do much with it on flutter side, so I would assume we don't need to pass that upcanResolvecould be replaced withcanLaunch(to followurl_launcher).Related Issues
Fixes flutter/flutter#51942.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?