You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Archana Naik (JIRA)" <ji...@apache.org> on 2014/05/07 01:58:18 UTC

[jira] [Created] (CB-6644) [amazon-fireos]Add a check for webview being null in template code

Archana Naik created CB-6644:
--------------------------------

             Summary: [amazon-fireos]Add a check for webview being null in template code
                 Key: CB-6644
                 URL: https://issues.apache.org/jira/browse/CB-6644
             Project: Apache Cordova
          Issue Type: Bug
          Components: Amazon FireOS
    Affects Versions: 3.4.0
            Reporter: Archana Naik
            Assignee: Archana Naik
             Fix For: 3.5.0


amazon-fireos uses AmazonWebView which provides chromium based webapp runtime. Port needs webview sdk which ships with 2 different jars - awv_interface.jar and awv_android_factory.jar. By default, adding amazon-fireos platform to the app copies awv_interface.jar to project's libs folder so its bundled with the app. However, that means app will work on Kindle fire devices but on generic android devices it will not. In order for it to work on android devices, app developer needs to copy awv_android_factory.jar to libs folder so app will automatically use fallback mechanism to instantiate stock android webview. 
Now, in case of no fallback mechanism CordovaActivity's appview will be null so if developer uses this.appview in onCreate() method app will crash. 
Solution: add boilder plate code to check for this.appview not being null.



--
This message was sent by Atlassian JIRA
(v6.2#6252)