-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[android_intent] Adds canResolveActivity method #2598
Conversation
mklim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! LGTM modulo some nits.
packages/android_intent/example/test_driver/android_intent_e2e.dart
Outdated
Show resolved
Hide resolved
|
@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. :) |
|
@mklim still happy after the extended unit test? If so I shall merge soon. :) |
mklim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the delay, still LGTM!
* Adds canResolveActivity method
|
@mklim could you please help to get this new version (0.3.7) uploaded to pub ? |
|
@ened sorry about the delay, done. |
* Adds canResolveActivity method
* Adds canResolveActivity method
* Adds canResolveActivity method
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?