[TIMOB-16270] Android: Module API - Expose access to startIntentSenderForResult like startActivityForResult
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-07-21T18:44:53.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2014 Sprint 02, Release 3.2.1, Release 3.3.0 |
Components | Android |
Labels | module_module, qe-port |
Reporter | Jon Alter |
Assignee | Hans Knöchel |
Created | 2014-01-21T20:22:10.000+0000 |
Updated | 2018-08-06T17:49:32.000+0000 |
Description
In the Module API for the Android SDK, there is a method named "launchActivityForResult" that allows a module developer to call "startActivityForResult" and add a listener for when the result is returned. startActivityForResult takes an Intent and launches it for a result.
There is another similar method in the Android SDK named "startIntentSenderForResult" that does virtually the same thing as startActivityForResult but can take a PendingIntent instead of an Intent.
It would be useful to expose this method under the name "launchIntentSenderForResult" in the module API and providing the same functionality as "launchActivityForResult" does for "startActivityForResult".
PR 3_2_X: https://github.com/appcelerator/titanium_mobile/pull/5242 PR master: https://github.com/appcelerator/titanium_mobile/pull/5243
Testing
To test this feature, run the InAppBilling module v3.0.0 or greater using an sdk that has this PR in it (3.2.1 or greater). 1. Run the example app 2. Click "android.test.purchased" 3. When the dialog pops up to complete the fake purchase click "back" on the phone 4. Check the log, if you get a message "Purchase response: USER CANCELED" then this PR is working as it should.Reopening to have backwards compatibility for Android < Level 16. PR (Community): https://github.com/appcelerator/titanium_mobile/pull/6537
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.