GitHub user idpaterson opened a pull request:
https://github.com/apache/cordova-plugin-inappbrowser/pull/107
CB-9274 Adds missing methods to InAppBrowser to allow compilation for
Amazon FireOS.
Attempting to compile the InAppBrowser plugin for Amazon FireOS fails due
to the following programming errors:
```
[javac] Compiling 8 source files to
/path/to/amazon-fireos/ant-build/classes
[javac]
/path/to/amazon-fireos/src/org/apache/cordova/inappbrowser/InAppBrowserDialog.java:51:
cannot find symbol
[javac] symbol : method hardwareBack()
[javac] location: class org.apache.cordova.inappbrowser.InAppBrowser
[javac] if (this.inAppBrowser.hardwareBack() &&
this.inAppBrowser.canGoBack()) {
[javac] ^
[javac]
/path/to/amazon-fireos/src/org/apache/cordova/inappbrowser/InAppBrowserDialog.java:51:
cannot find symbol
[javac] symbol : method canGoBack()
[javac] location: class org.apache.cordova.inappbrowser.InAppBrowser
[javac] if (this.inAppBrowser.hardwareBack() &&
this.inAppBrowser.canGoBack()) {
[javac]
^
[javac]
/path/to/amazon-fireos/src/org/apache/cordova/inappbrowser/InAppBrowserDialog.java:52:
goBack() has private access in org.apache.cordova.inappbrowser.InAppBrowser
[javac] this.inAppBrowser.goBack();
[javac] ^
[javac] Note:
/path/to/amazon-fireos/src/org/apache/cordova/inappbrowser/InAppBrowser.java
uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 3 errors
```
As best I can determine, this problem has existed since plugin version
0.5.2 and was introduced on August 14 in commit
69ca780772b406ab02ec1bd1a8e4dca70052e926. Previous commits had diverged the
implementation of InAppBrowser.java in Amazon FireOS such that it was no longer
compatible with the InAppBrowser.java for Android.
This fix makes the `goBack()` method public and adds both `canGoBack()` and
`hardwareBack()`.
I also recommend updating the project documentation to include the Android
options supported by Amazon FireOS, such as hardwareBack. However, I believe
that documentation is outside the scope of this issue.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/idpaterson/cordova-plugin-inappbrowser
CB-9274cordova-plugin-inappbrowser
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-inappbrowser/pull/107.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #107
----
commit ef6d21436b6a73ddb2ea3eed921d13f2ec047696
Author: ipaterson <[email protected]>
Date: 2015-07-01T18:10:18Z
CB-9274 Adds missing methods to InAppBrowser to allow compilation for
Amazon FireOS.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]