Add deep linking support to IntentAndroid#4320
Add deep linking support to IntentAndroid#4320satya164 wants to merge 7 commits intofacebook:masterfrom callstack-internal:intent
Conversation
There was a problem hiding this comment.
There's no mActivity here! O.o
There was a problem hiding this comment.
Just change all (activity's) Context to Activity class
There was a problem hiding this comment.
Because it should be a Activity instance.
|
Nice! Thanks for working on this! |
|
@mkonicek Thanks. Waiting for the Dialog commit before I change anything here :D |
|
@satya164 updated the pull request. |
2 similar comments
|
@satya164 updated the pull request. |
|
@satya164 updated the pull request. |
|
@satya164 updated the pull request. |
|
@satya164 updated the pull request. |
1 similar comment
|
@satya164 updated the pull request. |
|
@mkonicek I've updated the PR using However, the current activity is only set on I'm not sure if it's the best approach though. Please have a look and lemme know. cc @foghina |
|
Just pinged @foghina, thanks for the patience. Many PRs in the queue and branch cut.. |
There was a problem hiding this comment.
This seems reasonable - the process could be started by an intent.
|
I don't like exposing Since the JS API is only similar but not identical and since the JS API is a function call anyway ( Exposing constants has bitten us in the past (see screen size), they should only be used for things that are really constant. |
|
@satya164 updated the pull request. |
|
@satya164 updated the pull request. |
|
@satya164 updated the pull request. |
1 similar comment
|
@satya164 updated the pull request. |
|
@satya164 updated the pull request. |
|
@satya164 updated the pull request. |
There was a problem hiding this comment.
Can you add an error callback (all @ReactMethods have two callbacks) and call it here instead of throwing an exception? You should probably still log the full exception details, though, to make it easier to debug problems.
There was a problem hiding this comment.
@foghina Was wondering the same thing. I kept it consistent with the canOpenURL method which is in the same file. It's really confusing.
There was a problem hiding this comment.
Oh, darn. Then we can probably leave it as it is for the purposes of this PR but we should refactor this module.
There was a problem hiding this comment.
@foghina Yes, we should. I'll send another PR with the changes then, after this is merged.
|
@facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1658069957805935/int_phab to review. |
|
@satya164 heads-up: patch failed internally because we don't mirror |
|
@foghina No probs. I'll send another PR with the website changes :) |
Add a method to handle URLs registered to the app,
Refer - http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters
The API cannot be same as the iOS API (i.e. as a constant), as the activity is not availble at the time of module initialization. Moreover, multiple activties can share the same bridge instance, and the activity itself is not a constant. Hence the initialURL can change.