[
https://issues.apache.org/jira/browse/CB-10930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15207500#comment-15207500
]
Richard B Knoll commented on CB-10930:
--------------------------------------
Yeah, that example is totally unrealistic and just to illustrate the point (I
tested it by calling {{captureImage}} five times in a for loop). It does indeed
stack five camera activities. The media capture plugin has its own separate
issues related to launching activities independent of this bug and I'm actually
currently working on fixing those. As for this, I think the issue is that
Android seems to support making a bunch of activity requests all at once and we
don't even though we probably could. I don't really have a use case off the top
of my head, so I'm fine with marking this as minor. The behavior I'm talking
about is
[here|https://github.com/apache/cordova-android/blob/eccde6c0c02bff61fcd8d57c39f2cf0a62dbc079/framework/src/org/apache/cordova/CordovaInterfaceImpl.java#L73].
> startActivityForResult cancels pending Activity requests when new ones arrive
> -----------------------------------------------------------------------------
>
> Key: CB-10930
> URL: https://issues.apache.org/jira/browse/CB-10930
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Reporter: Richard B Knoll
>
> If a plugin makes multiple calls to {{cordova.startActivityForResult}} before
> the Activity results have been delivered, only the last call will actually
> get its result delivered to the plugin. All the others will get a canceled
> error returned instead. The issue here is that all of those activities will
> still be started; their results will just get thrown out after they finish.
> For example, if you call {{captureImage}} from cordova-plugin-media-capture
> five times in rapid succession, the user will take five photos but only one
> of those photos will actually be returned. The other four will just be lost.
> I don't think there is anything stopping us from properly handling multiple
> pending requests.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]