Skip to content

Commit

Permalink
Updates Wikitude Cordova plugin;
Browse files Browse the repository at this point in the history
This version includes the Wikitude SDK 5.3.1.
Additionally an Android keyboard fix as well as an iOS pause/resume fix are included.

Signed-off-by: Andreas Schacherbauer <[email protected]>
  • Loading branch information
AndreasSchacherbauerWikitude committed Nov 24, 2016
1 parent faa7e91 commit 731672c
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Cordova Plugin Release Notes

## Cordova Plugin 5.3.1-3.3.1
Release Date: 24.11.2016

#### New
- Includes Wikitude SDK 5.3.1: detailed changelog for <a href="http://www.wikitude.com/external/doc/documentation/latest/android/changelog.html" target="_top">Android</a> and <a href="http://www.wikitude.com/external/doc/documentation/latest/ios/changelog.html" target="_top">iOS</a>

#### Fixed
- Fixes an issue for Android where the keyboard was not showing up again after entering and returning from an ARView


## Cordova Plugin 5.3.0-3.3.1
Release Date: 13.09.2016

Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.wikitude.phonegap.WikitudePlugin"
version="5.3.0">
version="5.3.1">

<name>Augmented Reality - Wikitude SDK Plugin</name>

Expand Down
11 changes: 7 additions & 4 deletions src/android/WikitudePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.PluginResult;
import org.apache.cordova.engine.SystemWebView;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -622,6 +623,8 @@ private boolean removeArchitectView() {
this.architectView = null;

WikitudePlugin.handleResumeInCordovaWebView(cordova.getActivity().getWindow().getDecorView().findViewById(android.R.id.content));
WikitudePlugin.releaseFocusInCordovaWebView(cordova.getActivity().getWindow().getDecorView().findViewById(android.R.id.content));

return true;
}
return false;
Expand Down Expand Up @@ -812,8 +815,8 @@ public void onLocationChanged( final Location location ) {


private static void releaseFocusInCordovaWebView(View rootView) {
if (rootView instanceof CordovaWebView) {
((CordovaWebView)rootView).getView().clearFocus();
if (rootView instanceof SystemWebView) {
((SystemWebView) rootView).getCordovaWebView().getView().clearFocus();
} else if (rootView instanceof ViewGroup) {
final int childCount = ((ViewGroup)rootView).getChildCount();
for (int i=0; i< childCount; i++) {
Expand All @@ -827,8 +830,8 @@ private static void releaseFocusInCordovaWebView(View rootView) {
* @param rootView the root view to search recursively for a CordovaWebView
*/
private static void handleResumeInCordovaWebView(final View rootView) {
if (rootView instanceof CordovaWebView) {
((CordovaWebView)rootView).handleResume(true);
if (rootView instanceof SystemWebView) {
((SystemWebView) rootView).getCordovaWebView().handleResume(true);
}
else if (rootView instanceof ViewGroup) {
final int childCount = ((ViewGroup)rootView).getChildCount();
Expand Down
Loading

0 comments on commit 731672c

Please sign in to comment.