Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1926] Ti.App methods unavilable in local webview on Android when manifest is customized

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-04-12T22:31:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsaddeventlistener, andoid, manifest, ti.app, webview
ReporterRob Marston
AssigneeMauro Parra-Miranda
Created2013-04-12T21:12:26.000+0000
Updated2016-03-08T07:40:51.000+0000

Description

When tiapp.xml includes the following code:
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <tool-api-level>17</tool-api-level>
    <manifest>
        <application android:hardwareAccelerated="true">
            <activity android:name="TheAfricaChannel" android:screenOrientation="portrait" android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar"/>
        </application>
        <uses-sdk android:minSdkVersion="17"/>
    </manifest>
</android>
I am unable to utilize any Ti.App method in a webview, that's content is local, on my Android device. Here is an example of the JavaScript in the HTML file:
try {
	Titanium.App.addEventListener("app:fromTitanium",function(e) {
    	alert(e.message);
	});
} catch (err) {
	alert(err);
};
The error that is thrown is: TypeError: Object [object Object] has no method 'addEventListener'

Comments

  1. Daniel Sefton 2013-04-12

    Hi Rob, Thanks for the report. Could you provide us with a complete/simple test case for this? Thanks!

JSON Source