You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joe Bowser (JIRA)" <ji...@apache.org> on 2016/03/22 23:56:25 UTC

[jira] [Commented] (CB-10930) startActivityForResult cancels pending Activity requests when new ones arrive

    [ https://issues.apache.org/jira/browse/CB-10930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15207476#comment-15207476 ] 

Joe Bowser commented on CB-10930:
---------------------------------

When would we want multiple requests? Realistically, this doesn't make any sense w.r.t. how the UI works.

So, you call captureImage five times in rapid succession, it stacks five camera activities?  That sounds terrible! Why are we letting that happen in the first place?

Do you have some example code to demonstrate this behaviour, because it sounds totally screwed up! 

> 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org