[TIMOB-9694] Anvil: jsActivityUrl test in android/android/android test suite fails on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-07-16T15:35:37.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | n/a |
Components | Drillbit |
Labels | anvil, core |
Reporter | Allen Yeung |
Assignee | Neeraj Gupta |
Created | 2012-06-21T11:44:24.000+0000 |
Updated | 2017-03-10T00:02:27.000+0000 |
Description
jsActivityUrl works fine in a test app, but fails in anvil. Here are the contents of the test app:
app.js:
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_MAIN,
url: 'jsActivity.js'
});
intent.addCategory(Ti.Android.CATEGORY_LAUNCHER);
Ti.Android.currentActivity.startActivityForResult(intent, function(e) {
Ti.API.info(JSON.stringify(e));
Ti.API.info("Result Code should be " + Ti.Android.RESULT_OK + " was " + e.resultCode);
});
jsActivity.js:
var activity = Ti.Android.currentActivity;
activity.addEventListener("create", function(e) {
activity.setResult(Ti.Android.RESULT_OK);
activity.finish();
});
Make sure the following entry is in your tiapp.xml
<android xmlns:android="http://schemas.android.com/apk/res/android">
<activities>
<activity url="jsActivity.js"/>
</activities>
</android>
Can not reproduce with 2_1_X branch.
Closing this ticket as the issue cannot be reproduced.