Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-1926

Ti.App methods unavilable in local webview on Android when manifest is customized

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Needs more info
    • Affects Version/s: None
    • Component/s: Titanium SDK & CLI
    • Environment:

      Developing on Mac OSX 10.8.3 using Titanium Studio 3.0.2 with Titanium SDK 3.0.2GA and Android SDK 4.2.2 (V8 Runtime) for Google Nexus 10.

      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'

        Attachments

          Activity

            People

            • Assignee:
              mpmiranda Mauro Parra-Miranda
              Reporter:
              rmarston Rob Marston
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration