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

Add one intent-filter for each county in moh_kenya_echis flavor #311

Merged
merged 3 commits into from
May 29, 2023

Conversation

kennsippell
Copy link
Member

@kennsippell kennsippell commented May 24, 2023

#310

b2e815f we used a new resource string which specified the host (including optional wildcard) to be used by the intent. We can't do exactly what we did in #307 because it will require a change to existing flavors. This slight variation creates two data elements for the same intent-filter. It's a bit concerning because, we're registering the following:

Scenario app_host intent_host Behavior
Branded Normal (eg. DTree) dtree.com empty Good
eCHIS Kenya empty *-echis.health.go.ke Good
Unbranded empty empty No intents work

I welcome input to confirm this is the best path available.

I can't find any way to: add conditions in intent-filters, use app_host | intent_host, or dynamically add intents in code.The only other viable options I've found is to achieve this by overwriting AndroidManifest.xml directly for flavors which want this functionality. To achieve this, I believe we'd need to duplicate the list of urls (cannot reuse the data in instances.xml). I suspect it's not very pretty. Please let me know if there is a better way to do this!

Uses AndroidManifest.xml to add intent-filters per county. moh_kenya_echis only.

@kennsippell kennsippell requested a review from jkuester May 24, 2023 06:35
@kennsippell kennsippell marked this pull request as ready for review May 24, 2023 06:36
Base automatically changed from echis to master May 24, 2023 06:36
@kennsippell kennsippell force-pushed the 310-intent-wildcard branch from 2ed0b8b to ed38c86 Compare May 24, 2023 18:11
@kennsippell kennsippell changed the base branch from master to moh_kenya_echis May 24, 2023 18:12
@kennsippell kennsippell requested a review from m5r May 24, 2023 18:15
@kennsippell
Copy link
Member Author

Great answer to above question here. I'm going to redo this per @jkuester's suggestion of the AndroidManifest.xml approach.

@kennsippell kennsippell changed the title Ability to specify an additional intent-filter host Add one intent-filter for each count in moh_kenya_echis flavor May 25, 2023
Copy link
Contributor

@jkuester jkuester left a comment

Choose a reason for hiding this comment

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

Can confirm that all URLs are properly registered:
image

LGTM!

@kennsippell kennsippell changed the title Add one intent-filter for each count in moh_kenya_echis flavor Add one intent-filter for each county in moh_kenya_echis flavor May 26, 2023
@kennsippell
Copy link
Member Author

Thanks @jkuester . Do you think we should merge this into #313 or keep them separate?

@jkuester
Copy link
Contributor

@kennsippell I say just merge it now and they can both go into master together on #313!

@kennsippell kennsippell merged commit 33576fd into moh_kenya_echis May 29, 2023
@kennsippell kennsippell deleted the 310-intent-wildcard branch May 29, 2023 06:28
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.

2 participants