Closed EmptyPages closed 6 months ago
Each activity would have its own webview and plugin instances, so it doesn't really make a whole lot of sense to have more than one cordova activity unless if you're trying to run multiple cordova environments in a single application. I don't think anything prevents you from making more than one cordova activity at least at the framework level, but if any plugin stores static state, then there might be problems.
This is something not supported by the Cordova CLI, it would require you to manage a cordova project manually, which can be a daunting task and error-prone. It's also not a path that is tested and even if it works today, it may break without notice so I wouldn't really recommend creating more than one cordova activity.
What's your use case for using more than one cordova activity?
it has no any use case ,i just wanna try it, thanks for your answer
Regular Cordova apps can only have one activity as breautek said. You can create a native android project and embed multiple cordova activities as documented here https://cordova.apache.org/docs/en/11.x/guide/platforms/android/webview.html But note that the documentation is very out of date as it has not been updated for several years and was not ever complete when it was published, still doable, but you are going to need to do the investigation on your own.
Regular Cordova apps can only have one activity as breautek said. You can create a native android project and embed multiple cordova activities as documented here https://cordova.apache.org/docs/en/11.x/guide/platforms/android/webview.html But note that the documentation is very out of date as it has not been updated for several years and was not ever complete when it was published, still doable, but you are going to need to do the investigation on your own.
thanks,because i am no any use case , so i need not to try it. i just wanna to know this project better
What should I do if I need multiple activities