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

Deeplink invocation with query params as Bundle #20

Closed
rachitmishra opened this issue Mar 25, 2019 · 16 comments
Closed

Deeplink invocation with query params as Bundle #20

rachitmishra opened this issue Mar 25, 2019 · 16 comments
Assignees
Labels
enhancement is an enhancement to the SDK

Comments

@rachitmishra
Copy link

rachitmishra commented Mar 25, 2019

Hello,

Currently the deep-links are directly invoked using fireUrlThroughIntent(). Is it possible to forward the query params of the deep link url as Bundle?

Add?

private fun getIntentExtras(url: String): Bundle? {
    return try {
        val uri = Uri.parse(url)
        val queryKeys: Set<String> = uri.queryParameterNames
        Bundle().apply {
            queryKeys.forEach {
                putString(it, uri.getQueryParameter(it))
            }
        }
    } catch (e: NullPointerException || e: UnsupportedOperationException) {
        LogUtils.logException(e)
        null
    } 
}
@darshanclevertap
Copy link
Collaborator

Hi @rachitmishra ,

Could you also explain a use case where passing query params as Bundle would be more beneficial?

@rachitmishra
Copy link
Author

Hi @darshanclevertap ,

So in case the action is set, the deep-linked activity is opened which is great.

Now if one needs the data for deep link url we need to implement onNewIntent in all the deeplink activities and reload the activity.

But usually deep-linked activities require some identifier or payload to load data.

Ex. If any activity has to load a particular tag the deep-link URI can be specified as
myapp://mydeeplink?tag=1, and if we pass this while opening the activity using deeplink the activity can auto load the data.

@rachitmishra
Copy link
Author

Another example can be opening a WebView activity with a deeplink which expects a URL in bundle.

Ex. deeplink: myapp://mywebviewactivity?url=google.com

Now with current implementation the WebView activity will open but it won't receive the URL and I have to add additional changes to onNewIntent() to handle the same.

@rachitmishra
Copy link
Author

Hi @darshanclevertap any updates?

@darshanclevertap
Copy link
Collaborator

@rachitmishra Hi, we have taken this up for discussion with our product team. I will keep you updated if we add this to our enhancements list.

@darshanclevertap darshanclevertap self-assigned this Apr 2, 2019
@darshanclevertap
Copy link
Collaborator

@rachitmishra Sorry for the delay, but after discussion with our product team, we will be taking this up as an enhancement and put it in our upcoming releases. I will be tagging this issue and will close it once the feature is live. Thank you for pointing this out to us! 😄

@darshanclevertap darshanclevertap added the enhancement is an enhancement to the SDK label Apr 11, 2019
@rachitmishra
Copy link
Author

@darshanclevertap That's a great news :) Thank you so much for picking this up. 🙌

@rachitmishra
Copy link
Author

Hi, @darshanclevertap Apologies, but when are you planning to release this? 😅

@darshanclevertap
Copy link
Collaborator

@rachitmishra I'm really sorry, we already had locked our requirements for the release when this issue was released. This will be taken up in the next release for sure. Sorry for the delay and thank you for your patience.

@shah-nishant
Copy link

@darshanclevertap Any ETA for the next release? Some of requirements are dependent on this

@rachitmishra
Copy link
Author

Hello @darshanclevertap We should be releasing this now. This is very small request and it has been more than a month :)

@darshanclevertap
Copy link
Collaborator

Hi @rachitmishra this will go with the next release of CleverTap Android SDK slated for release around 30th July 2019. Will keep you posted.

@shah-nishant
Copy link

Hi @darshanclevertap any updates on the release?

@darshanclevertap
Copy link
Collaborator

I've made the code changes, this release is a massive release with a big new feature. I apologize for the delay but we are still in the testing phase and are going to take another week for official release.

@darshanclevertap
Copy link
Collaborator

@rachitmishra @shah-nishant Thank you guys for your patience! This feature has been released in v3.6.0. Closing this.

@rachitmishra
Copy link
Author

@darshanclevertap partieeeh!!! 🙌 🙌

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

No branches or pull requests

3 participants