Apache Cordova
  1. Apache Cordova
  2. CB-481

Patch Android cordova.js to call exec() instead of directly calling prompt()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.9.0
    • Fix Version/s: 2.0.0
    • Component/s: Android, CordovaJS
    • Labels:
      None

      Description

      The final call in Android's cordova-js after everything is ready is to tell native to unhide the webview. This is done via a prompt call with string "gap_init" or something along those lines.

      While this is fine, we already have the exec module in place to handle webview -> native communication. We should use that instead. It's kind of foolish to go one level below exec when we have the exec abstraction available and in place already.

      This would also help the testing tool Ripple: Android Cordova apps being emulated in Ripple would no longer see an annoying prompt following app startup!

      Bottom line: exec is our go-to for calling into native. Circumventing an abstraction we put into place does not make any sense, and unifies how our bridge works.

        Activity

        Filip Maj created issue -
        Filip Maj made changes -
        Field Original Value New Value
        Assignee Joe Bowser [ bowserj ] Filip Maj [ filmaj ]
        Priority Major [ 3 ] Minor [ 4 ]
        Filip Maj made changes -
        Parent CB-190 [ 12539025 ]
        Issue Type Improvement [ 4 ] Sub-task [ 7 ]
        Filip Maj made changes -
        Fix Version/s 1.8.0 [ 12319550 ]
        Fix Version/s 1.7.0 [ 12319549 ]
        Filip Maj made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Filip Maj made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Filip Maj made changes -
        Fix Version/s 2.0.0 [ 12318875 ]
        Fix Version/s 1.8.0 [ 12319550 ]
        Affects Version/s 1.9.0 [ 12319551 ]
        Affects Version/s 1.8.1 [ 12321750 ]
        Affects Version/s 1.8.0 [ 12319550 ]
        Affects Version/s 1.7.0 [ 12319549 ]
        Filip Maj made changes -
        Parent CB-190 [ 12539025 ]
        Issue Type Sub-task [ 7 ] Bug [ 1 ]
        Filip Maj made changes -
        Summary Android initialize() method calls prompt('gap:init') to tell native to unhide webview Patch Android cordova.js to call exec() instead of directly calling prompt()
        Description The final call in Android's cordova-js after everything is ready is to tell native to unhide the webview. This is done via a {{prompt}} call with string "gap_init" or something along those lines.

        While this is fine, we already have the {{exec}} module in place to handle webview -> native communication. We should use that instead. It's kind of foolish to go one level below {{exec}} when we have the {{exec}} abstraction available and in place already.

        This would also help the testing tool Ripple: Android Cordova apps being emulated in Ripple would no longer see an annoying prompt following app startup!
        The final call in Android's cordova-js after everything is ready is to tell native to unhide the webview. This is done via a {{prompt}} call with string "gap_init" or something along those lines.

        While this is fine, we already have the {{exec}} module in place to handle webview -> native communication. We should use that instead. It's kind of foolish to go one level below {{exec}} when we have the {{exec}} abstraction available and in place already.

        This would also help the testing tool Ripple: Android Cordova apps being emulated in Ripple would no longer see an annoying prompt following app startup!

        Bottom line: {{exec}} is our go-to for calling into native. Circumventing an abstraction we put into place does not make any sense, and unifies how our bridge works.
        Filip Maj made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Filip Maj
            Reporter:
            Filip Maj
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development