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

After upgrading from version 0.7.5 initial context no longer loads in portal. This only occurs on Android. #72

Open
jcfrk101 opened this issue Jul 12, 2024 · 2 comments

Comments

@jcfrk101
Copy link

jcfrk101 commented Jul 12, 2024

Here is an example of how I load the context in version 0.7.5

val portalContext = mapOf(
            "startingRoute" to Utils.context.getString(R.string.portal_start_route),
            "apiURL" to Utils.context.getString(R.string.api_url),
            "siteURL" to Utils.context.getString(R.string.site_url),
            "siteId" to Utils.context.getString(R.string.site_id),
            "accountId" to Utils.context.getString(R.string.account_id),
            "token" to LocalCache.getToken(),
            "expires" to LocalCache.getExpires(),
            "analyticsURL" to Utils.context.getString(R.string.analytics_url)
        )
        PortalManager.newPortal(mainPortalId)
            .setInitialContext(portalContext)
            .setStartDir("terra/build")
            .setPlugins(Plugins.plugins.toMutableList())
            .create()`
@jcfrk101
Copy link
Author

FYI, I am using the jetpack compose views

@carlpoole
Copy link
Member

Did you consult the Changelog/Upgrade guide to make sure your web application is using the most up-to-date code? There were some breaking changes since 0.7.x

https://ionic.io/docs/portals/for-web/upgrade-guides#portals-web-plugin
https://ionic.io/docs/portals/for-android/upgrade-guides#portals-for-android

If everything seems correct and your are unable to access the context can you see if you are able to see it in the Chrome dev tools in the web view?

If you are still experiencing the issue after these steps and are able to reproduce it can you please provide a complete app project with the minimal amount of code needed to help reproduce your issue so we can help troubleshoot further. Thank you!

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

No branches or pull requests

2 participants