Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6644

[amazon-fireos]Add a check for webview being null in template code

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Activity

          People

            naika Archana Naik
            naika Archana Naik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: