Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-16479

Android: local HTML-based Google Maps in webview fails to open

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Hold
    • Affects Version/s: Release 3.2.1
    • Component/s: Android
    • Labels:
    • Environment:

      Device: Google Nexus 4
      OS: KITKAT
      Mobile SDK Version: 3.2.1.GA

      Description

      Problem Description

      When you open a local html file in a webview, it fails (in Android 4.4, using Mobile SDK 3.2.1).

      Test Case

      App.js:

      var win = Ti.UI.createWindow();
      var webview = Ti.UI.createWebView({
      	url:'index.html',
      });
      win.add(webview);
      win.open();
      

      index.html:

      <!DOCTYPE html>
      <html>
        <head>
          <title>Simple Map</title>
          <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
          <meta charset="utf-8">
          <style>
            html, body, #map-canvas {
              height: 100%;
              margin: 0px;
              padding: 0px
            }
          </style>
          <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
          <script>
      var map;
      function initialize() {
        var mapOptions = {
          zoom: 8,
          center: new google.maps.LatLng(-34.397, 150.644)
        };
        map = new google.maps.Map(document.getElementById('map-canvas'),
            mapOptions);
      }
       
      google.maps.event.addDomListener(window, 'load', initialize);
       
          </script>
        </head>
        <body>
          <div id="map-canvas"></div>
        </body>
      </html>
      

      Steps to reproduce

      1. Create new mobile project (titanium classic) using Mobile SDK 3.2.1
      2. Paste the code sample to app.js
      3. Paste the index.html contents into a new file index.html in Resources directory
      4. Run the app into Nexus 4 or any device with KITKAT
      5. See the error messages attached to this bug

      Error messages

      [INFO] :   TiApplication: (main) [139,532] Titanium Javascript runtime: v8
      [INFO] :   TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
      [INFO] :   TiAnalyticsDb: (main) [34,34] Upgrading Database from 1 to 4
      [WARN] :   V8Object: Runtime disposed, cannot set property 'userAgent'
      [INFO] :   I/dalvikvm-heap: Grow heap (frag case) to 11.794MB for 2731536-byte allocation
      [INFO] :   TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.negoapps.mapv3.Mapv3Activity@423e1c88
      [INFO] :   chromium: [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
      [INFO] :   BrowserProcessMain: Initializing chromium process, renderers=0
      [WARN] :   chromium: [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
      [INFO] :   I/Adreno-EGL: <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
      [INFO] :   Choreographer: Skipped 221 frames!  The application may be doing too much work on its main thread.
      [WARN] :   AwContents: nativeOnDraw failed; clearing to background color.
      [INFO] :   chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
      [INFO] :   chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
      [ERROR] :  qdutils: FBIOGET_FSCREENINFO failed
      [INFO] :   chromium: [INFO:simple_index_file.cc(397)] Simple Cache Index is being restored from disk.
      [INFO] :   TiAnalyticsSvc: (Thread-1940) [36578,36578] Analytics Service Started
      [INFO] :   TiAnalyticsSvc: (Thread-1940) [1604,38182] Stopping Analytics Service
      
      

      Extra info

      Q&A Question

      http://developer.appcelerator.com/question/162782/google-maps-v3-on-android-44--just-blank

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                mpmiranda Mauro Parra-Miranda
              • Watchers:
                0 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-18383
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code