From 8711ee3f211bf84913ae86f81e5e0e548d1c8015 Mon Sep 17 00:00:00 2001 From: Landsbankinn Date: Wed, 4 Oct 2017 16:41:31 +0000 Subject: [PATCH 01/23] CB-13409: Lets user adjust color of toolbar, hide navigation buttons and set custom text on close button --- src/android/InAppBrowser.java | 130 ++++++++++++++++++++++------------ src/ios/CDVInAppBrowser.h | 11 +-- src/ios/CDVInAppBrowser.m | 42 +++++++++-- 3 files changed, 126 insertions(+), 57 deletions(-) diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 48f6846..62a834d 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -25,6 +25,9 @@ import android.provider.Browser; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffColorFilter; +import android.graphics.Color; import android.net.Uri; import android.os.Build; import android.os.Bundle; @@ -51,6 +54,7 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; +import android.widget.TextView; import org.apache.cordova.CallbackContext; import org.apache.cordova.Config; @@ -91,6 +95,8 @@ public class InAppBrowser extends CordovaPlugin { private static final String SHOULD_PAUSE = "shouldPauseOnSuspend"; private static final Boolean DEFAULT_HARDWARE_BACK = true; private static final String USER_WIDE_VIEW_PORT = "useWideViewPort"; + private static final String CLOSE_BUTTON_TEXT = "closeButtonText"; + private static final String CLOSE_BUTTON_COLOR = "closeButtonColor"; private InAppBrowserDialog dialog; private WebView inAppWebView; @@ -109,6 +115,8 @@ public class InAppBrowser extends CordovaPlugin { private ValueCallback mUploadCallbackLollipop; private final static int FILECHOOSER_REQUESTCODE = 1; private final static int FILECHOOSER_REQUESTCODE_LOLLIPOP = 2; + private String closeButtonText = ""; + private int closeButtonColor = android.graphics.Color.LTGRAY; /** * Executes the request and returns PluginResult. @@ -127,7 +135,7 @@ public class InAppBrowser extends CordovaPlugin { t = SELF; } final String target = t; - final HashMap features = parseFeature(args.optString(2)); + final HashMap features = parseFeature(args.optString(2)); LOG.d(LOG_TAG, "target = " + target); @@ -366,18 +374,23 @@ public class InAppBrowser extends CordovaPlugin { * @param optString * @return */ - private HashMap parseFeature(String optString) { + private HashMap parseFeature(String optString) { if (optString.equals(NULL)) { return null; } else { - HashMap map = new HashMap(); + HashMap map = new HashMap(); StringTokenizer features = new StringTokenizer(optString, ","); StringTokenizer option; while(features.hasMoreElements()) { option = new StringTokenizer(features.nextToken(), "="); if (option.hasMoreElements()) { String key = option.nextToken(); - Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; + String value = null; + if (key.equals(CLOSE_BUTTON_TEXT)) value = option.nextToken(); + else { + String token = option.nextToken(); + value = token.equals("yes") || token.equals("no") ? token : "yes"; // hér!! + } map.put(key, value); } } @@ -523,7 +536,7 @@ public class InAppBrowser extends CordovaPlugin { * @param url the url to load. * @param features jsonObject */ - public String showWebPage(final String url, HashMap features) { + public String showWebPage(final String url, HashMap features) { // Determine if we should hide the location bar. showLocationBar = true; showZoomControls = true; @@ -531,44 +544,52 @@ public class InAppBrowser extends CordovaPlugin { mediaPlaybackRequiresUserGesture = false; if (features != null) { - Boolean show = features.get(LOCATION); + String show = features.get(LOCATION); if (show != null) { - showLocationBar = show.booleanValue(); + showLocationBar = show.equals("yes") ? true : false; } - Boolean zoom = features.get(ZOOM); + String zoom = features.get(ZOOM); if (zoom != null) { - showZoomControls = zoom.booleanValue(); + showZoomControls = zoom.equals("yes") ? true : false; } - Boolean hidden = features.get(HIDDEN); + String hidden = features.get(HIDDEN); if (hidden != null) { - openWindowHidden = hidden.booleanValue(); + openWindowHidden = hidden.equals("yes") ? true : false; } - Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON); + String hardwareBack = features.get(HARDWARE_BACK_BUTTON); if (hardwareBack != null) { - hadwareBackButton = hardwareBack.booleanValue(); + hadwareBackButton = hardwareBack.equals("yes") ? true : false; } else { hadwareBackButton = DEFAULT_HARDWARE_BACK; } - Boolean mediaPlayback = features.get(MEDIA_PLAYBACK_REQUIRES_USER_ACTION); + String mediaPlayback = features.get(MEDIA_PLAYBACK_REQUIRES_USER_ACTION); if (mediaPlayback != null) { - mediaPlaybackRequiresUserGesture = mediaPlayback.booleanValue(); + mediaPlaybackRequiresUserGesture = mediaPlayback.equals("yes") ? true : false; } - Boolean cache = features.get(CLEAR_ALL_CACHE); + String cache = features.get(CLEAR_ALL_CACHE); if (cache != null) { - clearAllCache = cache.booleanValue(); + clearAllCache = cache.equals("yes") ? true : false; } else { cache = features.get(CLEAR_SESSION_CACHE); if (cache != null) { - clearSessionCache = cache.booleanValue(); + clearSessionCache = cache.equals("yes") ? true : false; } } - Boolean shouldPause = features.get(SHOULD_PAUSE); + String shouldPause = features.get(SHOULD_PAUSE); if (shouldPause != null) { - shouldPauseInAppBrowser = shouldPause.booleanValue(); + shouldPauseInAppBrowser = shouldPause.equals("yes") ? true : false; } - Boolean wideViewPort = features.get(USER_WIDE_VIEW_PORT); + String wideViewPort = features.get(USER_WIDE_VIEW_PORT); if (wideViewPort != null ) { - useWideViewPort = wideViewPort.booleanValue(); + useWideViewPort = wideViewPort.equals("yes") ? true : false; + } + String closeButtonTextSet = features.get(CLOSE_BUTTON_TEXT); + if (closeButtonTextSet != null) { + closeButtonText = closeButtonTextSet; + } + String closeButtonTextColorSet = features.get(CLOSE_BUTTON_COLOR); + if (closeButtonTextColorSet != null) { + closeButtonColor = Color.parseColor(closeButtonTextColorSet); } } @@ -612,7 +633,7 @@ public class InAppBrowser extends CordovaPlugin { // Toolbar layout RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); //Please, no more black! - toolbar.setBackgroundColor(android.graphics.Color.LTGRAY); + toolbar.setBackgroundColor(closeButtonColor); toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); toolbar.setHorizontalGravity(Gravity.LEFT); @@ -700,29 +721,46 @@ public class InAppBrowser extends CordovaPlugin { }); // Close/Done button - ImageButton close = new ImageButton(cordova.getActivity()); - RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); - closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); - close.setLayoutParams(closeLayoutParams); - close.setContentDescription("Close Button"); - close.setId(Integer.valueOf(5)); - int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); - Drawable closeIcon = activityRes.getDrawable(closeResId); - if (Build.VERSION.SDK_INT >= 16) - close.setBackground(null); - else - close.setBackgroundDrawable(null); - close.setImageDrawable(closeIcon); - close.setScaleType(ImageView.ScaleType.FIT_CENTER); - back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); - if (Build.VERSION.SDK_INT >= 16) - close.getAdjustViewBounds(); + if (closeButtonText != "") { + /* Use TextView for text */ + TextView close = new TextView(cordova.getActivity()); + close.setText(closeButtonText); + close.setTextSize(25); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + close.setId(Integer.valueOf(5)); + close.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + closeDialog(); + } + }); + toolbar.addView(close); + } + else { + ImageButton close = new ImageButton(cordova.getActivity()); + RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + close.setLayoutParams(closeLayoutParams); + close.setContentDescription("Close Button"); + close.setId(Integer.valueOf(5)); + int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); + Drawable closeIcon = activityRes.getDrawable(closeResId); + if (Build.VERSION.SDK_INT >= 16) + close.setBackground(null); + else + close.setBackgroundDrawable(null); + close.setImageDrawable(closeIcon); + close.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + if (Build.VERSION.SDK_INT >= 16) + close.getAdjustViewBounds(); - close.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - closeDialog(); - } - }); + close.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + closeDialog(); + } + }); + toolbar.addView(close); + } // WebView inAppWebView = new WebView(cordova.getActivity()); @@ -828,7 +866,7 @@ public class InAppBrowser extends CordovaPlugin { // Add the views to our toolbar toolbar.addView(actionButtonContainer); toolbar.addView(edittext); - toolbar.addView(close); + // toolbar.addView(close); // Don't add the toolbar if its been disabled if (getShowLocationBar()) { diff --git a/src/ios/CDVInAppBrowser.h b/src/ios/CDVInAppBrowser.h index d258eb0..8f01721 100644 --- a/src/ios/CDVInAppBrowser.h +++ b/src/ios/CDVInAppBrowser.h @@ -49,7 +49,11 @@ @property (nonatomic, assign) BOOL location; @property (nonatomic, assign) BOOL toolbar; @property (nonatomic, copy) NSString* closebuttoncaption; +@property (nonatomic, copy) NSString* closebuttoncolor; @property (nonatomic, copy) NSString* toolbarposition; +@property (nonatomic, copy) NSString* toolbarcolor; +@property (nonatomic, assign) BOOL toolbartranslucent; +@property (nonatomic, assign) BOOL hideToolbarNavigationButtons; @property (nonatomic, assign) BOOL clearcache; @property (nonatomic, assign) BOOL clearsessioncache; @@ -74,13 +78,13 @@ NSString* _prevUserAgent; NSInteger _userAgentLockToken; CDVInAppBrowserOptions *_browserOptions; - + #ifdef __CORDOVA_4_0_0 CDVUIWebViewDelegate* _webViewDelegate; #else CDVWebViewDelegate* _webViewDelegate; #endif - + } @property (nonatomic, strong) IBOutlet UIWebView* webView; @@ -99,7 +103,7 @@ - (void)navigateTo:(NSURL*)url; - (void)showLocationBar:(BOOL)show; - (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition; -- (void)setCloseButtonTitle:(NSString*)title; +- (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString; - (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent browserOptions: (CDVInAppBrowserOptions*) browserOptions; @@ -110,4 +114,3 @@ @property (nonatomic, weak) id orientationDelegate; @end - diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index f5d05f0..a890f7f 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -162,8 +162,8 @@ [self.inAppBrowserViewController showLocationBar:browserOptions.location]; [self.inAppBrowserViewController showToolBar:browserOptions.toolbar :browserOptions.toolbarposition]; - if (browserOptions.closebuttoncaption != nil) { - [self.inAppBrowserViewController setCloseButtonTitle:browserOptions.closebuttoncaption]; + if (browserOptions.closebuttoncaption != nil || browserOptions.closebuttoncolor != nil) { + [self.inAppBrowserViewController setCloseButtonTitle:browserOptions.closebuttoncaption :browserOptions.closebuttoncolor]; } // Set Presentation Style UIModalPresentationStyle presentationStyle = UIModalPresentationFullScreen; // default @@ -599,6 +599,12 @@ self.toolbar.multipleTouchEnabled = NO; self.toolbar.opaque = NO; self.toolbar.userInteractionEnabled = YES; + if (_browserOptions.toolbarcolor != nil) { // Set toolbar color if user sets it in options + self.toolbar.barTintColor = [self colorFromHexString:_browserOptions.toolbarcolor]; + } + if (!_browserOptions.toolbartranslucent) { // Set toolbar translucent to no if user sets it in options + self.toolbar.translucent = NO; + } CGFloat labelInset = 5.0; float locationBarY = toolbarIsAtBottom ? self.view.bounds.size.height - FOOTER_HEIGHT : self.view.bounds.size.height - LOCATIONBAR_HEIGHT; @@ -642,7 +648,13 @@ self.backButton.enabled = YES; self.backButton.imageInsets = UIEdgeInsetsZero; - [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]]; + // Filter out Navigation Buttons if user requests so + if (_browserOptions.hideToolbarNavigationButtons) { + [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton]]; + } else { + [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]]; + } + [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton]]; self.view.backgroundColor = [UIColor grayColor]; [self.view addSubview:self.toolbar]; @@ -655,14 +667,16 @@ [self.webView setFrame:frame]; } -- (void)setCloseButtonTitle:(NSString*)title +- (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString { // the advantage of using UIBarButtonSystemItemDone is the system will localize it for you automatically // but, if you want to set this yourself, knock yourself out (we can't set the title for a system Done button, so we have to create a new one) self.closeButton = nil; - self.closeButton = [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStyleBordered target:self action:@selector(close)]; + // Initialize with title if title is set, otherwise the title will be 'Done' localized + self.closeButton = title != nil ? [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStyleBordered target:self action:@selector(close)] : [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(close)]; self.closeButton.enabled = YES; - self.closeButton.tintColor = [UIColor colorWithRed:60.0 / 255.0 green:136.0 / 255.0 blue:230.0 / 255.0 alpha:1]; + // If color on closebutton is requested then initialize with that that color, otherwise use initialize with default + self.closeButton.tintColor = colorString != nil ? [self colorFromHexString:colorString] : [UIColor colorWithRed:60.0 / 255.0 green:136.0 / 255.0 blue:230.0 / 255.0 alpha:1]; NSMutableArray* items = [self.toolbar.items mutableCopy]; [items replaceObjectAtIndex:0 withObject:self.closeButton]; @@ -877,6 +891,17 @@ } } +// Helper function to convert hex color string to UIColor +// Assumes input like "#00FF00" (#RRGGBB). +// Taken from https://stackoverflow.com/questions/1560081/how-can-i-create-a-uicolor-from-a-hex-string +- (UIColor *)colorFromHexString:(NSString *)hexString { + unsigned rgbValue = 0; + NSScanner *scanner = [NSScanner scannerWithString:hexString]; + [scanner setScanLocation:1]; // bypass '#' character + [scanner scanHexInt:&rgbValue]; + return [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1.0]; +} + #pragma mark UIWebViewDelegate - (void)webViewDidStartLoad:(UIWebView*)theWebView @@ -995,6 +1020,10 @@ self.suppressesincrementalrendering = NO; self.hidden = NO; self.disallowoverscroll = NO; + self.hideToolbarNavigationButtons = NO; + self.closebuttoncolor = nil; + self.toolbarcolor = nil; + self.toolbartranslucent = YES; } return self; @@ -1104,4 +1133,3 @@ @end - From e691212c967fe866551c126e00f4cc7f09c6dfb9 Mon Sep 17 00:00:00 2001 From: Landsbankinn Date: Fri, 6 Oct 2017 13:05:01 +0000 Subject: [PATCH 02/23] CB-13409: Android works well now, all changes are now documented --- README.md | 14 +++++- src/android/InAppBrowser.java | 84 ++++++++++++++++++++++++++--------- src/ios/CDVInAppBrowser.h | 2 +- src/ios/CDVInAppBrowser.m | 4 +- 4 files changed, 77 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index a4b7cd9..6eb0479 100644 --- a/README.md +++ b/README.md @@ -101,8 +101,8 @@ instance, or the system browser. - __options__: Options for the `InAppBrowser`. Optional, defaulting to: `location=yes`. _(String)_ - The `options` string must not contain any blank space, and each feature's name/value pairs must be separated by a comma. Feature names are case insensitive. - + The `options` string must not contain any blank space, and each feature's name/value pairs must be separated by a comma. Feature names are case insensitive. + All platforms support: - __location__: Set to `yes` or `no` to turn the `InAppBrowser`'s location bar on or off. @@ -112,7 +112,13 @@ instance, or the system browser. - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. - __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened - __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened + - __closebuttoncaption__: set to a string to use as the close buttons caption instead of a X. Note that you need to localize this value yourself. + - __closebuttoncolor__: set to a valid hex color string, for example: `#00ff00`, and it will change the + close button color from default, regardless of being a text or default X. Only has effect if user has location set to `yes`. - __hardwareback__: set to `yes` to use the hardware back button to navigate backwards through the `InAppBrowser`'s history. If there is no previous page, the `InAppBrowser` will close. The default value is `yes`, so you must set it to `no` if you want the back button to simply close the InAppBrowser. + - __hidenavigationbuttons__: set to `yes` to hide the navigation buttons on the location toolbar, only has effect if user has location set to `yes`. The default value is `no`. + - __hideurlbar__: set to `yes` to hide the url bar on the location toolbar, only has effect if user has location set to `yes`. The default value is `no`. + - __navigationbuttoncolor__: set to a valid hex color string, for example: `#00ff00`, and it will change the color of both navigation buttons from default. Only has effect if user has location set to `yes` and not hidenavigationbuttons set to `yes`. - __zoom__: set to `yes` to show Android browser's zoom controls, set to `no` to hide them. Default value is `yes`. - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). - __shouldPauseOnSuspend__: Set to `yes` to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues like described in [CB-11013](https://issues.apache.org/jira/browse/CB-11013)). @@ -123,9 +129,13 @@ instance, or the system browser. - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. - __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened - __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened + - __closebuttoncolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default __Done__ button's color. Only applicable if toolbar is not disabled. - __closebuttoncaption__: set to a string to use as the __Done__ button's caption. Note that you need to localize this value yourself. - __disallowoverscroll__: Set to `yes` or `no` (default is `no`). Turns on/off the UIWebViewBounce property. + - __hidetoolbarnavigationbuttons__: set to `yes` or `no` to turn the toolbar navigation buttons on or off (defaults to `no`). Only applicable if toolbar is not disabled. - __toolbar__: set to `yes` or `no` to turn the toolbar on or off for the InAppBrowser (defaults to `yes`) + - __toolbarcolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default color of the toolbar. Only applicable if toolbar is not disabled. + - __toolbartranslucent__: set to `yes` or `no` to make the toolbar translucent(semi-transparent) (defaults to `yes`). Only applicable if toolbar is not disabled. - __enableViewportScale__: Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`). - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). - __allowInlineMediaPlayback__: Set to `yes` or `no` to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface. The HTML's `video` element must also include the `webkit-playsinline` attribute (defaults to `no`) diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 62a834d..8f937fb 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -71,6 +71,8 @@ import org.json.JSONObject; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Field; import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.List; import java.util.HashMap; import java.util.StringTokenizer; @@ -95,8 +97,14 @@ public class InAppBrowser extends CordovaPlugin { private static final String SHOULD_PAUSE = "shouldPauseOnSuspend"; private static final Boolean DEFAULT_HARDWARE_BACK = true; private static final String USER_WIDE_VIEW_PORT = "useWideViewPort"; - private static final String CLOSE_BUTTON_TEXT = "closeButtonText"; - private static final String CLOSE_BUTTON_COLOR = "closeButtonColor"; + private static final String TOOLBAR_COLOR = "toolbarcolor"; + private static final String CLOSE_BUTTON_CAPTION = "closebuttoncaption"; + private static final String CLOSE_BUTTON_COLOR = "closebuttoncolor"; + private static final String HIDE_NAVIGATION = "hidenavigationbuttons"; + private static final String NAVIGATION_COLOR = "navigationbuttoncolor"; + private static final String HIDE_URL = "hideurlbar"; + + private static final List customizableOptions = Arrays.asList(CLOSE_BUTTON_CAPTION, TOOLBAR_COLOR, NAVIGATION_COLOR, CLOSE_BUTTON_COLOR); private InAppBrowserDialog dialog; private WebView inAppWebView; @@ -115,8 +123,12 @@ public class InAppBrowser extends CordovaPlugin { private ValueCallback mUploadCallbackLollipop; private final static int FILECHOOSER_REQUESTCODE = 1; private final static int FILECHOOSER_REQUESTCODE_LOLLIPOP = 2; - private String closeButtonText = ""; - private int closeButtonColor = android.graphics.Color.LTGRAY; + private String closeButtonCaption = ""; + private String closeButtonColor = ""; + private int toolbarColor = android.graphics.Color.LTGRAY; + private boolean hideNavigationButtons = false; + private String navigationButtonColor = ""; + private boolean hideUrlBar = false; /** * Executes the request and returns PluginResult. @@ -386,10 +398,10 @@ public class InAppBrowser extends CordovaPlugin { if (option.hasMoreElements()) { String key = option.nextToken(); String value = null; - if (key.equals(CLOSE_BUTTON_TEXT)) value = option.nextToken(); + if (customizableOptions.contains(key)) value = option.nextToken(); else { String token = option.nextToken(); - value = token.equals("yes") || token.equals("no") ? token : "yes"; // hér!! + value = token.equals("yes") || token.equals("no") ? token : "yes"; } map.put(key, value); } @@ -548,6 +560,12 @@ public class InAppBrowser extends CordovaPlugin { if (show != null) { showLocationBar = show.equals("yes") ? true : false; } + if(showLocationBar) { + String hideNavigation = features.get(HIDE_NAVIGATION); + String hideUrl = features.get(HIDE_URL); + if(hideNavigation != null) hideNavigationButtons = hideNavigation.equals("yes") ? true : false; + if(hideUrl != null) hideUrlBar = hideUrl.equals("yes") ? true : false; + } String zoom = features.get(ZOOM); if (zoom != null) { showZoomControls = zoom.equals("yes") ? true : false; @@ -583,13 +601,21 @@ public class InAppBrowser extends CordovaPlugin { if (wideViewPort != null ) { useWideViewPort = wideViewPort.equals("yes") ? true : false; } - String closeButtonTextSet = features.get(CLOSE_BUTTON_TEXT); - if (closeButtonTextSet != null) { - closeButtonText = closeButtonTextSet; + String closeButtonCaptionSet = features.get(CLOSE_BUTTON_CAPTION); + if (closeButtonCaptionSet != null) { + closeButtonCaption = closeButtonCaptionSet; } - String closeButtonTextColorSet = features.get(CLOSE_BUTTON_COLOR); - if (closeButtonTextColorSet != null) { - closeButtonColor = Color.parseColor(closeButtonTextColorSet); + String closeButtonColorSet = features.get(CLOSE_BUTTON_COLOR); + if (closeButtonColorSet != null) { + closeButtonColor = closeButtonColorSet; + } + String toolbarColorSet = features.get(TOOLBAR_COLOR); + if (toolbarColorSet != null) { + toolbarColor = android.graphics.Color.parseColor(toolbarColorSet); + } + String navigationButtonColorSet = features.get(NAVIGATION_COLOR); + if (navigationButtonColorSet != null) { + navigationButtonColor = navigationButtonColorSet; } } @@ -633,7 +659,7 @@ public class InAppBrowser extends CordovaPlugin { // Toolbar layout RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); //Please, no more black! - toolbar.setBackgroundColor(closeButtonColor); + toolbar.setBackgroundColor(toolbarColor); toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); toolbar.setHorizontalGravity(Gravity.LEFT); @@ -656,6 +682,7 @@ public class InAppBrowser extends CordovaPlugin { Resources activityRes = cordova.getActivity().getResources(); int backResId = activityRes.getIdentifier("ic_action_previous_item", "drawable", cordova.getActivity().getPackageName()); Drawable backIcon = activityRes.getDrawable(backResId); + if (navigationButtonColor != "") back.setColorFilter(android.graphics.Color.parseColor(navigationButtonColor)); if (Build.VERSION.SDK_INT >= 16) back.setBackground(null); else @@ -681,6 +708,7 @@ public class InAppBrowser extends CordovaPlugin { forward.setId(Integer.valueOf(3)); int fwdResId = activityRes.getIdentifier("ic_action_next_item", "drawable", cordova.getActivity().getPackageName()); Drawable fwdIcon = activityRes.getDrawable(fwdResId); + if (navigationButtonColor != "") forward.setColorFilter(android.graphics.Color.parseColor(navigationButtonColor)); if (Build.VERSION.SDK_INT >= 16) forward.setBackground(null); else @@ -721,13 +749,25 @@ public class InAppBrowser extends CordovaPlugin { }); // Close/Done button - if (closeButtonText != "") { - /* Use TextView for text */ + if (closeButtonCaption != "") { + // Use TextView for text TextView close = new TextView(cordova.getActivity()); - close.setText(closeButtonText); - close.setTextSize(25); - back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + close.setText(closeButtonCaption); + close.setTextSize(20); + if (closeButtonColor != "") close.setTextColor(android.graphics.Color.parseColor(closeButtonColor)); + close.setGravity(android.view.Gravity.CENTER_VERTICAL); + RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + close.setLayoutParams(closeLayoutParams); + + close.setContentDescription("Close Button"); close.setId(Integer.valueOf(5)); + if (Build.VERSION.SDK_INT >= 16) + close.setBackground(null); + else + close.setBackgroundDrawable(null); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + close.setPadding(this.dpToPixels(10), 0, this.dpToPixels(10), 0); close.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { closeDialog(); @@ -744,6 +784,7 @@ public class InAppBrowser extends CordovaPlugin { close.setId(Integer.valueOf(5)); int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); Drawable closeIcon = activityRes.getDrawable(closeResId); + if (closeButtonColor != "") close.setColorFilter(android.graphics.Color.parseColor(closeButtonColor)); if (Build.VERSION.SDK_INT >= 16) close.setBackground(null); else @@ -863,10 +904,9 @@ public class InAppBrowser extends CordovaPlugin { actionButtonContainer.addView(back); actionButtonContainer.addView(forward); - // Add the views to our toolbar - toolbar.addView(actionButtonContainer); - toolbar.addView(edittext); - // toolbar.addView(close); + // Add the views to our toolbar if they haven't been disabled + if (!hideNavigationButtons) toolbar.addView(actionButtonContainer); + if (!hideUrlBar) toolbar.addView(edittext); // Don't add the toolbar if its been disabled if (getShowLocationBar()) { diff --git a/src/ios/CDVInAppBrowser.h b/src/ios/CDVInAppBrowser.h index 8f01721..05d72f8 100644 --- a/src/ios/CDVInAppBrowser.h +++ b/src/ios/CDVInAppBrowser.h @@ -53,7 +53,7 @@ @property (nonatomic, copy) NSString* toolbarposition; @property (nonatomic, copy) NSString* toolbarcolor; @property (nonatomic, assign) BOOL toolbartranslucent; -@property (nonatomic, assign) BOOL hideToolbarNavigationButtons; +@property (nonatomic, assign) BOOL hidetoolbarnavigationbuttons; @property (nonatomic, assign) BOOL clearcache; @property (nonatomic, assign) BOOL clearsessioncache; diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index a890f7f..eb3b75d 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -649,7 +649,7 @@ self.backButton.imageInsets = UIEdgeInsetsZero; // Filter out Navigation Buttons if user requests so - if (_browserOptions.hideToolbarNavigationButtons) { + if (_browserOptions.hidetoolbarnavigationbuttons) { [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton]]; } else { [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]]; @@ -1020,7 +1020,7 @@ self.suppressesincrementalrendering = NO; self.hidden = NO; self.disallowoverscroll = NO; - self.hideToolbarNavigationButtons = NO; + self.hideToolbarnavigationbuttons = NO; self.closebuttoncolor = nil; self.toolbarcolor = nil; self.toolbartranslucent = YES; From 4af420c5920bd779efd9ab19613e132d51040e2b Mon Sep 17 00:00:00 2001 From: Landsbankinn Date: Fri, 6 Oct 2017 15:35:28 +0000 Subject: [PATCH 03/23] CB-13409: change hidetoolbarnavigationbuttons to hidenavigationbuttons in iso --- README.md | 3 ++- src/ios/CDVInAppBrowser.h | 2 +- src/ios/CDVInAppBrowser.m | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6eb0479..c911551 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ instance, or the system browser. - __hidenavigationbuttons__: set to `yes` to hide the navigation buttons on the location toolbar, only has effect if user has location set to `yes`. The default value is `no`. - __hideurlbar__: set to `yes` to hide the url bar on the location toolbar, only has effect if user has location set to `yes`. The default value is `no`. - __navigationbuttoncolor__: set to a valid hex color string, for example: `#00ff00`, and it will change the color of both navigation buttons from default. Only has effect if user has location set to `yes` and not hidenavigationbuttons set to `yes`. + - __toolbarcolor__: set to a valid hex color string, for example: `#00ff00`, and it will change the color the toolbar from default. Only has effect if user has location set to `yes`. - __zoom__: set to `yes` to show Android browser's zoom controls, set to `no` to hide them. Default value is `yes`. - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). - __shouldPauseOnSuspend__: Set to `yes` to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues like described in [CB-11013](https://issues.apache.org/jira/browse/CB-11013)). @@ -132,7 +133,7 @@ instance, or the system browser. - __closebuttoncolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default __Done__ button's color. Only applicable if toolbar is not disabled. - __closebuttoncaption__: set to a string to use as the __Done__ button's caption. Note that you need to localize this value yourself. - __disallowoverscroll__: Set to `yes` or `no` (default is `no`). Turns on/off the UIWebViewBounce property. - - __hidetoolbarnavigationbuttons__: set to `yes` or `no` to turn the toolbar navigation buttons on or off (defaults to `no`). Only applicable if toolbar is not disabled. + - __hidenavigationbuttons__: set to `yes` or `no` to turn the toolbar navigation buttons on or off (defaults to `no`). Only applicable if toolbar is not disabled. - __toolbar__: set to `yes` or `no` to turn the toolbar on or off for the InAppBrowser (defaults to `yes`) - __toolbarcolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default color of the toolbar. Only applicable if toolbar is not disabled. - __toolbartranslucent__: set to `yes` or `no` to make the toolbar translucent(semi-transparent) (defaults to `yes`). Only applicable if toolbar is not disabled. diff --git a/src/ios/CDVInAppBrowser.h b/src/ios/CDVInAppBrowser.h index 05d72f8..9338c55 100644 --- a/src/ios/CDVInAppBrowser.h +++ b/src/ios/CDVInAppBrowser.h @@ -53,7 +53,7 @@ @property (nonatomic, copy) NSString* toolbarposition; @property (nonatomic, copy) NSString* toolbarcolor; @property (nonatomic, assign) BOOL toolbartranslucent; -@property (nonatomic, assign) BOOL hidetoolbarnavigationbuttons; +@property (nonatomic, assign) BOOL hidenavigationbuttons; @property (nonatomic, assign) BOOL clearcache; @property (nonatomic, assign) BOOL clearsessioncache; diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index eb3b75d..a581472 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -649,7 +649,7 @@ self.backButton.imageInsets = UIEdgeInsetsZero; // Filter out Navigation Buttons if user requests so - if (_browserOptions.hidetoolbarnavigationbuttons) { + if (_browserOptions.hidenavigationbuttons) { [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton]]; } else { [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]]; @@ -1020,7 +1020,7 @@ self.suppressesincrementalrendering = NO; self.hidden = NO; self.disallowoverscroll = NO; - self.hideToolbarnavigationbuttons = NO; + self.hidenavigationbuttons = NO; self.closebuttoncolor = nil; self.toolbarcolor = nil; self.toolbartranslucent = YES; From 55b02285f93515c0f153b0f89366d978192dd900 Mon Sep 17 00:00:00 2001 From: Landsbankinn Date: Mon, 9 Oct 2017 13:50:12 +0000 Subject: [PATCH 04/23] CB-13409: ignore idea folder --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2209f42..8bbbbcd 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ Thumbs.db *.user node_modules +.idea @@ -20,5 +21,4 @@ node_modules - - \ No newline at end of file + From 6c2a8f4576e34ab29ffce102f12efb9c494ba386 Mon Sep 17 00:00:00 2001 From: Landsbankinn Date: Mon, 9 Oct 2017 16:09:08 +0000 Subject: [PATCH 05/23] CB-13409: restore gitignore to default --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8bbbbcd..1a8b5a7 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ Thumbs.db *.user node_modules -.idea From ec2f12c8728f4ed39244bd6f3ae011e124e1ddce Mon Sep 17 00:00:00 2001 From: Landsbankinn Date: Mon, 9 Oct 2017 16:10:22 +0000 Subject: [PATCH 06/23] CB-13409: restore gitignore to default --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1a8b5a7..1568bfc 100644 --- a/.gitignore +++ b/.gitignore @@ -19,5 +19,3 @@ node_modules - - From ff230d429a3975c670f16e9e8cdf21c6ef874be8 Mon Sep 17 00:00:00 2001 From: Landsbankinn Date: Mon, 9 Oct 2017 16:10:58 +0000 Subject: [PATCH 07/23] CB-13409: restore gitignore to default --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 1568bfc..1de4e24 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ node_modules + + + From d46f5d45d521eef5faffe0ed71718ddc7c8dfd50 Mon Sep 17 00:00:00 2001 From: Landsbankinn Date: Mon, 9 Oct 2017 16:11:40 +0000 Subject: [PATCH 08/23] CB-13409: restore gitignore to default --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1de4e24..4474e73 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,3 @@ node_modules - From 7fb19f6bdccf9c05379c4d5ba6b1c5731c07129a Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Fri, 20 Oct 2017 08:59:05 +0300 Subject: [PATCH 09/23] CB-13472: (CI) Fixed Travis Android builds again --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 70a784e..c6280ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -77,7 +77,7 @@ before_install: - node --version - if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi - if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi -- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25; +- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26; fi - git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic && npm install && popd From cc2299e1c379bce5961fdca377d62bda8442f9cf Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Fri, 20 Oct 2017 10:22:46 +0300 Subject: [PATCH 10/23] CB-13473: (CI) Removed browser builds from AppVeyor --- .appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6eea8b6..a7b2426 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -16,7 +16,6 @@ environment: matrix: - PLATFORM: windows-10-store JUST_BUILD: --justBuild - - PLATFORM: local\browser install: - npm cache clean -f - node --version From b9c577044c6f8e692429c35a1cb028f92c00c622 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Mon, 6 Nov 2017 14:37:45 -0800 Subject: [PATCH 11/23] CB-13542 Updated version and RELEASENOTES.md for release 1.7.2 (via coho) --- RELEASENOTES.md | 9 +++++++++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index ddd30d5..c102571 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,15 @@ --> # Release Notes +### 1.7.2 (Nov 06, 2017) +* [CB-13473](https://issues.apache.org/jira/browse/CB-13473) (CI) Removed **Browser** builds from AppVeyor +* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again +* [CB-13347](https://issues.apache.org/jira/browse/CB-13347) Enable thirdparty cookies on `>=Android 5.0` device +* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) added `eslint` and removed `jshint` +* [CB-12975](https://issues.apache.org/jira/browse/CB-12975) (docs) Resort and reword `cordova.InAppBrowser.open` `options` lists +* [CB-12586](https://issues.apache.org/jira/browse/CB-12586) (iOS) fix method `hide` doesn't work +* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. + ### 1.7.1 (Apr 27, 2017) * [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badges to `README` * [CB-12266](https://issues.apache.org/jira/browse/CB-12266) (browser platform) loadstop event.url is now a string instead of an object, aligning it with the other platforms. diff --git a/package.json b/package.json index 2f97b5f..406e726 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.7.2-dev", + "version": "1.7.2", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 5329fdf..083d8aa 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.7.2"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 78c9510..058813c 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.7.2"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 0f2f14a56386f07a66090d3432d533b77febfb5a Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Mon, 6 Nov 2017 14:38:39 -0800 Subject: [PATCH 12/23] Set VERSION to 1.7.3-dev (via coho) --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 406e726..0656205 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.7.2", + "version": "1.7.3-dev", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 083d8aa..c857ec6 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="1.7.3-dev"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 058813c..4dae01f 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.7.3-dev"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 2c547a1a1ef934b36fe2a910f79313967de49209 Mon Sep 17 00:00:00 2001 From: Suraj Pindoria Date: Tue, 12 Dec 2017 11:22:50 -0800 Subject: [PATCH 13/23] CB-13662: remove deprecated platforms --- README.md | 69 +- package.json | 20 +- plugin.xml | 119 +--- src/amazon/InAppBrowser.java | 879 ------------------------ src/amazon/InAppChromeClient.java | 146 ---- src/blackberry10/README.md | 43 -- src/blackberry10/doc/de/README.md | 24 - src/blackberry10/doc/es/README.md | 24 - src/blackberry10/doc/fr/README.md | 24 - src/blackberry10/doc/it/README.md | 24 - src/blackberry10/doc/ja/README.md | 24 - src/blackberry10/doc/ko/README.md | 24 - src/blackberry10/doc/pl/README.md | 24 - src/blackberry10/doc/zh/README.md | 24 - src/firefoxos/InAppBrowserProxy.js | 190 ----- src/ubuntu/InAppBrowser.qml | 92 --- src/ubuntu/InAppBrowser_escapeScript.js | 31 - src/ubuntu/close.png | Bin 461 -> 0 bytes src/ubuntu/inappbrowser.cpp | 109 --- src/ubuntu/inappbrowser.h | 62 -- src/wp/InAppBrowser.cs | 530 -------------- www/windows8/InAppBrowserProxy.js | 126 ---- 22 files changed, 14 insertions(+), 2594 deletions(-) delete mode 100644 src/amazon/InAppBrowser.java delete mode 100644 src/amazon/InAppChromeClient.java delete mode 100644 src/blackberry10/README.md delete mode 100644 src/blackberry10/doc/de/README.md delete mode 100644 src/blackberry10/doc/es/README.md delete mode 100644 src/blackberry10/doc/fr/README.md delete mode 100644 src/blackberry10/doc/it/README.md delete mode 100644 src/blackberry10/doc/ja/README.md delete mode 100644 src/blackberry10/doc/ko/README.md delete mode 100644 src/blackberry10/doc/pl/README.md delete mode 100644 src/blackberry10/doc/zh/README.md delete mode 100644 src/firefoxos/InAppBrowserProxy.js delete mode 100644 src/ubuntu/InAppBrowser.qml delete mode 100644 src/ubuntu/InAppBrowser_escapeScript.js delete mode 100644 src/ubuntu/close.png delete mode 100644 src/ubuntu/inappbrowser.cpp delete mode 100644 src/ubuntu/inappbrowser.h delete mode 100644 src/wp/InAppBrowser.cs delete mode 100644 www/windows8/InAppBrowserProxy.js diff --git a/README.md b/README.md index a4b7cd9..2653394 100644 --- a/README.md +++ b/README.md @@ -144,66 +144,23 @@ instance, or the system browser. ### Supported Platforms -- Amazon Fire OS - Android -- BlackBerry 10 - Browser -- Firefox OS - iOS - OSX -- Windows 8 and 8.1 -- Windows Phone 7 and 8 +- Windows ### Example var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); -### Firefox OS Quirks - -As plugin doesn't enforce any design there is a need to add some CSS rules if -opened with `target='_blank'`. The rules might look like these - -``` css -.inAppBrowserWrap { - background-color: rgba(0,0,0,0.75); - color: rgba(235,235,235,1.0); -} -.inAppBrowserWrap menu { - overflow: auto; - list-style-type: none; - padding-left: 0; -} -.inAppBrowserWrap menu li { - font-size: 25px; - height: 25px; - float: left; - margin: 0 10px; - padding: 3px 10px; - text-decoration: none; - color: #ccc; - display: block; - background: rgba(30,30,30,0.50); -} -.inAppBrowserWrap menu li.disabled { - color: #777; -} -``` - ### OSX Quirks At the moment the only supported target in OSX is `_system`. `_blank` and `_self` targets are not yet implemented and are ignored silently. Pull requests and patches to get these to work are greatly appreciated. -### Windows Quirks - -Windows 8.0, 8.1 and Windows Phone 8.1 don't support remote urls to be opened in the Cordova WebView so remote urls are always showed in the system's web browser if opened with `target='_self'`. - -On Windows 10 if the URL is NOT in the white list and is opened with `target='_self'` it will be showed in the system's web browser instead of InAppBrowser popup. - -Similar to Firefox OS IAB window visual behaviour can be overridden via `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` CSS classes - ### Browser Quirks - Plugin is implemented via iframe, @@ -324,12 +281,11 @@ function executeScriptCallBack(params) { ### Supported Platforms -- Amazon Fire OS - Android - Browser - iOS -- Windows 8 and 8.1 -- Windows Phone 7 and 8 +- Windows +- OSX ### Browser Quirks @@ -360,12 +316,10 @@ The function is passed an `InAppBrowserEvent` object. ### Supported Platforms -- Amazon Fire OS - Android - Browser - iOS -- Windows 8 and 8.1 -- Windows Phone 7 and 8 +- Windows ### Quick Example @@ -384,13 +338,10 @@ The function is passed an `InAppBrowserEvent` object. ### Supported Platforms -- Amazon Fire OS - Android - Browser -- Firefox OS - iOS -- Windows 8 and 8.1 -- Windows Phone 7 and 8 +- Windows ### Quick Example @@ -407,11 +358,10 @@ The function is passed an `InAppBrowserEvent` object. ### Supported Platforms -- Amazon Fire OS - Android - Browser - iOS -- Windows 8 and 8.1 +- Windows ### Quick Example @@ -429,10 +379,9 @@ The function is passed an `InAppBrowserEvent` object. ### Supported Platforms -- Amazon Fire OS - Android - iOS -- Windows 8 and 8.1 +- Windows ### Quick Example @@ -461,11 +410,10 @@ The function is passed an `InAppBrowserEvent` object. ### Supported Platforms -- Amazon Fire OS - Android - Browser - iOS -- Windows 8 and 8.1 +- Windows ### Quick Example @@ -498,7 +446,6 @@ Due to [MSDN docs](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.cont ### Supported Platforms -- Amazon Fire OS - Android - iOS - Windows diff --git a/package.json b/package.json index 0656205..e9f8a85 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,16 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.7.3-dev", + "version": "2.0.0-dev", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { "id": "cordova-plugin-inappbrowser", "platforms": [ "android", - "amazon-fireos", - "ubuntu", + "browser", "ios", "osx", - "wp7", - "wp8", - "windows8", - "windows", - "firefoxos" + "windows" ] }, "repository": { @@ -33,15 +28,10 @@ "inappbrowser", "ecosystem:cordova", "cordova-android", - "cordova-amazon-fireos", - "cordova-ubuntu", + "cordova-browser", "cordova-ios", "cordova-osx", - "cordova-wp7", - "cordova-wp8", - "cordova-windows8", - "cordova-windows", - "cordova-firefoxos" + "cordova-windows" ], "scripts": { "test": "npm run eslint", diff --git a/plugin.xml b/plugin.xml index c857ec6..1c660ff 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.0-dev"> InAppBrowser Cordova InAppBrowser Plugin @@ -67,52 +67,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -147,63 +101,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -216,20 +113,6 @@ - - - - - - - - - - - - - - diff --git a/src/amazon/InAppBrowser.java b/src/amazon/InAppBrowser.java deleted file mode 100644 index c5d6f66..0000000 --- a/src/amazon/InAppBrowser.java +++ /dev/null @@ -1,879 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.inappbrowser; - -import android.annotation.SuppressLint; -import org.apache.cordova.inappbrowser.InAppBrowserDialog; -import android.content.Context; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.res.Resources; -import android.graphics.Bitmap; -import android.graphics.drawable.Drawable; -import android.net.Uri; -import android.os.Build; -import android.os.Bundle; -import android.text.InputType; -import android.util.Log; -import android.util.TypedValue; -import android.view.Gravity; -import android.view.KeyEvent; -import android.view.View; -import android.view.Window; -import android.view.WindowManager; -import android.view.WindowManager.LayoutParams; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputMethodManager; -import com.amazon.android.webkit.AmazonWebChromeClient; -import com.amazon.android.webkit.AmazonGeolocationPermissions.Callback; -import com.amazon.android.webkit.AmazonJsPromptResult; -import com.amazon.android.webkit.AmazonWebSettings; -import com.amazon.android.webkit.AmazonWebStorage; -import com.amazon.android.webkit.AmazonWebView; -import com.amazon.android.webkit.AmazonWebViewClient; -import com.amazon.android.webkit.AmazonCookieManager; -import android.widget.Button; -import android.widget.EditText; -import android.widget.LinearLayout; -import android.widget.RelativeLayout; - -import org.apache.cordova.CallbackContext; -import org.apache.cordova.Config; -import org.apache.cordova.CordovaArgs; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.LOG; -import org.apache.cordova.PluginResult; -import org.apache.cordova.CordovaActivity; -import org.json.JSONException; -import org.json.JSONObject; - -import java.util.HashMap; -import java.util.StringTokenizer; - -@SuppressLint("SetJavaScriptEnabled") -public class InAppBrowser extends CordovaPlugin { - - private static final String NULL = "null"; - protected static final String LOG_TAG = "InAppBrowser"; - private static final String SELF = "_self"; - private static final String SYSTEM = "_system"; - // private static final String BLANK = "_blank"; - private static final String EXIT_EVENT = "exit"; - private static final String LOCATION = "location"; - private static final String HIDDEN = "hidden"; - private static final String ZOOM = "zoom"; - private static final String LOAD_START_EVENT = "loadstart"; - private static final String LOAD_STOP_EVENT = "loadstop"; - private static final String LOAD_ERROR_EVENT = "loaderror"; - private static final String CLEAR_ALL_CACHE = "clearcache"; - private static final String CLEAR_SESSION_CACHE = "clearsessioncache"; - private static final String HARDWARE_BACK_BUTTON = "hardwareback"; - - private InAppBrowserDialog dialog; - private AmazonWebView inAppWebView; - private EditText edittext; - private CallbackContext callbackContext; - private boolean showLocationBar = true; - private boolean showZoomControls = true; - private boolean openWindowHidden = false; - private boolean clearAllCache= false; - private boolean clearSessionCache=false; - private boolean hadwareBackButton=true; - - /** - * Executes the request and returns PluginResult. - * - * @param action The action to execute. - * @param args JSONArry of arguments for the plugin. - * @param callbackId The callback id used when calling back into JavaScript. - * @return A PluginResult object with a status and message. - */ - public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException { - if (action.equals("open")) { - this.callbackContext = callbackContext; - final String url = args.getString(0); - String t = args.optString(1); - if (t == null || t.equals("") || t.equals(NULL)) { - t = SELF; - } - final String target = t; - final HashMap features = parseFeature(args.optString(2)); - - Log.d(LOG_TAG, "target = " + target); - - this.cordova.getActivity().runOnUiThread(new Runnable() { - @Override - public void run() { - String result = ""; - // SELF - if (SELF.equals(target)) { - Log.d(LOG_TAG, "in self"); - // load in webview - if (url.startsWith("file://") || url.startsWith("javascript:") - || Config.isUrlWhiteListed(url)) { - Log.d(LOG_TAG, "loading in webview"); - webView.loadUrl(url); - } - //Load the dialer - else if (url.startsWith(AmazonWebView.SCHEME_TEL)) - { - try { - Log.d(LOG_TAG, "loading in dialer"); - Intent intent = new Intent(Intent.ACTION_DIAL); - intent.setData(Uri.parse(url)); - cordova.getActivity().startActivity(intent); - } catch (android.content.ActivityNotFoundException e) { - LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); - } - } - // load in InAppBrowser - else { - Log.d(LOG_TAG, "loading in InAppBrowser"); - result = showWebPage(url, features); - } - } - // SYSTEM - else if (SYSTEM.equals(target)) { - Log.d(LOG_TAG, "in system"); - result = openExternal(url); - } - // BLANK - or anything else - else { - Log.d(LOG_TAG, "in blank"); - result = showWebPage(url, features); - } - - PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, result); - pluginResult.setKeepCallback(true); - callbackContext.sendPluginResult(pluginResult); - } - }); - } - else if (action.equals("close")) { - closeDialog(); - } - else if (action.equals("injectScriptCode")) { - String jsWrapper = null; - if (args.getBoolean(1)) { - jsWrapper = String.format("prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')", callbackContext.getCallbackId()); - } - injectDeferredObject(args.getString(0), jsWrapper); - } - else if (action.equals("injectScriptFile")) { - String jsWrapper; - if (args.getBoolean(1)) { - jsWrapper = String.format("(function(d) { var c = d.createElement('script'); c.src = %%s; c.onload = function() { prompt('', 'gap-iab://%s'); }; d.body.appendChild(c); })(document)", callbackContext.getCallbackId()); - } else { - jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %s; d.body.appendChild(c); })(document)"; - } - injectDeferredObject(args.getString(0), jsWrapper); - } - else if (action.equals("injectStyleCode")) { - String jsWrapper; - if (args.getBoolean(1)) { - jsWrapper = String.format("(function(d) { var c = d.createElement('style'); c.innerHTML = %%s; d.body.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); - } else { - jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %s; d.body.appendChild(c); })(document)"; - } - injectDeferredObject(args.getString(0), jsWrapper); - } - else if (action.equals("injectStyleFile")) { - String jsWrapper; - if (args.getBoolean(1)) { - jsWrapper = String.format("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%s; d.head.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); - } else { - jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %s; d.head.appendChild(c); })(document)"; - } - injectDeferredObject(args.getString(0), jsWrapper); - } - else if (action.equals("show")) { - this.cordova.getActivity().runOnUiThread(new Runnable() { - @Override - public void run() { - dialog.show(); - } - }); - PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); - pluginResult.setKeepCallback(true); - this.callbackContext.sendPluginResult(pluginResult); - } - else if (action.equals("hide")) { - this.cordova.getActivity().runOnUiThread(new Runnable() { - @Override - public void run() { - dialog.hide(); - } - }); - PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); - pluginResult.setKeepCallback(true); - this.callbackContext.sendPluginResult(pluginResult); - } - else { - return false; - } - return true; - } - - /** - * Called when the view navigates. - */ - @Override - public void onReset() { - closeDialog(); - } - - /** - * Called by AccelBroker when listener is to be shut down. - * Stop listener. - */ - public void onDestroy() { - closeDialog(); - } - - /** - * Inject an object (script or style) into the InAppBrowser AmazonWebView. - * - * This is a helper method for the inject{Script|Style}{Code|File} API calls, which - * provides a consistent method for injecting JavaScript code into the document. - * - * If a wrapper string is supplied, then the source string will be JSON-encoded (adding - * quotes) and wrapped using string formatting. (The wrapper string should have a single - * '%s' marker) - * - * @param source The source object (filename or script/style text) to inject into - * the document. - * @param jsWrapper A JavaScript string to wrap the source string in, so that the object - * is properly injected, or null if the source string is JavaScript text - * which should be executed directly. - */ - private void injectDeferredObject(String source, String jsWrapper) { - final String scriptToInject; - if (jsWrapper != null) { - org.json.JSONArray jsonEsc = new org.json.JSONArray(); - jsonEsc.put(source); - String jsonRepr = jsonEsc.toString(); - String jsonSourceString = jsonRepr.substring(1, jsonRepr.length()-1); - scriptToInject = String.format(jsWrapper, jsonSourceString); - } else { - scriptToInject = source; - } - final String finalScriptToInject = scriptToInject; - this.cordova.getActivity().runOnUiThread(new Runnable() { - @SuppressLint("NewApi") - @Override - public void run() { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { - // This action will have the side-effect of blurring the currently focused element - inAppWebView.loadUrl("javascript:" + finalScriptToInject); - } /*else { - inAppWebView.evaluateJavascript(finalScriptToInject, null); - }*/ - } - }); - } - - /** - * Put the list of features into a hash map - * - * @param optString - * @return - */ - private HashMap parseFeature(String optString) { - if (optString.equals(NULL)) { - return null; - } else { - HashMap map = new HashMap(); - StringTokenizer features = new StringTokenizer(optString, ","); - StringTokenizer option; - while(features.hasMoreElements()) { - option = new StringTokenizer(features.nextToken(), "="); - if (option.hasMoreElements()) { - String key = option.nextToken(); - Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; - map.put(key, value); - } - } - return map; - } - } - - /** - * Display a new browser with the specified URL. - * - * @param url The url to load. - * @param usePhoneGap Load url in PhoneGap webview - * @return "" if ok, or error message. - */ - public String openExternal(String url) { - try { - Intent intent = null; - intent = new Intent(Intent.ACTION_VIEW); - // Omitting the MIME type for file: URLs causes "No Activity found to handle Intent". - // Adding the MIME type to http: URLs causes them to not be handled by the downloader. - Uri uri = Uri.parse(url); - if ("file".equals(uri.getScheme())) { - intent.setDataAndType(uri, webView.getResourceApi().getMimeType(uri)); - } else { - intent.setData(uri); - } - this.cordova.getActivity().startActivity(intent); - return ""; - } catch (android.content.ActivityNotFoundException e) { - Log.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString()); - return e.toString(); - } - } - - /** - * Closes the dialog - */ - public void closeDialog() { - final AmazonWebView childView = this.inAppWebView; - // The JS protects against multiple calls, so this should happen only when - // closeDialog() is called by other native code. - if (childView == null) { - return; - } - this.cordova.getActivity().runOnUiThread(new Runnable() { - @Override - public void run() { - childView.setWebViewClient(new AmazonWebViewClient() { - // NB: wait for about:blank before dismissing - public void onPageFinished(AmazonWebView view, String url) { - if (dialog != null) { - dialog.dismiss(); - } - } - }); - // NB: From SDK 19: "If you call methods on WebView from any thread - // other than your app's UI thread, it can cause unexpected results." - // http://developer.android.com/guide/webapps/migrating.html#Threads - childView.loadUrl("about:blank"); - } - }); - - try { - JSONObject obj = new JSONObject(); - obj.put("type", EXIT_EVENT); - sendUpdate(obj, false); - } catch (JSONException ex) { - Log.d(LOG_TAG, "Should never happen"); - } - } - /** - * Checks to see if it is possible to go back one page in history, then does so. - */ - public void goBack() { - this.cordova.getActivity().runOnUiThread(new Runnable() { - public void run() { - if (InAppBrowser.this.inAppWebView.canGoBack()) { - InAppBrowser.this.inAppWebView.goBack(); - } - } - }); - } - - /** - * Can the web browser go back? - * @return boolean - */ - public boolean canGoBack() { - return this.inAppWebView.canGoBack(); - } - - /** - * Has the user set the hardware back button to go back - * @return boolean - */ - public boolean hardwareBack() { - return hadwareBackButton; - } - - /** - * Checks to see if it is possible to go forward one page in history, then does so. - */ - private void goForward() { - this.cordova.getActivity().runOnUiThread(new Runnable() { - public void run() { - if (InAppBrowser.this.inAppWebView.canGoForward()) { - InAppBrowser.this.inAppWebView.goForward(); - } - } - }); - } - - /** - * Navigate to the new page - * - * @param url to load - */ - private void navigate(final String url) { - InputMethodManager imm = (InputMethodManager)this.cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); - imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0); - - this.cordova.getActivity().runOnUiThread(new Runnable() { - public void run() { - if (!url.startsWith("http") && !url.startsWith("file:")) { - InAppBrowser.this.inAppWebView.loadUrl("http://" + url); - } else { - InAppBrowser.this.inAppWebView.loadUrl(url); - } - InAppBrowser.this.inAppWebView.requestFocus(); - } - }); - } - - - /** - * Should we show the location bar? - * - * @return boolean - */ - private boolean getShowLocationBar() { - return this.showLocationBar; - } - - /** - * Should we show the zoom controls? - * - * @return boolean - */ - private boolean getShowZoomControls() { - return this.showZoomControls; - } - - private InAppBrowser getInAppBrowser(){ - return this; - } - - /** - * Display a new browser with the specified URL. - * - * @param url The url to load. - * @param jsonObject - */ - public String showWebPage(final String url, HashMap features) { - // Determine if we should hide the location bar. - showLocationBar = true; - showZoomControls = true; - openWindowHidden = false; - if (features != null) { - Boolean show = features.get(LOCATION); - if (show != null) { - showLocationBar = show.booleanValue(); - } - Boolean zoom = features.get(ZOOM); - if (zoom != null) { - showZoomControls = zoom.booleanValue(); - } - Boolean hidden = features.get(HIDDEN); - if (hidden != null) { - openWindowHidden = hidden.booleanValue(); - } - Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON); - if (hardwareBack != null) { - hadwareBackButton = hardwareBack.booleanValue(); - } - Boolean cache = features.get(CLEAR_ALL_CACHE); - if (cache != null) { - clearAllCache = cache.booleanValue(); - } else { - cache = features.get(CLEAR_SESSION_CACHE); - if (cache != null) { - clearSessionCache = cache.booleanValue(); - } - } - } - - final CordovaWebView thatWebView = this.webView; - - // Create dialog in new thread - Runnable runnable = new Runnable() { - /** - * Convert our DIP units to Pixels - * - * @return int - */ - private int dpToPixels(int dipValue) { - int value = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, - (float) dipValue, - cordova.getActivity().getResources().getDisplayMetrics() - ); - - return value; - } - - @SuppressLint("NewApi") - public void run() { - // Let's create the main dialog - dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar); - dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog; - dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); - dialog.setCancelable(true); - dialog.setInAppBroswer(getInAppBrowser()); - - // Main container layout - LinearLayout main = new LinearLayout(cordova.getActivity()); - main.setOrientation(LinearLayout.VERTICAL); - - // Toolbar layout - RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); - //Please, no more black! - toolbar.setBackgroundColor(android.graphics.Color.LTGRAY); - toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); - toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); - toolbar.setHorizontalGravity(Gravity.LEFT); - toolbar.setVerticalGravity(Gravity.TOP); - - // Action Button Container layout - RelativeLayout actionButtonContainer = new RelativeLayout(cordova.getActivity()); - actionButtonContainer.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); - actionButtonContainer.setHorizontalGravity(Gravity.LEFT); - actionButtonContainer.setVerticalGravity(Gravity.CENTER_VERTICAL); - actionButtonContainer.setId(1); - - // Back button - Button back = new Button(cordova.getActivity()); - RelativeLayout.LayoutParams backLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); - backLayoutParams.addRule(RelativeLayout.ALIGN_LEFT); - back.setLayoutParams(backLayoutParams); - back.setContentDescription("Back Button"); - back.setId(2); - Resources activityRes = cordova.getActivity().getResources(); - int backResId = activityRes.getIdentifier("ic_action_previous_item", "drawable", cordova.getActivity().getPackageName()); - Drawable backIcon = activityRes.getDrawable(backResId); - if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) - { - back.setBackgroundDrawable(backIcon); - } - else - { - back.setBackground(backIcon); - } - - back.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - goBack(); - } - }); - - // Forward button - Button forward = new Button(cordova.getActivity()); - RelativeLayout.LayoutParams forwardLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); - forwardLayoutParams.addRule(RelativeLayout.RIGHT_OF, 2); - forward.setLayoutParams(forwardLayoutParams); - forward.setContentDescription("Forward Button"); - forward.setId(3); - int fwdResId = activityRes.getIdentifier("ic_action_next_item", "drawable", cordova.getActivity().getPackageName()); - Drawable fwdIcon = activityRes.getDrawable(fwdResId); - if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) - { - forward.setBackgroundDrawable(fwdIcon); - } - else - { - forward.setBackground(fwdIcon); - } - forward.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - goForward(); - } - }); - - // Edit Text Box - edittext = new EditText(cordova.getActivity()); - RelativeLayout.LayoutParams textLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); - textLayoutParams.addRule(RelativeLayout.RIGHT_OF, 1); - textLayoutParams.addRule(RelativeLayout.LEFT_OF, 5); - edittext.setLayoutParams(textLayoutParams); - edittext.setId(4); - edittext.setSingleLine(true); - edittext.setText(url); - edittext.setInputType(InputType.TYPE_TEXT_VARIATION_URI); - edittext.setImeOptions(EditorInfo.IME_ACTION_GO); - edittext.setInputType(InputType.TYPE_NULL); // Will not except input... Makes the text NON-EDITABLE - edittext.setOnKeyListener(new View.OnKeyListener() { - public boolean onKey(View v, int keyCode, KeyEvent event) { - // If the event is a key-down event on the "enter" button - if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { - navigate(edittext.getText().toString()); - return true; - } - return false; - } - }); - - // Close/Done button - Button close = new Button(cordova.getActivity()); - RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); - closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); - close.setLayoutParams(closeLayoutParams); - forward.setContentDescription("Close Button"); - close.setId(5); - int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); - Drawable closeIcon = activityRes.getDrawable(closeResId); - if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) - { - close.setBackgroundDrawable(closeIcon); - } - else - { - close.setBackground(closeIcon); - } - close.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - closeDialog(); - } - }); - - // WebView - inAppWebView = new AmazonWebView(cordova.getActivity()); - - CordovaActivity app = (CordovaActivity) cordova.getActivity(); - cordova.getFactory().initializeWebView(inAppWebView, 0x00FF00, false, null); - - inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); - inAppWebView.setWebChromeClient(new InAppChromeClient(thatWebView)); - AmazonWebViewClient client = new InAppBrowserClient(thatWebView, edittext); - inAppWebView.setWebViewClient(client); - AmazonWebSettings settings = inAppWebView.getSettings(); - settings.setJavaScriptEnabled(true); - settings.setJavaScriptCanOpenWindowsAutomatically(true); - settings.setBuiltInZoomControls(getShowZoomControls()); - settings.setPluginState(com.amazon.android.webkit.AmazonWebSettings.PluginState.ON); - - //Toggle whether this is enabled or not! - Bundle appSettings = cordova.getActivity().getIntent().getExtras(); - boolean enableDatabase = appSettings == null ? true : appSettings.getBoolean("InAppBrowserStorageEnabled", true); - if (enableDatabase) { - String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath(); - settings.setDatabasePath(databasePath); - settings.setDatabaseEnabled(true); - } - settings.setDomStorageEnabled(true); - - if (clearAllCache) { - AmazonCookieManager.getInstance().removeAllCookie(); - } else if (clearSessionCache) { - AmazonCookieManager.getInstance().removeSessionCookie(); - } - - inAppWebView.loadUrl(url); - inAppWebView.setId(6); - inAppWebView.getSettings().setLoadWithOverviewMode(true); - inAppWebView.getSettings().setUseWideViewPort(true); - inAppWebView.requestFocus(); - inAppWebView.requestFocusFromTouch(); - - // Add the back and forward buttons to our action button container layout - actionButtonContainer.addView(back); - actionButtonContainer.addView(forward); - - // Add the views to our toolbar - toolbar.addView(actionButtonContainer); - toolbar.addView(edittext); - toolbar.addView(close); - - // Don't add the toolbar if its been disabled - if (getShowLocationBar()) { - // Add our toolbar to our main view/layout - main.addView(toolbar); - } - - // Add our webview to our main view/layout - main.addView(inAppWebView); - - WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); - lp.copyFrom(dialog.getWindow().getAttributes()); - lp.width = WindowManager.LayoutParams.MATCH_PARENT; - lp.height = WindowManager.LayoutParams.MATCH_PARENT; - - dialog.setContentView(main); - dialog.show(); - dialog.getWindow().setAttributes(lp); - // the goal of openhidden is to load the url and not display it - // Show() needs to be called to cause the URL to be loaded - if(openWindowHidden) { - dialog.hide(); - } - } - }; - this.cordova.getActivity().runOnUiThread(runnable); - return ""; - } - - /** - * Create a new plugin success result and send it back to JavaScript - * - * @param obj a JSONObject contain event payload information - */ - private void sendUpdate(JSONObject obj, boolean keepCallback) { - sendUpdate(obj, keepCallback, PluginResult.Status.OK); - } - - /** - * Create a new plugin result and send it back to JavaScript - * - * @param obj a JSONObject contain event payload information - * @param status the status code to return to the JavaScript environment - */ - private void sendUpdate(JSONObject obj, boolean keepCallback, PluginResult.Status status) { - if (callbackContext != null) { - PluginResult result = new PluginResult(status, obj); - result.setKeepCallback(keepCallback); - callbackContext.sendPluginResult(result); - if (!keepCallback) { - callbackContext = null; - } - } - } - - /** - * The webview client receives notifications about appView - */ - public class InAppBrowserClient extends AmazonWebViewClient { - EditText edittext; - CordovaWebView webView; - - /** - * Constructor. - * - * @param mContext - * @param edittext - */ - public InAppBrowserClient(CordovaWebView webView, EditText mEditText) { - this.webView = webView; - this.edittext = mEditText; - } - - /** - * Notify the host application that a page has started loading. - * - * @param view The webview initiating the callback. - * @param url The url of the page. - */ - @Override - public void onPageStarted(AmazonWebView view, String url, Bitmap favicon) { - super.onPageStarted(view, url, favicon); - String newloc = ""; - if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:")) { - newloc = url; - } - // If dialing phone (tel:5551212) - else if (url.startsWith(AmazonWebView.SCHEME_TEL)) { - try { - Intent intent = new Intent(Intent.ACTION_DIAL); - intent.setData(Uri.parse(url)); - cordova.getActivity().startActivity(intent); - } catch (android.content.ActivityNotFoundException e) { - LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); - } - } - - else if (url.startsWith("geo:") || url.startsWith(AmazonWebView.SCHEME_MAILTO) || url.startsWith("market:")) { - try { - Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setData(Uri.parse(url)); - cordova.getActivity().startActivity(intent); - } catch (android.content.ActivityNotFoundException e) { - LOG.e(LOG_TAG, "Error with " + url + ": " + e.toString()); - } - } - // If sms:5551212?body=This is the message - else if (url.startsWith("sms:")) { - try { - Intent intent = new Intent(Intent.ACTION_VIEW); - - // Get address - String address = null; - int parmIndex = url.indexOf('?'); - if (parmIndex == -1) { - address = url.substring(4); - } - else { - address = url.substring(4, parmIndex); - - // If body, then set sms body - Uri uri = Uri.parse(url); - String query = uri.getQuery(); - if (query != null) { - if (query.startsWith("body=")) { - intent.putExtra("sms_body", query.substring(5)); - } - } - } - intent.setData(Uri.parse("sms:" + address)); - intent.putExtra("address", address); - intent.setType("vnd.android-dir/mms-sms"); - cordova.getActivity().startActivity(intent); - } catch (android.content.ActivityNotFoundException e) { - LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString()); - } - } - else { - newloc = "http://" + url; - } - - if (!newloc.equals(edittext.getText().toString())) { - edittext.setText(newloc); - } - - try { - JSONObject obj = new JSONObject(); - obj.put("type", LOAD_START_EVENT); - obj.put("url", newloc); - - sendUpdate(obj, true); - } catch (JSONException ex) { - Log.d(LOG_TAG, "Should never happen"); - } - } - - public void onPageFinished(AmazonWebView view, String url) { - super.onPageFinished(view, url); - - try { - JSONObject obj = new JSONObject(); - obj.put("type", LOAD_STOP_EVENT); - obj.put("url", url); - - sendUpdate(obj, true); - } catch (JSONException ex) { - Log.d(LOG_TAG, "Should never happen"); - } - } - - public void onReceivedError(AmazonWebView view, int errorCode, String description, String failingUrl) { - super.onReceivedError(view, errorCode, description, failingUrl); - - try { - JSONObject obj = new JSONObject(); - obj.put("type", LOAD_ERROR_EVENT); - obj.put("url", failingUrl); - obj.put("code", errorCode); - obj.put("message", description); - - sendUpdate(obj, true, PluginResult.Status.ERROR); - } catch (JSONException ex) { - Log.d(LOG_TAG, "Should never happen"); - } - } - } -} diff --git a/src/amazon/InAppChromeClient.java b/src/amazon/InAppChromeClient.java deleted file mode 100644 index 37cf101..0000000 --- a/src/amazon/InAppChromeClient.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.inappbrowser; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.LOG; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; - -import com.amazon.android.webkit.AmazonWebChromeClient; -import com.amazon.android.webkit.AmazonGeolocationPermissions.Callback; -import com.amazon.android.webkit.AmazonJsPromptResult; -import com.amazon.android.webkit.AmazonWebStorage; -import com.amazon.android.webkit.AmazonWebView; -import com.amazon.android.webkit.AmazonWebViewClient; - -public class InAppChromeClient extends AmazonWebChromeClient { - - private CordovaWebView webView; - private String LOG_TAG = "InAppChromeClient"; - private long MAX_QUOTA = 100 * 1024 * 1024; - - public InAppChromeClient(CordovaWebView webView) { - super(); - this.webView = webView; - } - /** - * Handle database quota exceeded notification. - * - * @param url - * @param databaseIdentifier - * @param currentQuota - * @param estimatedSize - * @param totalUsedQuota - * @param quotaUpdater - */ - @Override - public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, - long totalUsedQuota, AmazonWebStorage.QuotaUpdater quotaUpdater) - { - LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota); - - if (estimatedSize < MAX_QUOTA) - { - //increase for 1Mb - long newQuota = estimatedSize; - LOG.d(LOG_TAG, "calling quotaUpdater.updateQuota newQuota: %d", newQuota); - quotaUpdater.updateQuota(newQuota); - } - else - { - // Set the quota to whatever it is and force an error - // TODO: get docs on how to handle this properly - quotaUpdater.updateQuota(currentQuota); - } - } - - /** - * Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin. - * - * @param origin - * @param callback - */ - @Override - public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) { - super.onGeolocationPermissionsShowPrompt(origin, callback); - callback.invoke(origin, true, false); - } - - /** - * Tell the client to display a prompt dialog to the user. - * If the client returns true, WebView will assume that the client will - * handle the prompt dialog and call the appropriate JsPromptResult method. - * - * The prompt bridge provided for the InAppBrowser is capable of executing any - * oustanding callback belonging to the InAppBrowser plugin. Care has been - * taken that other callbacks cannot be triggered, and that no other code - * execution is possible. - * - * To trigger the bridge, the prompt default value should be of the form: - * - * gap-iab:// - * - * where is the string id of the callback to trigger (something - * like "InAppBrowser0123456789") - * - * If present, the prompt message is expected to be a JSON-encoded value to - * pass to the callback. A JSON_EXCEPTION is returned if the JSON is invalid. - * - * @param view - * @param url - * @param message - * @param defaultValue - * @param result - */ - @Override - public boolean onJsPrompt(AmazonWebView view, String url, String message, String defaultValue, AmazonJsPromptResult result) { - // See if the prompt string uses the 'gap-iab' protocol. If so, the remainder should be the id of a callback to execute. - if (defaultValue != null && defaultValue.startsWith("gap")) { - if(defaultValue.startsWith("gap-iab://")) { - PluginResult scriptResult; - String scriptCallbackId = defaultValue.substring(10); - if (scriptCallbackId.startsWith("InAppBrowser")) { - if(message == null || message.length() == 0) { - scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray()); - } else { - try { - scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray(message)); - } catch(JSONException e) { - scriptResult = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage()); - } - } - this.webView.sendPluginResult(scriptResult, scriptCallbackId); - result.confirm(""); - return true; - } - } - else - { - // Anything else with a gap: prefix should get this message - LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue); - result.cancel(); - return true; - } - } - return false; - } - -} diff --git a/src/blackberry10/README.md b/src/blackberry10/README.md deleted file mode 100644 index f0fa860..0000000 --- a/src/blackberry10/README.md +++ /dev/null @@ -1,43 +0,0 @@ - -# BlackBerry 10 In-App-Browser Plugin - -The in app browser functionality is entirely contained within common js. There is no native implementation required. -To install this plugin, follow the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). - -If you are not using the Cordova Command-line Interface, follow [Using Plugman to Manage Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). -./cordova-plugin-battery-status/README.md -./cordova-plugin-camera/README.md -./cordova-plugin-console/README.md -./cordova-plugin-contacts/README.md -./cordova-plugin-device/README.md -./cordova-plugin-device-motion/README.md -./cordova-plugin-device-orientation/README.md -./cordova-plugin-device-orientation/src/blackberry10/README.md -./cordova-plugin-file/README.md -./cordova-plugin-file-transfer/README.md -./cordova-plugin-geolocation/README.md -./cordova-plugin-globalization/README.md -./cordova-plugin-inappbrowser/README.md -./cordova-plugin-inappbrowser/src/blackberry10/README.md -./cordova-plugin-media/README.md -./cordova-plugin-media-capture/README.md -./cordova-plugin-network-information/README.md -./cordova-plugin-splashscreen/README.md -./cordova-plugin-vibration/README.md diff --git a/src/blackberry10/doc/de/README.md b/src/blackberry10/doc/de/README.md deleted file mode 100644 index e394487..0000000 --- a/src/blackberry10/doc/de/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BlackBerry 10-In-App-Browser-Plugin - -Die Funktionalität ist im app-Browser vollständig in gemeinsamen Js enthalten. Es gibt keine native Implementierung benötigt. Um dieses Plugin zu installieren, folgen Sie dem [Command-Line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). - -Wenn Sie nicht die Cordova-Befehlszeilenschnittstelle verwenden, folgen Sie [Verwenden Plugman zu Plugins verwalten](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/es/README.md b/src/blackberry10/doc/es/README.md deleted file mode 100644 index 7530336..0000000 --- a/src/blackberry10/doc/es/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BlackBerry 10 In-App-Browser Plugin - -El en el navegador de aplicación funcionalidad está enteramente dentro de js común. No hay ninguna aplicación nativa necesaria. Para instalar este plugin, siga la [Guía de la interfaz de línea de comandos](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). - -Si no utiliza la interfaz de línea de comandos de Cordova, siga [Usando Plugman para gestionar Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/fr/README.md b/src/blackberry10/doc/fr/README.md deleted file mode 100644 index 179bd48..0000000 --- a/src/blackberry10/doc/fr/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BlackBerry 10 In-App-Browser Plugin - -Le dans le navigateur de l'application, la fonctionnalité est entièrement contenue dans js commun. Il n'y a aucune implémentation native requise. Pour installer ce plugin, suivez le [Guide de l'Interface de ligne de commande](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). - -Si vous n'utilisez pas l'Interface de ligne de commande de Cordova, suivez [Les Plugman à l'aide à gérer les Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/it/README.md b/src/blackberry10/doc/it/README.md deleted file mode 100644 index 8f0623d..0000000 --- a/src/blackberry10/doc/it/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BlackBerry 10 In-App-Browser Plugin - -Il browser app funzionalità è interamente contenuta nel comune js. Non esiste alcuna implementazione nativa richiesto. Per installare questo plugin, seguire la [Guida per l'interfaccia della riga di comando](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). - -Se non si utilizza l'interfaccia della riga di comando di Cordova, seguire [Utilizzando Plugman per gestire i plugin](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/ja/README.md b/src/blackberry10/doc/ja/README.md deleted file mode 100644 index b9e4b7b..0000000 --- a/src/blackberry10/doc/ja/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BlackBerry 10 In-App-Browser Plugin - -アプリケーション ブラウザーの機能は全く一般的な js に含まれています。 ネイティブ実装する必要はありません。 このプラグインをインストールするには[コマンド ライン インターフェイス ガイド](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). - -コルドバのコマンド ライン インターフェイスを使用していない場合は場合、[管理のプラグインを使用して Plugman](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)に従ってください。 ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/ko/README.md b/src/blackberry10/doc/ko/README.md deleted file mode 100644 index 67fb8de..0000000 --- a/src/blackberry10/doc/ko/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# 블랙베리 10 애플 리 케이 션-브라우저 플러그인 - -응용 프로그램 브라우저에서 기능은 완전히 포함 된 일반적인 js. 필요 없는 기본 구현이입니다. 이 플러그인을 설치 하려면 [명령줄 인터페이스 가이드](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface) 를 따라합니다. - -코르도바 명령줄 인터페이스를 사용 하지 않는 경우 [관리 플러그인을 사용 하 여 Plugman](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)를 따르십시오. ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/pl/README.md b/src/blackberry10/doc/pl/README.md deleted file mode 100644 index ef199ee..0000000 --- a/src/blackberry10/doc/pl/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BlackBerry 10 In-App-Browser Plugin - -W aplikacji Przeglądarka funkcjonalność jest całkowicie zawarty w wspólnej js. Tam jest nie native wdrażania wymagane. Aby zainstalować ten plugin, następować po ten [Przewodnik interfejsu wiersza polecenia](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). - -Jeśli nie używasz interfejsu wiersza polecenia Cordova, następować po [Przy użyciu Plugman do zarządzania wtyczki](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/blackberry10/doc/zh/README.md b/src/blackberry10/doc/zh/README.md deleted file mode 100644 index 241fb55..0000000 --- a/src/blackberry10/doc/zh/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# 黑莓 10 的應用程式瀏覽器外掛程式 - -在應用程式瀏覽器功能完全包含在常見的 js。 還有沒有本機的實施所需。 若要安裝此外掛程式,請按照[命令列介面指南](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). - -如果你不使用的科爾多瓦命令列介面,請按照[使用 Plugman 管理外掛程式](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)。 ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/src/firefoxos/InAppBrowserProxy.js b/src/firefoxos/InAppBrowserProxy.js deleted file mode 100644 index 4538c05..0000000 --- a/src/firefoxos/InAppBrowserProxy.js +++ /dev/null @@ -1,190 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -// https://developer.mozilla.org/en-US/docs/WebAPI/Browser - -var modulemapper = require('cordova/modulemapper'); - -var origOpenFunc = modulemapper.getOriginalSymbol(window, 'window.open'); -var browserWrap; - -var IABExecs = { - - close: function (win, lose) { - if (browserWrap) { - browserWrap.parentNode.removeChild(browserWrap); - browserWrap = null; - if (typeof (win) === 'function') win({type: 'exit'}); - } - }, - - /* - * Reveal browser if opened hidden - */ - show: function (win, lose) { - console.error('[FirefoxOS] show not implemented'); - }, - - hide: function (win, lose) { - console.error('[FirefoxOS] hide not implemented'); - }, - - open: function (win, lose, args) { - var strUrl = args[0]; - var target = args[1]; - var features_string = args[2] || 'location=yes'; // location=yes is default - var features = {}; - - var features_list = features_string.split(','); - features_list.forEach(function (feature) { - var tup = feature.split('='); - if (tup[1] === 'yes') { - tup[1] = true; - } else if (tup[1] === 'no') { - tup[1] = false; - } else { - var number = parseInt(tup[1]); - if (!isNaN(number)) { - tup[1] = number; - } - } - features[tup[0]] = tup[1]; - }); - function updateIframeSizeNoLocation () { - browserWrap.style.width = window.innerWidth + 'px'; - browserWrap.style.height = window.innerHeight + 'px'; - browserWrap.style.zIndex = '999999999'; - browserWrap.browser.style.height = (window.innerHeight - 60) + 'px'; - browserWrap.browser.style.width = browserWrap.style.width; - } - - if (target === '_system') { - origOpenFunc.apply(window, [strUrl, '_blank']); - } else if (target === '_blank') { - var browserElem = document.createElement('iframe'); - browserElem.setAttribute('mozbrowser', true); - // make this loaded in its own child process - browserElem.setAttribute('remote', true); - browserElem.setAttribute('src', strUrl); - if (browserWrap) { - document.body.removeChild(browserWrap); - } - browserWrap = document.createElement('div'); - // assign browser element to browserWrap for future reference - browserWrap.browser = browserElem; - - browserWrap.classList.add('inAppBrowserWrap'); - // position fixed so that it works even when page is scrolled - browserWrap.style.position = 'fixed'; - browserElem.style.position = 'absolute'; - browserElem.style.border = 0; - browserElem.style.top = '60px'; - browserElem.style.left = '0px'; - updateIframeSizeNoLocation(); - - var menu = document.createElement('menu'); - menu.setAttribute('type', 'toolbar'); - var close = document.createElement('li'); - var back = document.createElement('li'); - var forward = document.createElement('li'); - - close.appendChild(document.createTextNode('×')); - back.appendChild(document.createTextNode('<')); - forward.appendChild(document.createTextNode('>')); - - close.classList.add('inAppBrowserClose'); - back.classList.add('inAppBrowserBack'); - forward.classList.add('inAppBrowserForward'); - - var checkForwardBackward = function () { - var backReq = browserElem.getCanGoBack(); - backReq.onsuccess = function () { - if (this.result) { - back.classList.remove('disabled'); - } else { - back.classList.add('disabled'); - } - }; - var forwardReq = browserElem.getCanGoForward(); - forwardReq.onsuccess = function () { - if (this.result) { - forward.classList.remove('disabled'); - } else { - forward.classList.add('disabled'); - } - }; - }; - - browserElem.addEventListener('mozbrowserloadend', checkForwardBackward); - - close.addEventListener('click', function () { - setTimeout(function () { - IABExecs.close(win, lose); - }, 0); - }, false); - - back.addEventListener('click', function () { - browserElem.goBack(); - }, false); - - forward.addEventListener('click', function () { - browserElem.goForward(); - }, false); - - menu.appendChild(back); - menu.appendChild(forward); - menu.appendChild(close); - - browserWrap.appendChild(menu); - browserWrap.appendChild(browserElem); - document.body.appendChild(browserWrap); - - // we use mozbrowserlocationchange instead of mozbrowserloadstart to get the url - browserElem.addEventListener('mozbrowserlocationchange', function (e) { - win({ - type: 'loadstart', - url: e.detail - }); - }, false); - browserElem.addEventListener('mozbrowserloadend', function (e) { - win({type: 'loadstop'}); - }, false); - browserElem.addEventListener('mozbrowsererror', function (e) { - win({type: 'loaderror'}); - }, false); - browserElem.addEventListener('mozbrowserclose', function (e) { - win({type: 'exit'}); - }, false); - } else { - window.location = strUrl; - } - }, - injectScriptCode: function (code, bCB) { - console.error('[FirefoxOS] injectScriptCode not implemented'); - }, - injectScriptFile: function (file, bCB) { - console.error('[FirefoxOS] injectScriptFile not implemented'); - } -}; - -module.exports = IABExecs; - -require('cordova/exec/proxy').add('InAppBrowser', module.exports); diff --git a/src/ubuntu/InAppBrowser.qml b/src/ubuntu/InAppBrowser.qml deleted file mode 100644 index 781e8a6..0000000 --- a/src/ubuntu/InAppBrowser.qml +++ /dev/null @@ -1,92 +0,0 @@ -/* - * - * Copyright 2013 Canonical Ltd. - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ -import QtQuick 2.0 -import Ubuntu.Components.Popups 0.1 -import Ubuntu.Components 0.1 -import com.canonical.Oxide 1.0 - -Rectangle { - anchors.fill: parent - id: inappbrowser - property string url1 - Rectangle { - border.color: "black" - width: parent.width - height: urlEntry.height - color: "gray" - TextInput { - id: urlEntry - width: parent.width - closeButton.width - text: url1 - activeFocusOnPress: false - } - Image { - id: closeButton - width: height - x: parent.width - width - height: parent.height - source: "close.png" - MouseArea { - anchors.fill: parent - onClicked: { - root.exec("InAppBrowser", "close", [0, 0]) - } - } - } - } - - property string usContext: "oxide://main-world/2" - - function executeJS(scId, code) { - var req = _view.rootFrame.sendMessage(usContext, "EXECUTE", {code: code}); - - req.onreply = function(response) { - var code = 'cordova.callback(' + scId + ', JSON.parse(\'' + JSON.stringify(response.result) + '\'))'; - console.warn(code); - cordova.javaScriptExecNeeded(code); - console.warn("RESP:" + JSON.stringify(response)); - }; - } - - WebView { - width: parent.width - y: urlEntry.height - height: parent.height - y - url: url1 - id: _view - onLoadingStateChanged: { - root.exec("InAppBrowser", "loadFinished", [_view.loading]) - } - context: WebContext { - id: webcontext - - userScripts: [ - UserScript { - context: usContext - emulateGreasemonkey: true - url: "InAppBrowser_escapeScript.js" - } - ] - } - } -} diff --git a/src/ubuntu/InAppBrowser_escapeScript.js b/src/ubuntu/InAppBrowser_escapeScript.js deleted file mode 100644 index 9b9d029..0000000 --- a/src/ubuntu/InAppBrowser_escapeScript.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/* global oxide */ - -oxide.addMessageHandler('EXECUTE', function (msg) { - var code = msg.args.code; - try { - msg.reply({result: eval(code)}); // eslint-disable-line no-eval - } catch (e) { - msg.error('Code threw exception: "' + e + '"'); - } -}); diff --git a/src/ubuntu/close.png b/src/ubuntu/close.png deleted file mode 100644 index 56373d1fab22ebf492ea9e145d866e444e0ed46e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 461 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-s-T^)#uK)l42QrBS0s;aC1_l8E z0SO5S1qB5Q7A!b$;J}3o7e0LW05pe>cjHx{L3|}ae!&d<^7{Vq`Stzt*Pp-t-e~@; zDh38dWltB!kcwMpFFQ_ZG7xaM=)%##mnhP5=l_zl6%X`Z$W>*pUvuvFQ>BBoKYv`f z_WP{rmaG5wy-MyWe?Q~H_Lt}W?BjUdq#g~d~TfSj$?1SDzA4I05U;D24E?e@`w(nif{~GTp%dgmd;CAbm zvc~P)FW)}8G{5R+ui32lEr&iHJ$wAOX!$>d6;Ec*IPz@f#eVJL+gvu%HEWLUJ{ezP(7s~RXqJYD@<);T3K0RZo?&l3Ou diff --git a/src/ubuntu/inappbrowser.cpp b/src/ubuntu/inappbrowser.cpp deleted file mode 100644 index a928eff..0000000 --- a/src/ubuntu/inappbrowser.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * - * Copyright 2013 Canonical Ltd. - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -#include -#include - -#include "inappbrowser.h" -#include - -Inappbrowser::Inappbrowser(Cordova *cordova): CPlugin(cordova), _eventCb(0) { -} - -const char code[] = "\ -var component; \ -function createObject() { \ - component = Qt.createComponent(%1); \ - if (component.status == Component.Ready) \ - finishCreation(); \ - else \ - component.statusChanged.connect(finishCreation); \ -} \ -function finishCreation() { \ - CordovaWrapper.global.inappbrowser = component.createObject(root, \ - {root: root, cordova: cordova, url1: %2}); \ -} \ -createObject()"; - -const char EXIT_EVENT[] = "{type: 'exit'}"; -const char LOADSTART_EVENT[] = "{type: 'loadstart'}"; -const char LOADSTOP_EVENT[] = "{type: 'loadstop'}"; -const char LOADERROR_EVENT[] = "{type: 'loaderror'}"; - -void Inappbrowser::open(int cb, int, const QString &url, const QString &, const QString &) { - assert(_eventCb == 0); - - _eventCb = cb; - - QString path = m_cordova->get_app_dir() + "/../qml/InAppBrowser.qml"; - QString qml = QString(code) - .arg(CordovaInternal::format(path)).arg(CordovaInternal::format(url)); - m_cordova->execQML(qml); -} - -void Inappbrowser::show(int, int) { - m_cordova->execQML("CordovaWrapper.global.inappbrowser.visible = true"); -} - -void Inappbrowser::hide(int, int) { - m_cordova->execQML("CordovaWrapper.global.inappbrowser.visible = false"); -} - -void Inappbrowser::close(int, int) { - m_cordova->execQML("CordovaWrapper.global.inappbrowser.destroy()"); - this->callbackWithoutRemove(_eventCb, EXIT_EVENT); - _eventCb = 0; -} - -void Inappbrowser::injectStyleFile(int scId, int ecId, const QString& src, bool b) { - QString code("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %1; d.head.appendChild(c);})(document)"); - code = code.arg(CordovaInternal::format(src)); - - injectScriptCode(scId, ecId, code, b); -} - -void Inappbrowser::injectStyleCode(int scId, int ecId, const QString& src, bool b) { - QString code("(function(d) { var c = d.createElement('style'); c.innerHTML = %1; d.body.appendChild(c); })(document)"); - code = code.arg(CordovaInternal::format(src)); - - injectScriptCode(scId, ecId, code, b); -} - -void Inappbrowser::injectScriptFile(int scId, int ecId, const QString& src, bool b) { - QString code("(function(d) { var c = d.createElement('script'); c.src = %1; d.body.appendChild(c);})(document)"); - code = code.arg(CordovaInternal::format(src)); - - injectScriptCode(scId, ecId, code, b); -} - -void Inappbrowser::injectScriptCode(int scId, int, const QString& code, bool) { - m_cordova->execQML(QString("CordovaWrapper.global.inappbrowser.executeJS(%2, %1)").arg(CordovaInternal::format(code)).arg(scId)); -} - -void Inappbrowser::loadFinished(bool status) { - if (!status) { - this->callbackWithoutRemove(_eventCb, LOADSTOP_EVENT); - } else { - this->callbackWithoutRemove(_eventCb, LOADSTART_EVENT); - } -} diff --git a/src/ubuntu/inappbrowser.h b/src/ubuntu/inappbrowser.h deleted file mode 100644 index 9ad61ec..0000000 --- a/src/ubuntu/inappbrowser.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright 2013 Canonical Ltd. - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ -#ifndef INAPPBROWSER_H -#define INAPPBROWSER_H - -#include -#include - -class Inappbrowser: public CPlugin { - Q_OBJECT -public: - Inappbrowser(Cordova *cordova); - - virtual const QString fullName() override { - return Inappbrowser::fullID(); - } - - virtual const QString shortName() override { - return "InAppBrowser"; - } - - static const QString fullID() { - return "InAppBrowser"; - } - -public slots: - void open(int cb, int, const QString &url, const QString &windowName, const QString &windowFeatures); - void show(int, int); - void hide(int, int); - void close(int, int); - void injectStyleFile(int cb, int, const QString&, bool); - void injectStyleCode(int cb, int, const QString&, bool); - void injectScriptFile(int cb, int, const QString&, bool); - void injectScriptCode(int cb, int, const QString&, bool); - - void loadFinished(bool status); - -private: - int _eventCb; -}; - -#endif diff --git a/src/wp/InAppBrowser.cs b/src/wp/InAppBrowser.cs deleted file mode 100644 index fa6fbe4..0000000 --- a/src/wp/InAppBrowser.cs +++ /dev/null @@ -1,530 +0,0 @@ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -using System; -using System.Diagnostics; -using System.IO; -using System.Runtime.Serialization; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using Microsoft.Phone.Controls; -using Microsoft.Phone.Shell; - -#if WP8 -using System.Threading.Tasks; -using Windows.ApplicationModel; -using Windows.Storage; -using Windows.System; - -//Use alias in case Cordova File Plugin is enabled. Then the File class will be declared in both and error will occur. -using IOFile = System.IO.File; -#else -using Microsoft.Phone.Tasks; -#endif - -namespace WPCordovaClassLib.Cordova.Commands -{ - [DataContract] - public class BrowserOptions - { - [DataMember] - public string url; - - [DataMember] - public bool isGeolocationEnabled; - } - - public class InAppBrowser : BaseCommand - { - - private static WebBrowser browser; - private static ApplicationBarIconButton backButton; - private static ApplicationBarIconButton fwdButton; - - protected ApplicationBar AppBar; - - protected bool ShowLocation {get;set;} - protected bool StartHidden {get;set;} - - protected string NavigationCallbackId { get; set; } - - public void open(string options) - { - // reset defaults on ShowLocation + StartHidden features - ShowLocation = true; - StartHidden = false; - - string[] args = JSON.JsonHelper.Deserialize(options); - //BrowserOptions opts = JSON.JsonHelper.Deserialize(options); - string urlLoc = args[0]; - string target = args[1]; - string featString = args[2]; - this.NavigationCallbackId = args[3]; - - if (!string.IsNullOrEmpty(featString)) - { - string[] features = featString.Split(','); - foreach (string str in features) - { - try - { - string[] split = str.Split('='); - switch (split[0]) - { - case "location": - ShowLocation = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase); - break; - case "hidden": - StartHidden = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase); - break; - } - } - catch (Exception) - { - // some sort of invalid param was passed, moving on ... - } - } - } - /* - _self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser - _blank - always open in the InAppBrowser - _system - always open in the system web browser - */ - switch (target) - { - case "_blank": - ShowInAppBrowser(urlLoc); - break; - case "_self": - ShowCordovaBrowser(urlLoc); - break; - case "_system": - ShowSystemBrowser(urlLoc); - break; - } - } - - public void show(string options) - { - string[] args = JSON.JsonHelper.Deserialize(options); - - - if (browser != null) - { - Deployment.Current.Dispatcher.BeginInvoke(() => - { - browser.Visibility = Visibility.Visible; - AppBar.IsVisible = true; - }); - } - } - - public void hide(string options) - { - string[] args = JSON.JsonHelper.Deserialize(options); - - - if (browser != null) - { - Deployment.Current.Dispatcher.BeginInvoke(() => - { - browser.Visibility = Visibility.Collapsed; - AppBar.IsVisible = false; - }); - } - } - - public void injectScriptCode(string options) - { - string[] args = JSON.JsonHelper.Deserialize(options); - - bool bCallback = false; - if (bool.TryParse(args[1], out bCallback)) { }; - - string callbackId = args[2]; - - if (browser != null) - { - Deployment.Current.Dispatcher.BeginInvoke(() => - { - var res = browser.InvokeScript("eval", new string[] { args[0] }); - - if (bCallback) - { - PluginResult result = new PluginResult(PluginResult.Status.OK, res.ToString()); - result.KeepCallback = false; - this.DispatchCommandResult(result); - } - - }); - } - } - - public void injectScriptFile(string options) - { - Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support executeScript"); - string[] args = JSON.JsonHelper.Deserialize(options); - // throw new NotImplementedException("Windows Phone does not currently support 'executeScript'"); - } - - public void injectStyleCode(string options) - { - Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support insertCSS"); - return; - - //string[] args = JSON.JsonHelper.Deserialize(options); - //bool bCallback = false; - //if (bool.TryParse(args[1], out bCallback)) { }; - - //string callbackId = args[2]; - - //if (browser != null) - //{ - //Deployment.Current.Dispatcher.BeginInvoke(() => - //{ - // if (bCallback) - // { - // string cssInsertString = "try{(function(doc){var c = ''; doc.head.innerHTML += c;})(document);}catch(ex){alert('oops : ' + ex.message);}"; - // //cssInsertString = cssInsertString.Replace("_VALUE_", args[0]); - // Debug.WriteLine("cssInsertString = " + cssInsertString); - // var res = browser.InvokeScript("eval", new string[] { cssInsertString }); - // if (bCallback) - // { - // PluginResult result = new PluginResult(PluginResult.Status.OK, res.ToString()); - // result.KeepCallback = false; - // this.DispatchCommandResult(result); - // } - // } - - //}); - //} - } - - public void injectStyleFile(string options) - { - Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support insertCSS"); - return; - - //string[] args = JSON.JsonHelper.Deserialize(options); - //throw new NotImplementedException("Windows Phone does not currently support 'insertCSS'"); - } - - private void ShowCordovaBrowser(string url) - { - Uri loc = new Uri(url, UriKind.RelativeOrAbsolute); - Deployment.Current.Dispatcher.BeginInvoke(() => - { - PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; - if (frame != null) - { - PhoneApplicationPage page = frame.Content as PhoneApplicationPage; - if (page != null) - { - CordovaView cView = page.FindName("CordovaView") as CordovaView; - if (cView != null) - { - WebBrowser br = cView.Browser; - br.Navigate2(loc); - } - } - - } - }); - } - -#if WP8 - private async void ShowSystemBrowser(string url) - { - var pathUri = new Uri(url, UriKind.Absolute); - if (pathUri.Scheme == Uri.UriSchemeHttp || pathUri.Scheme == Uri.UriSchemeHttps) - { - await Launcher.LaunchUriAsync(pathUri); - return; - } - - var file = await GetFile(pathUri.AbsolutePath.Replace('/', Path.DirectorySeparatorChar)); - if (file != null) - { - await Launcher.LaunchFileAsync(file); - } - else - { - Debug.WriteLine("File not found."); - } - } - - private async Task GetFile(string fileName) - { - //first try to get the file from the isolated storage - var localFolder = ApplicationData.Current.LocalFolder; - if (IOFile.Exists(Path.Combine(localFolder.Path, fileName))) - { - return await localFolder.GetFileAsync(fileName); - } - - //if file is not found try to get it from the xap - var filePath = Path.Combine(Package.Current.InstalledLocation.Path, fileName); - if (IOFile.Exists(filePath)) - { - return await StorageFile.GetFileFromPathAsync(filePath); - } - - return null; - } -#else - private void ShowSystemBrowser(string url) - { - WebBrowserTask webBrowserTask = new WebBrowserTask(); - webBrowserTask.Uri = new Uri(url, UriKind.Absolute); - webBrowserTask.Show(); - } -#endif - - private void ShowInAppBrowser(string url) - { - Uri loc = new Uri(url, UriKind.RelativeOrAbsolute); - - Deployment.Current.Dispatcher.BeginInvoke(() => - { - if (browser != null) - { - //browser.IsGeolocationEnabled = opts.isGeolocationEnabled; - browser.Navigate2(loc); - } - else - { - PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; - if (frame != null) - { - PhoneApplicationPage page = frame.Content as PhoneApplicationPage; - - string baseImageUrl = "Images/"; - - if (page != null) - { - Grid grid = page.FindName("LayoutRoot") as Grid; - if (grid != null) - { - browser = new WebBrowser(); - browser.IsScriptEnabled = true; - browser.LoadCompleted += new System.Windows.Navigation.LoadCompletedEventHandler(browser_LoadCompleted); - - browser.Navigating += new EventHandler(browser_Navigating); - browser.NavigationFailed += new System.Windows.Navigation.NavigationFailedEventHandler(browser_NavigationFailed); - browser.Navigated += new EventHandler(browser_Navigated); - browser.Navigate2(loc); - - if (StartHidden) - { - browser.Visibility = Visibility.Collapsed; - } - - //browser.IsGeolocationEnabled = opts.isGeolocationEnabled; - grid.Children.Add(browser); - } - - ApplicationBar bar = new ApplicationBar(); - bar.BackgroundColor = Colors.Gray; - bar.IsMenuEnabled = false; - - backButton = new ApplicationBarIconButton(); - backButton.Text = "Back"; - - backButton.IconUri = new Uri(baseImageUrl + "appbar.back.rest.png", UriKind.Relative); - backButton.Click += new EventHandler(backButton_Click); - bar.Buttons.Add(backButton); - - - fwdButton = new ApplicationBarIconButton(); - fwdButton.Text = "Forward"; - fwdButton.IconUri = new Uri(baseImageUrl + "appbar.next.rest.png", UriKind.Relative); - fwdButton.Click += new EventHandler(fwdButton_Click); - bar.Buttons.Add(fwdButton); - - ApplicationBarIconButton closeBtn = new ApplicationBarIconButton(); - closeBtn.Text = "Close"; - closeBtn.IconUri = new Uri(baseImageUrl + "appbar.close.rest.png", UriKind.Relative); - closeBtn.Click += new EventHandler(closeBtn_Click); - bar.Buttons.Add(closeBtn); - - page.ApplicationBar = bar; - bar.IsVisible = !StartHidden; - AppBar = bar; - - page.BackKeyPress += page_BackKeyPress; - - } - - } - } - }); - } - - void page_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e) - { -#if WP8 - if (browser.CanGoBack) - { - browser.GoBack(); - } - else - { - close(); - } - e.Cancel = true; -#else - browser.InvokeScript("execScript", "history.back();"); -#endif - } - - void browser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) - { - - } - - void fwdButton_Click(object sender, EventArgs e) - { - if (browser != null) - { - try - { -#if WP8 - browser.GoForward(); -#else - browser.InvokeScript("execScript", "history.forward();"); -#endif - } - catch (Exception) - { - - } - } - } - - void backButton_Click(object sender, EventArgs e) - { - if (browser != null) - { - try - { -#if WP8 - browser.GoBack(); -#else - browser.InvokeScript("execScript", "history.back();"); -#endif - } - catch (Exception) - { - - } - } - } - - void closeBtn_Click(object sender, EventArgs e) - { - this.close(); - } - - - public void close(string options = "") - { - if (browser != null) - { - Deployment.Current.Dispatcher.BeginInvoke(() => - { - PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; - if (frame != null) - { - PhoneApplicationPage page = frame.Content as PhoneApplicationPage; - if (page != null) - { - Grid grid = page.FindName("LayoutRoot") as Grid; - if (grid != null) - { - grid.Children.Remove(browser); - } - page.ApplicationBar = null; - page.BackKeyPress -= page_BackKeyPress; - } - } - - browser = null; - string message = "{\"type\":\"exit\"}"; - PluginResult result = new PluginResult(PluginResult.Status.OK, message); - result.KeepCallback = false; - this.DispatchCommandResult(result, NavigationCallbackId); - }); - } - } - - void browser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) - { -#if WP8 - if (browser != null) - { - backButton.IsEnabled = browser.CanGoBack; - fwdButton.IsEnabled = browser.CanGoForward; - - } -#endif - string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.OriginalString + "\"}"; - PluginResult result = new PluginResult(PluginResult.Status.OK, message); - result.KeepCallback = true; - this.DispatchCommandResult(result, NavigationCallbackId); - } - - void browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e) - { - string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.OriginalString + "\"}"; - PluginResult result = new PluginResult(PluginResult.Status.ERROR, message); - result.KeepCallback = true; - this.DispatchCommandResult(result, NavigationCallbackId); - } - - void browser_Navigating(object sender, NavigatingEventArgs e) - { - string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.OriginalString + "\"}"; - PluginResult result = new PluginResult(PluginResult.Status.OK, message); - result.KeepCallback = true; - this.DispatchCommandResult(result, NavigationCallbackId); - } - - } - - internal static class WebBrowserExtensions - { - /// - /// Improved method to initiate request to the provided URI. Supports 'data:text/html' urls. - /// - /// The browser instance - /// The requested uri - internal static void Navigate2(this WebBrowser browser, Uri uri) - { - // IE10 does not support data uri so we use NavigateToString method instead - if (uri.Scheme == "data") - { - // we should remove the scheme identifier and unescape the uri - string uriString = Uri.UnescapeDataString(uri.AbsoluteUri); - // format is 'data:text/html, ...' - string html = new System.Text.RegularExpressions.Regex("^data:text/html,").Replace(uriString, ""); - browser.NavigateToString(html); - } - else - { - browser.Navigate(uri); - } - } - } -} diff --git a/www/windows8/InAppBrowserProxy.js b/www/windows8/InAppBrowserProxy.js deleted file mode 100644 index 13bb145..0000000 --- a/www/windows8/InAppBrowserProxy.js +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -/* jslint sloppy:true */ -/* global Windows:true, require, document, setTimeout, window, module */ - -var browserWrap; - -var IAB = { - - close: function (win, lose) { - if (browserWrap) { - browserWrap.parentNode.removeChild(browserWrap); - browserWrap = null; - } - }, - show: function (win, lose) { - /* empty block, ran out of bacon? - if (browserWrap) { - - } */ - }, - hide: function (win, lose) { - /* empty block, ran out of bacon? - if (browserWrap) { - - } */ - }, - open: function (win, lose, args) { - var strUrl = args[0]; - var target = args[1]; - var url; - var elem; - - if (target === '_system') { - url = new Windows.Foundation.Uri(strUrl); - Windows.System.Launcher.launchUriAsync(url); - } else if (target === '_blank') { - if (!browserWrap) { - browserWrap = document.createElement('div'); - browserWrap.style.position = 'absolute'; - browserWrap.style.width = (window.innerWidth - 80) + 'px'; - browserWrap.style.height = (window.innerHeight - 80) + 'px'; - browserWrap.style.borderWidth = '40px'; - browserWrap.style.borderStyle = 'solid'; - browserWrap.style.borderColor = 'rgba(0,0,0,0.25)'; - browserWrap.style.zIndex = '9999999'; - - browserWrap.onclick = function () { - setTimeout(function () { - IAB.close(); - }, 0); - }; - - document.body.appendChild(browserWrap); - } - var localFile = (strUrl.indexOf('ms-appdata:///') > -1); - if (localFile) { - elem = document.createElement('x-ms-webview'); - elem.style.width = (window.innerWidth - 80) + 'px'; - elem.style.height = (window.innerHeight - 80) + 'px'; - elem.style.borderWidth = '0px'; - elem.name = 'targetFrame'; - elem.src = strUrl; - - window.addEventListener('resize', function () { - if (browserWrap && elem) { - elem.style.width = (window.innerWidth - 80) + 'px'; - elem.style.height = (window.innerHeight - 80) + 'px'; - } - }); - } else { - elem = document.createElement('iframe'); - elem.style.width = (window.innerWidth - 80) + 'px'; - elem.style.height = (window.innerHeight - 80) + 'px'; - elem.style.borderWidth = '0px'; - elem.name = 'targetFrame'; - elem.src = strUrl; - - window.addEventListener('resize', function () { - if (browserWrap && elem) { - elem.style.width = (window.innerWidth - 80) + 'px'; - elem.style.height = (window.innerHeight - 80) + 'px'; - } - }); - } - - browserWrap.appendChild(elem); - } else { - window.location = strUrl; - } - - // var object = new WinJS.UI.HtmlControl(elem, { uri: strUrl }); - }, - - injectScriptCode: function (code, bCB) { - - // "(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document)" - }, - - injectScriptFile: function (file, bCB) { - - } -}; - -module.exports = IAB; - -require('cordova/exec/proxy').add('InAppBrowser', module.exports); From d85991accbc998f39e52d0d08efa907d47f3eb85 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 15 Dec 2017 17:25:13 -0800 Subject: [PATCH 14/23] CB-13681 Updated version and RELEASENOTES.md for release 2.0.0 (via coho) --- RELEASENOTES.md | 3 +++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index c102571..b71660a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,9 @@ --> # Release Notes +### 2.0.0 (Dec 15, 2017) +* [CB-13662](https://issues.apache.org/jira/browse/CB-13662) remove deprecated platforms + ### 1.7.2 (Nov 06, 2017) * [CB-13473](https://issues.apache.org/jira/browse/CB-13473) (CI) Removed **Browser** builds from AppVeyor * [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again diff --git a/package.json b/package.json index e9f8a85..57309b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "2.0.0-dev", + "version": "2.0.0", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 1c660ff..97adb0d 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.0"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 4dae01f..a9c1e83 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.0"> Cordova InAppBrowser Plugin Tests Apache 2.0 From e428556e2574e9d3032ec5030eee3016abf5a90a Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 15 Dec 2017 17:26:44 -0800 Subject: [PATCH 15/23] Set VERSION to 2.0.1-dev (via coho) --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 57309b4..00e9489 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "2.0.0", + "version": "2.0.1-dev", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 97adb0d..22b9b34 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.1-dev"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index a9c1e83..b7c1d11 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.1-dev"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 5f072a752d24a999cbd953e2a1ae365a8ca4215a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Tue, 26 Dec 2017 18:22:29 +0100 Subject: [PATCH 16/23] CB-13699: Fix to allow 2.0.0 version install --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 00e9489..d31094f 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "0.2.3": { "cordova": ">=3.1.0" }, - "2.0.0": { + "3.0.0": { "cordova": ">100" } } From 7c1ea3b5c21b06d676ce0d2588aa8a2909b6dcd6 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Wed, 27 Dec 2017 19:13:36 -0500 Subject: [PATCH 17/23] CB-13714 Updated version and RELEASENOTES.md for release 2.0.1 (via coho) --- RELEASENOTES.md | 656 +---------------------------------------------- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 5 insertions(+), 657 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b71660a..30ccda0 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,655 +1,3 @@ - -# Release Notes +### 2.0.1 (Dec 27, 2017) +* [CB-13699](https://issues.apache.org/jira/browse/CB-13699) Fix to allow 2.0.0 version install -### 2.0.0 (Dec 15, 2017) -* [CB-13662](https://issues.apache.org/jira/browse/CB-13662) remove deprecated platforms - -### 1.7.2 (Nov 06, 2017) -* [CB-13473](https://issues.apache.org/jira/browse/CB-13473) (CI) Removed **Browser** builds from AppVeyor -* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again -* [CB-13347](https://issues.apache.org/jira/browse/CB-13347) Enable thirdparty cookies on `>=Android 5.0` device -* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) added `eslint` and removed `jshint` -* [CB-12975](https://issues.apache.org/jira/browse/CB-12975) (docs) Resort and reword `cordova.InAppBrowser.open` `options` lists -* [CB-12586](https://issues.apache.org/jira/browse/CB-12586) (iOS) fix method `hide` doesn't work -* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. - -### 1.7.1 (Apr 27, 2017) -* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badges to `README` -* [CB-12266](https://issues.apache.org/jira/browse/CB-12266) (browser platform) loadstop event.url is now a string instead of an object, aligning it with the other platforms. -* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder -* [CB-11248](https://issues.apache.org/jira/browse/CB-11248) `InAppBrowser` no focus on input text fields - -### 1.7.0 (Feb 28, 2017) -* [CB-12366](https://issues.apache.org/jira/browse/CB-12366) **iOS:** Reduce `tmpWindow` level to prevent overlapping statusbar -* [CB-12364](https://issues.apache.org/jira/browse/CB-12364) **Windows:** `Inappbrowser` inject file manual tests are not working -* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml` -* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` -* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** -* [CB-9148](https://issues.apache.org/jira/browse/CB-9148) **Android:** Add Support for `input[type=file]` File Chooser -* [CB-11136](https://issues.apache.org/jira/browse/CB-11136) (ios) Fix `InAppBrowser` when closing with `WKWebView` -* [CB-10799](https://issues.apache.org/jira/browse/CB-10799) **iOS:** fix toolbar is shown in incorrect position when in-call status bar - -### 1.6.1 (Dec 14, 2016) -* [CB-12237](https://issues.apache.org/jira/browse/CB-12237) - Update version in package.json to correct 1.6.1-dev -* [CB-12236](https://issues.apache.org/jira/browse/CB-12236) - Fixed RELEASENOTES for cordova-plugin-inappbrowser -* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed Windows 8.1 build badges -* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Incremented plugin version. - -### 1.6.0 (Dec 07, 2016) -* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.6.0 -* [CB-7608](https://issues.apache.org/jira/browse/CB-7608) (android) document useWidthViewPort -* add option useWidthViewPort -* [CB-12184](https://issues.apache.org/jira/browse/CB-12184) executeScript leads to a null pointer on exception on Android. -* fix(close button): Set correct content description -* [CB-9274](https://issues.apache.org/jira/browse/CB-9274) Adds missing methods to InAppBrowser to allow compilation for Amazon FireOS. -* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes -* Increment plugin minor version because of new hide feature -* removed duplicate hide method in ios source and add jasmine test cases -* [CB-8467](https://issues.apache.org/jira/browse/CB-8467) -* [CB-12010](https://issues.apache.org/jira/browse/CB-12010) (android) Catch FileUriExposedException -* [CB-11955](https://issues.apache.org/jira/browse/CB-11955) Added Initial OSX platform support -* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been signed and submitted to secretary@apache.org." -* [CB-11694](https://issues.apache.org/jira/browse/CB-11694) Android: Set hadwareBackButton value according option in cordova.InAppBrowser.open -* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. - -### 1.5.1 (Dec 07, 2016) -* [CB-7608](https://issues.apache.org/jira/browse/CB-7608) (android) document useWidthViewPort -* add option useWidthViewPort -* [CB-12184](https://issues.apache.org/jira/browse/CB-12184) executeScript leads to a null pointer on exception on Android. -* fix(close button): Set correct content description -* [CB-9274](https://issues.apache.org/jira/browse/CB-9274) Adds missing methods to InAppBrowser to allow compilation for Amazon FireOS. -* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes -* Increment plugin minor version because of new hide feature -* removed duplicate hide method in ios source and add jasmine test cases -* [CB-8467](https://issues.apache.org/jira/browse/CB-8467) -* [CB-12010](https://issues.apache.org/jira/browse/CB-12010) (android) Catch FileUriExposedException -* [CB-11955](https://issues.apache.org/jira/browse/CB-11955) Added Initial OSX platform support -* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been signed and submitted to secretary@apache.org." -* [CB-11694](https://issues.apache.org/jira/browse/CB-11694) Android: Set hadwareBackButton value according option in cordova.InAppBrowser.open -* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. -* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Updated version and RELEASENOTES.md for release 1.5.0 -* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies -* Closing invalid pull request: close #28 -* Closing invalid pull request: close #78 -* Add intent scheme to be handled by OS -* Plugin uses Android Log class and not Cordova LOG class -* Adding links to guide content and reference content at the top of the readme file Github: close #163 -* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Browser Platform: wrong height of webview with location=yes -* Size and position in browser platform -* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes -* [CB-11013](https://issues.apache.org/jira/browse/CB-11013) IAB enabling background play of YouTube videos? -* [CB-10467](https://issues.apache.org/jira/browse/CB-10467) Hardware back button, while InAppBrowser is opened, closes the app too in addition to closing InAppBrowser -* [CB-11178](https://issues.apache.org/jira/browse/CB-11178) allow to open other apps on iOS 9 -* Closing stale pull request: close #152 -* fix some calls which used api level 16 -* [CB-5402](https://issues.apache.org/jira/browse/CB-5402) added extra content from wiki page -* doc: do not use `with` in JS samples -* Closing stale pull request: close #90 -* [CB-2063](https://issues.apache.org/jira/browse/CB-2063) (ios) Fixed presentation style -* [CB-11012](https://issues.apache.org/jira/browse/CB-11012) added some clarifications about InAppBrowser object -* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for ios -* Add badges for paramedic builds on Jenkins -* [CB-11381](https://issues.apache.org/jira/browse/CB-11381) android: Does not pass sonarqube scan -* Add pull request template. -* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine requirements to package.json -* [CB-110003](https://issues.apache.org/jira/browse/CB-110003) Adding samples to Readme. -* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md -* [CB-11091](https://issues.apache.org/jira/browse/CB-11091) Incremented plugin version. -* Updated version and RELEASENOTES.md for release 1.4.0 -* [CB-7679](https://issues.apache.org/jira/browse/CB-7679) add fix for iOS upload. This closes #139 -* [CB-10944](https://issues.apache.org/jira/browse/CB-10944) : NoSuchMethodError in InAppBrowser plugin -* [CB-10937](https://issues.apache.org/jira/browse/CB-10937) fix stretched icons -* [CB-10760](https://issues.apache.org/jira/browse/CB-10760) Fixing README for display on Cordova website -* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add JSHint for plugins -* Fixes [CB-10607](https://issues.apache.org/jira/browse/CB-10607) -* [CB-10557](https://issues.apache.org/jira/browse/CB-10557) Incremented plugin version. -* [CB-10557](https://issues.apache.org/jira/browse/CB-10557) Updated version and RELEASENOTES.md for release 1.3.0 -* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for android -* [CB-10538](https://issues.apache.org/jira/browse/CB-10538) cordova-plugin-inappbrowser timeout issue -* [CB-10395](https://issues.apache.org/jira/browse/CB-10395) InAppBrowser's WebView not storing cookies reliable on Android -* chore: edit package.json license to match SPDX id -* [CB-10305](https://issues.apache.org/jira/browse/CB-10305) Gray bar appears in the wrong place on iOS -* [CB-7786](https://issues.apache.org/jira/browse/CB-7786) Support mediaPlaybackRequiresUserAction on Android -* [CB-7500](https://issues.apache.org/jira/browse/CB-7500) executeScript with callback kills/blurs inAppBrowser window on Android -* [CB-10505](https://issues.apache.org/jira/browse/CB-10505) Incremented plugin version. -* [CB-10505](https://issues.apache.org/jira/browse/CB-10505) Updated version and RELEASENOTES.md for release 1.2.1 -* handle app store urls in system browser -* Added missing plugin dependency for manual tests -* [CB-10451](https://issues.apache.org/jira/browse/CB-10451) InAppBrowser: loadstart event is not triggered on Windows [CB-10452](https://issues.apache.org/jira/browse/CB-10452) InAppBrowser: 'exit' event is not triggered on Windows [CB-10454](https://issues.apache.org/jira/browse/CB-10454) InAppBrowser: 'loaderror' event does not have code and message on Windows [CB-10450](https://issues.apache.org/jira/browse/CB-10450) InAppBrowser: Unable to get property 'canGoBack' of undefined on Windows -* [CB-6702](https://issues.apache.org/jira/browse/CB-6702) InAppBrowser hangs when opening more than one instance -* [CB-10456](https://issues.apache.org/jira/browse/CB-10456) InAppBrowser is not closed if I close it programmatically on Android -* [CB-10441](https://issues.apache.org/jira/browse/CB-10441) Add auto tests for InAppBrowser plugin -* [CB-10428](https://issues.apache.org/jira/browse/CB-10428) Fix syntax error when browserifying inAppBrowser plugin -* [CB-10407](https://issues.apache.org/jira/browse/CB-10407) Re-adding onPageStarted to re-add LOAD_START, even though it's in the wrong place -* [CB-10368](https://issues.apache.org/jira/browse/CB-10368) Incremented plugin version. -* [CB-10368](https://issues.apache.org/jira/browse/CB-10368) Updated version and RELEASENOTES.md for release 1.2.0 -* [CB-8180](https://issues.apache.org/jira/browse/CB-8180) Changing methods of interception in WebViewClient class -* Fix lint warnings -* [CB-10009](https://issues.apache.org/jira/browse/CB-10009) Improve InAppBrowser toolbar look and feel on Windows -* Using modulemapper -* Open a new window on the browser platform -* [CB-10187](https://issues.apache.org/jira/browse/CB-10187) Incremented plugin version. -* [CB-10187](https://issues.apache.org/jira/browse/CB-10187) Updated version and RELEASENOTES.md for release 1.1.1 -* [CB-9445](https://issues.apache.org/jira/browse/CB-9445) Improves executeScript callbacks on iOS -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Incremented plugin version. -* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - re-fix: backwards compatible with cordova-ios < 4.0 -* [CB-8534](https://issues.apache.org/jira/browse/CB-8534) Allow plugins to respond to onReceivedHttpAuthRequest. This closes #82 -* [CB-3750](https://issues.apache.org/jira/browse/CB-3750) Fixes spinner on iOS. This closes #89 -* [CB-7696](https://issues.apache.org/jira/browse/CB-7696) Document target=_self behavior for Windows -* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - Compile Error in InAppBrowser Plugin for iOS - No known instance method for selector 'URLIsWhitelisted:' -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) linked issues in RELEASENOTES.md -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated version and RELEASENOTES.md for release 1.1.0 -* removed r prefix from tags -* weak ref type was wrong -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated RELEASENOTES to be newest to oldest -* Close #91 -* Close #85 -* Invoke webview if using local file -* Fixed zIndex issue on Windows 8, 8.1 where InAppBrowser opens behind default app. -* fix async self usage -* [CB-9150](https://issues.apache.org/jira/browse/CB-9150) Fix InAppBrowser executeScript crash on Windows if no data returned -* [CB-10008](https://issues.apache.org/jira/browse/CB-10008) Fix InAppBrowser popup layout on Windows -* InAppBrowser, iOS: Setting setStatusBarStyle to -1 causes CGContextSaveGState. -* Fix crash on browser window close (https://issues.apache.org/jira/browse/CB-9167) -* Close #113 -* add JIRA issue tracker link -* [CB-9799](https://issues.apache.org/jira/browse/CB-9799) Fixed javaDoc errors.. This closes #119 -* Actually fixing the contribute link. -* Fixing contribute link. -* [CB-9760](https://issues.apache.org/jira/browse/CB-9760) InAppBrowser: fallback to default window.open behavior on Ripple -* Close #114 -* [CB-9378](https://issues.apache.org/jira/browse/CB-9378) Fix InAppBrowser not taking whole screen on Windows -* remove travis-ci -* [CB-9158](https://issues.apache.org/jira/browse/CB-9158) - InAppBrowser zoomControls are always set to true -* [CB-9192](https://issues.apache.org/jira/browse/CB-9192) Incremented plugin version. -* [CB-9202](https://issues.apache.org/jira/browse/CB-9202) updated repo url to github mirror in package.json -* [CB-9192](https://issues.apache.org/jira/browse/CB-9192) Updated version and RELEASENOTES.md for release 1.0.1 -* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* fix npm md issue -* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Incremented plugin version. -* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Updated version in package.json for release 1.0.0 -* Revert "CB-8858 Incremented plugin version." -* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Incremented plugin version. -* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Updated version and RELEASENOTES.md for release 1.0.0 -* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump -* [CB-7689](https://issues.apache.org/jira/browse/CB-7689) Adds insertCSS support for windows platform -* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - (prefix) InAppBrowser should take into account the status bar -* [CB-8635](https://issues.apache.org/jira/browse/CB-8635) Improves UX on windows platform -* [CB-8661](https://issues.apache.org/jira/browse/CB-8661) Return executed script result on Windows -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and browser specific references of old id to new id -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id -* Use TRAVIS_BUILD_DIR, install paramedic by npm -* [CB-8432](https://issues.apache.org/jira/browse/CB-8432) Correct styles for browser wrapper to display it correctly on some pages -* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) -* [CB-7961](https://issues.apache.org/jira/browse/CB-7961) Add cordova-plugin-inappbrowser support for browser platform -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme -* Update docs for Android zoom=no option -* Added option to disable/enable zoom controls -* updated docs, set hardwareback default to true -* Add a hardwareback option to allow for the hardware back button to go back. -* [CB-8570](https://issues.apache.org/jira/browse/CB-8570) Integrate TravisCI -* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file -* Keep external android pages in a single tab. (close #61) -* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Add a clobber for `cordova.InAppBrowser.open` (close #80) -* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` -* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Incremented plugin version. -* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Updated version and RELEASENOTES.md for release 0.6.0 -* Add missing license header for src/ubuntu/InAppBrowser_escapeScript.js -* [CB-8270](https://issues.apache.org/jira/browse/CB-8270) Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` -* ubuntu: implement inject* functions -* ubuntu: port to oxide -* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) Update to work with whilelist plugins in Cordova 4.x -* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) Update to work with whilelist plugins in Cordova 4.x -* [CB-8110](https://issues.apache.org/jira/browse/CB-8110) Incremented plugin version. -* [CB-8110](https://issues.apache.org/jira/browse/CB-8110) Updated version and RELEASENOTES.md for release 0.5.4 -* Amazon specific changes: Removed reference to closebuttoncaption according to https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-inappbrowser.git;a=commit;h=50a78baf22843b0df96ccb4ca83a45bd9ef3fc39 -* [CB-7784](https://issues.apache.org/jira/browse/CB-7784) Exit event is not fired after InAppBrowser closing -* [CB-7697](https://issues.apache.org/jira/browse/CB-7697) Add locationBar support to InAppBrowser windows platform version -* [CB-7690](https://issues.apache.org/jira/browse/CB-7690) InAppBrowser loadstart/loadstop events issues -* [CB-7695](https://issues.apache.org/jira/browse/CB-7695) Fix InAppBrowser injectScriptFile for Windows 8.1 / Windows Phone 8.1 -* [CB-7692](https://issues.apache.org/jira/browse/CB-7692) InAppBrowser local url opening bug in 8.1 -* [CB-7688](https://issues.apache.org/jira/browse/CB-7688) Alert is not supported in InAppBrowser on Windows platform -* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention deviceready in plugin docs -* Dropping trailing whitespace -* [CB-7876](https://issues.apache.org/jira/browse/CB-7876) change test target to avoid undesired redirects -* [CB-7712](https://issues.apache.org/jira/browse/CB-7712) remove references to closebuttoncaption -* [CB-7850](https://issues.apache.org/jira/browse/CB-7850) clarify role of whitelist -* [CB-7720](https://issues.apache.org/jira/browse/CB-7720) check if event is null since OK string from success callback was removed -* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* Incremented plugin version. -* Updated version and RELEASENOTES.md for release 0.5.3 -* Amazon Specific changes: Added logs and corrected indentation according to 81161ebe668a14f87e1ef4b57f2d300a609b9a8b -* Windows implementation fixes and improvements -* zIndex fixed -* renamed InAppBrowser back to inappbrowser for case sensitive operating systems -* Clean plugin.xml -* Update french translation -* Update doc to add Windows 8 -* Update windows proxy to be both compatible with windows 8 and 8.1 -* Rename windows81 by windows8 in src directory -* Append Windows 8.1 platform configuration in plugin.xml -* Append Windows 8.1 proxy using x-ms-webview -* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin -* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Incremented plugin version. -* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Updated version and RELEASENOTES.md for release 0.5.2 -* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* [CB-7490](https://issues.apache.org/jira/browse/CB-7490) Fixes InAppBrowser manual tests crash on windows platform -* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* [CB-7424](https://issues.apache.org/jira/browse/CB-7424) - Wrong docs: anchor tags are not supported by the InAppBrowser -* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) clarify that anchor1 doesn't exist -* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) more fixup of tests on Android -* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) fix up the tests for Android -* Add just a bit more logging -* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) port inappbrowser to plugin-test-framework -* phonegap events supported for _blank target -* inappbrowser _blank target position is fixed -* amazon-fireos related changes. -* [CB-7244](https://issues.apache.org/jira/browse/CB-7244) Incremented plugin version. -* [CB-7244](https://issues.apache.org/jira/browse/CB-7244) Updated version and RELEASENOTES.md for release 0.5.1 -* ubuntu: support qt 5.2 -* CB-7249cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* update InAppBrowserProxy.js -* app needs to be privileged -* CB-6127lisa7cordova-plugin-consolecordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* [CB-6769](https://issues.apache.org/jira/browse/CB-6769) ios: Fix statusbar color reset wasn't working on iOS7+ -* [CB-6877](https://issues.apache.org/jira/browse/CB-6877) Incremented plugin version. -* [CB-6877](https://issues.apache.org/jira/browse/CB-6877) Updated version and RELEASENOTES.md for release 0.5.0 -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and rench Translations added. Github close #23 -* Clean up whitespace (mainly due to no newline at eof warning) -* after code review -* default parameter added -* doc updated -* console.log removed -* back/forward buttons added, iframe has no border -* not forcing the look of the inAppBrowserWrap and buttons -* Adding permission info -* [CB-6806](https://issues.apache.org/jira/browse/CB-6806) Add license -* documentation translation: cordova-plugin-inappbrowser -* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser -* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser -* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md -* Add necessary capability so the plugin works on its own -* [CB-6474](https://issues.apache.org/jira/browse/CB-6474) InAppBrowser. Add data urls support to WP8 -* [CB-6482](https://issues.apache.org/jira/browse/CB-6482) InAppBrowser calls incorrect callback on WP8 -* Fixed use of iOS 6 deprecated methods -* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) - improvement: feature detection instead of iOS version detection -* [CB-5649](https://issues.apache.org/jira/browse/CB-5649) - InAppBrowser overrides App's orientation -* [CB-6452](https://issues.apache.org/jira/browse/CB-6452) Incremented plugin version on dev branch. -* [CB-6452](https://issues.apache.org/jira/browse/CB-6452) Updated version and RELEASENOTES.md for release 0.4.0 -* [CB-6460](https://issues.apache.org/jira/browse/CB-6460) Update license headers -* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) Fix for crash on iOS < 6.0 (closes #37) -* [CB-3324](https://issues.apache.org/jira/browse/CB-3324) Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed -* await async calls, resolve warnings -* Make InAppBrowser work with embedded files, using system behavior -* [CB-6402](https://issues.apache.org/jira/browse/CB-6402) [WP8] pass empty string instead of null for [optional] windowFeatures string -* [CB-6422](https://issues.apache.org/jira/browse/CB-6422) [windows8] use cordova/exec/proxy -* [CB-3617](https://issues.apache.org/jira/browse/CB-3617) Document clearcache and clearsessioncache for ios -* [CB-6389](https://issues.apache.org/jira/browse/CB-6389) [CB-3617](https://issues.apache.org/jira/browse/CB-3617) Add clearcache and clearsessioncache options to iOS (like Android) -* refactoring fixed -* [CB-6396](https://issues.apache.org/jira/browse/CB-6396) [Firefox OS] Adding basic support -* Doc update: event name and example param (closes #31) -* [CB-6253](https://issues.apache.org/jira/browse/CB-6253) Add Network Capability to WMAppManifest.xml -* [CB-6212](https://issues.apache.org/jira/browse/CB-6212) iOS: fix warnings compiled under arm64 64-bit -* [CB-6218](https://issues.apache.org/jira/browse/CB-6218) Update docs for BB10 -* Tweak RELEASENOTES.md (missed a bug fix in last release) -* Incremented plugin version on dev branch. -* [CB-6218](https://issues.apache.org/jira/browse/CB-6218) Update docs for BB10 -* Updated version and RELEASENOTES.md for release 0.3.3 -* [CB-6172](https://issues.apache.org/jira/browse/CB-6172) Fix inappbrowser install failure on case-sensitive filesystems. -* [CB-5534](https://issues.apache.org/jira/browse/CB-5534) Updating the plugin.xml with the new Dialog class -* fix for [CB-5534](https://issues.apache.org/jira/browse/CB-5534) -* Add NOTICE file -* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Incremented plugin version on dev branch. -* Add NOTICE file -* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Updated version and RELEASENOTES.md for release 0.3.2 -* Validate that callbackId is correctly formed -* [CB-6035](https://issues.apache.org/jira/browse/CB-6035) - Move js-module so it is not loaded on unsupported platforms -* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Incremented plugin version on dev branch. -* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 0.3.1 -* Removed some iOS6 Deprecations -* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser -* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser -* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 0.3.1 -* Add missing import for previous commit -* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ -* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean -* WTF? ubuntu got automerged twice -* add ubuntu platform -* Adding CC-A-2.5 Notice for Assets, modifying plugins to use resources -* Adding the buttons -* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings -* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Add missing import -* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ -* Delete stale test/ directory -* Remove _alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. -* [CB-5733](https://issues.apache.org/jira/browse/CB-5733) Fix IAB.close() not working if called before show() animation is done -* [CB-5719](https://issues.apache.org/jira/browse/CB-5719) Incremented plugin version on dev branch. -* [CB-5719](https://issues.apache.org/jira/browse/CB-5719) Updated version and RELEASENOTES.md for release 0.3.0 -* [CB-5592](https://issues.apache.org/jira/browse/CB-5592) Add a comment explaining why we set MIME only for file: -* [CB-5592](https://issues.apache.org/jira/browse/CB-5592) Android - Add MIME type to Intent when opening file:/// URLs -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Update license comment formatting of doc/index.md -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc.index.md for InAppBrowser plugin -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Delete stale snapshot of plugin docs -* [CB-5594](https://issues.apache.org/jira/browse/CB-5594) Add disallowoverscroll option. -* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Rename "toolbarbarpostion" -> "toolbarposition" -* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Fixed the positioning and autoresizing for certain rotation scenarios. -* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Add toolbarposition=top option. -* Apply [CB-5193](https://issues.apache.org/jira/browse/CB-5193) to InAppBrowser -* [CB-5593](https://issues.apache.org/jira/browse/CB-5593) iOS: Make InAppBrowser localizable -* [CB-5591](https://issues.apache.org/jira/browse/CB-5591) Change window.escape to encodeURIComponent -* [CB-5565](https://issues.apache.org/jira/browse/CB-5565) Incremented plugin version on dev branch. -* [CB-5565](https://issues.apache.org/jira/browse/CB-5565) Updated version and RELEASENOTES.md for release 0.2.5 -* Remove merge conflict tag -* [CB-4724](https://issues.apache.org/jira/browse/CB-4724) fixed UriFormatException -* add ubuntu platform -* [CB-3420](https://issues.apache.org/jira/browse/CB-3420) WP feature hidden=yes implemented -* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' -* [CB-5188](https://issues.apache.org/jira/browse/CB-5188) -* [CB-5188](https://issues.apache.org/jira/browse/CB-5188) Updated version and RELEASENOTES.md for release 0.2.4 -* [CB-5128](https://issues.apache.org/jira/browse/CB-5128) added repo + issue tag to plugin.xml for inappbrowser plugin -* [CB-4995](https://issues.apache.org/jira/browse/CB-4995) Fix crash when WebView is quickly opened then closed. -* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - iOS - InAppBrowser should take into account the status bar -* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. -* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 -* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) - Run IAB methods on the UI thread. -* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) Convert relative URLs to absolute URLs in JS -* [CB-3747](https://issues.apache.org/jira/browse/CB-3747) Fix back button having different dismiss logic from the close button. -* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Expose closeDialog() as a public function and make it safe to call multiple times. -* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Make it safe to call close() multiple times -* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 -* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. -* [CB-4926](https://issues.apache.org/jira/browse/CB-4926) Fixes inappbrowser plugin loading for windows8 -* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Updated version and RELEASENOTES.md for release 0.2.2 -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version -* [CB-4788](https://issues.apache.org/jira/browse/CB-4788) Modified the onJsPrompt to warn against Cordova calls -* [windows8] commandProxy was moved -* [CB-4788](https://issues.apache.org/jira/browse/CB-4788) Modified the onJsPrompt to warn against Cordova calls -* [windows8] commandProxy was moved -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core references -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser -* CB-4864, [CB-4865](https://issues.apache.org/jira/browse/CB-4865) Minor improvements to InAppBrowser -* Rename CHANGELOG.md -> RELEASENOTES.md -* [CB-4792](https://issues.apache.org/jira/browse/CB-4792) Added keepCallback to the show function. -* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. -* Add empty CHANGELOG.md -* [CB-4586](https://issues.apache.org/jira/browse/CB-4586) Making loadUrl run on the UI thread for close dialog to stop the WebView error -* [Windows8] add support for Windows 8 ( limited ) -* [CB-3616](https://issues.apache.org/jira/browse/CB-3616) Change option name to "clearcache" to match original proposal -* add "clearallcache" and "clearsessioncache" option to InAppbrowser -* [CB-4595](https://issues.apache.org/jira/browse/CB-4595) updated version -* [CB-4417](https://issues.apache.org/jira/browse/CB-4417) Move cordova-plugin-inappbrowser to its own Java package. -* updated Readme, namespace and name tag -* [plugin.xml] standardizing license + meta -* [license] adding apache license file -* [CB-4399](https://issues.apache.org/jira/browse/CB-4399) removed blackberry entry in plugin xml. Installation of plugin interferes with natively supported childbrowser functionality. To support additional inappbrowser features, see [CB-4467.](https://issues.apache.org/jira/browse/CB-4467.) -* updating plugin.xml with registry data -* [CB-4368](https://issues.apache.org/jira/browse/CB-4368) Explicit CoreGraphics.framework dependency should be specified for some core plugins - -### 1.5.0 (Sep 08, 2016) -* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies -* Add intent scheme to be handled by OS -* Plugin uses `Android Log class` and not `Cordova LOG class` -* Adding links to guide content and reference content at the top of the readme file Github: close #163 -* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) **Browser**: wrong height of webview with `location=yes` -* Size and position in browser platform -* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) **Windows**: wrong height of webview with `location=yes` -* [CB-11013](https://issues.apache.org/jira/browse/CB-11013) IAB enabling background play of YouTube videos? -* [CB-10467](https://issues.apache.org/jira/browse/CB-10467) Hardware back button, while `InAppBrowser` is opened, closes the app too in addition to closing `InAppBrowser` -* [CB-11178](https://issues.apache.org/jira/browse/CB-11178) allow to open other apps on **iOS 9** -* fix some calls which used api level 16 -* [CB-5402](https://issues.apache.org/jira/browse/CB-5402) added extra content from wiki page -* [CB-2063](https://issues.apache.org/jira/browse/CB-2063) (**ios**) Fixed presentation style -* [CB-11012](https://issues.apache.org/jira/browse/CB-11012) added some clarifications about `InAppBrowser` object -* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom `inappbrowser` user agent for **ios** -* Add badges for paramedic builds on Jenkins -* [CB-11381](https://issues.apache.org/jira/browse/CB-11381) android: Does not pass sonarqube scan -* Add pull request template. -* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine requirements to `package.json` -* [CB-110003](https://issues.apache.org/jira/browse/CB-110003) Adding samples to Readme. -* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md - -### 1.4.0 (Apr 15, 2016) -* [CB-7679](https://issues.apache.org/jira/browse/CB-7679) add fix for **iOS** upload. -* [CB-10944](https://issues.apache.org/jira/browse/CB-10944) `NoSuchMethodError` in `InAppBrowser` plugin -* [CB-10937](https://issues.apache.org/jira/browse/CB-10937) fix stretched icons -* [CB-10760](https://issues.apache.org/jira/browse/CB-10760) Fixing README for display on Cordova website -* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins - -### 1.3.0 (Feb 09, 2016) -* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for android -* [CB-10538](https://issues.apache.org/jira/browse/CB-10538) cordova-plugin-inappbrowser timeout issue -* [CB-10395](https://issues.apache.org/jira/browse/CB-10395) InAppBrowser's WebView not storing cookies reliable on Android -* Edit package.json license to match SPDX id -* [CB-10305](https://issues.apache.org/jira/browse/CB-10305) Gray bar appears in the wrong place on iOS -* [CB-7786](https://issues.apache.org/jira/browse/CB-7786) Support mediaPlaybackRequiresUserAction on Android -* [CB-7500](https://issues.apache.org/jira/browse/CB-7500) executeScript with callback kills/blurs inAppBrowser window on Android - -### 1.2.1 (Feb 02, 2016) -* [CB-10407](https://issues.apache.org/jira/browse/CB-10407) InAppBrowser not firing loadstart event on android -* [CB-10428](https://issues.apache.org/jira/browse/CB-10428) Fix syntax error when browserifying inAppBrowser plugin -* handle app store urls in system browser -* [CB-6702](https://issues.apache.org/jira/browse/CB-6702) InAppBrowser hangs when opening more than one instance -* [CB-10456](https://issues.apache.org/jira/browse/CB-10456) InAppBrowser is not closed if I close it programmatically on Android -* [CB-10451](https://issues.apache.org/jira/browse/CB-10451) InAppBrowser: loadstart event is not triggered on Windows -* [CB-10452](https://issues.apache.org/jira/browse/CB-10452) InAppBrowser: 'exit' event is not triggered on Windows -* [CB-10454](https://issues.apache.org/jira/browse/CB-10454) InAppBrowser: 'loaderror' event does not have code and message on Windows -* [CB-10450](https://issues.apache.org/jira/browse/CB-10450) InAppBrowser: Unable to get property 'canGoBack' of undefined on Windows -* [CB-10441](https://issues.apache.org/jira/browse/CB-10441) Add auto tests for InAppBrowser plugin - -### 1.2.0 (Jan 15, 2016) -* [CB-8180](https://issues.apache.org/jira/browse/CB-8180) Changing methods of interception in `WebViewClient` class -* [CB-10009](https://issues.apache.org/jira/browse/CB-10009) Improve `InAppBrowser` toolbar look and feel on **Windows** -* Open a new window on the **Browser** platform - -### 1.1.1 (Dec 10, 2015) - -* [CB-9445](https://issues.apache.org/jira/browse/CB-9445) Improves executeScript callbacks on iOS -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Incremented plugin version. -* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - re-fix: backwards compatible with cordova-ios < 4.0 -* [CB-8534](https://issues.apache.org/jira/browse/CB-8534) Allow plugins to respond to onReceivedHttpAuthRequest. This closes #82 -* [CB-3750](https://issues.apache.org/jira/browse/CB-3750) Fixes spinner on iOS. This closes #89 -* [CB-7696](https://issues.apache.org/jira/browse/CB-7696) Document target=_self behavior for Windows -* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - Compile Error in InAppBrowser Plugin for iOS - No known instance method for selector 'URLIsWhitelisted:' - -### 1.1.0 (Nov 18, 2015) -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest -* Invoke webview if using local file -* Fixed `zIndex` issue on **Windows 8**, **8.188 where InAppBrowser opens behind default app. -* fix `async` self usage -* [CB-9150](https://issues.apache.org/jira/browse/CB-9150) Fix InAppBrowser `executeScript` crash on **Windows** if no data returned -* [CB-10008](https://issues.apache.org/jira/browse/CB-10008) Fix InAppBrowser popup layout on **Windows** -* Setting `setStatusBarStyle` to `-1` causes `CGContextSaveGState`. -* [CB-9167](https://issues.apache.org/jira/browse/CB-9167) Fix crash on **browser** window close -* [CB-9799](https://issues.apache.org/jira/browse/CB-9799) Fixed `javaDoc` errors. -* Fixing contribute link. -* [CB-9760](https://issues.apache.org/jira/browse/CB-9760) InAppBrowser: fallback to default `window.open` behavior on **Ripple** -* [CB-9378](https://issues.apache.org/jira/browse/CB-9378) Fix InAppBrowser not taking whole screen on **Windows** -* [CB-9158](https://issues.apache.org/jira/browse/CB-9158) - InAppBrowser `zoomControls` are always set to true - -### 1.0.1 (Jun 17, 2015) -* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* fix npm md issue - -### 1.0.0 (Apr 15, 2015) -* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump -* [CB-7689](https://issues.apache.org/jira/browse/CB-7689) Adds insertCSS support for windows platform -* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - (prefix) InAppBrowser should take into account the status bar -* [CB-8635](https://issues.apache.org/jira/browse/CB-8635) Improves UX on windows platform -* [CB-8661](https://issues.apache.org/jira/browse/CB-8661) Return executed script result on Windows -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and browser specific references of old id to new id -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id -* Use TRAVIS_BUILD_DIR, install paramedic by npm -* [CB-8432](https://issues.apache.org/jira/browse/CB-8432) Correct styles for browser wrapper to display it correctly on some pages -* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) -* [CB-7961](https://issues.apache.org/jira/browse/CB-7961) Add cordova-plugin-inappbrowser support for browser platform -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme -* Update docs for Android zoom=no option -* Added option to disable/enable zoom controls -* updated docs, set hardwareback default to true -* Add a hardwareback option to allow for the hardware back button to go back. -* [CB-8570](https://issues.apache.org/jira/browse/CB-8570) Integrate TravisCI -* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file -* Keep external android pages in a single tab. (close #61) -* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Add a clobber for `cordova.InAppBrowser.open` (close #80) -* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` - -### 0.6.0 (Feb 04, 2015) -* [CB-8270](https://issues.apache.org/jira/browse/CB-8270) ios: Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` -* ubuntu: implement `inject*` functions -* ubuntu: port to oxide -* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) ios, android: Update to work with whilelist plugins in Cordova 4.x - -### 0.5.4 (Dec 02, 2014) -* [CB-7784](https://issues.apache.org/jira/browse/CB-7784) Exit event is not fired after `InAppBrowser` closing -* [CB-7697](https://issues.apache.org/jira/browse/CB-7697) Add `locationBar` support to `InAppBrowser` **Windows** platform version -* [CB-7690](https://issues.apache.org/jira/browse/CB-7690) `InAppBrowser` `loadstart/loadstop` events issues -* [CB-7695](https://issues.apache.org/jira/browse/CB-7695) Fix `InAppBrowser` `injectScriptFile` for **Windows 8.1** / **Windows Phone 8.1** -* [CB-7692](https://issues.apache.org/jira/browse/CB-7692) `InAppBrowser` local url opening bug in 8.1 -* [CB-7688](https://issues.apache.org/jira/browse/CB-7688) `Alert` is not supported in `InAppBrowser` on **Windows** platform -* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs -* [CB-7876](https://issues.apache.org/jira/browse/CB-7876) change test target to avoid undesired redirects -* [CB-7712](https://issues.apache.org/jira/browse/CB-7712) remove references to `closebuttoncaption` -* [CB-7850](https://issues.apache.org/jira/browse/CB-7850) clarify role of whitelist -* [CB-7720](https://issues.apache.org/jira/browse/CB-7720) check if event is null since OK string from success callback was removed -* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser - -### 0.5.3 (Oct 03, 2014) -* Windows implementation fixes and improvements -* zIndex fixed -* renamed InAppBrowser back to inappbrowser for case sensitive operating systems -* Update french translation -* Update doc to add Windows 8 -* Update windows proxy to be both compatible with windows 8 and 8.1 -* Rename windows81 by windows8 in src directory -* Append Windows 8.1 platform configuration in plugin.xml -* Append Windows 8.1 proxy using x-ms-webview - -### 0.5.2 (Sep 17, 2014) -* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* [CB-7490](https://issues.apache.org/jira/browse/CB-7490) Fixes InAppBrowser manual tests crash on windows platform -* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser -* [CB-7424](https://issues.apache.org/jira/browse/CB-7424) Wrong docs: anchor tags are not supported by the InAppBrowser -* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) clarify that anchor1 doesn't exist -* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) more fixup of tests on Android -* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) fix up the tests for Android -* Add just a bit more logging -* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) port inappbrowser to plugin-test-framework -* phonegap events supported for \_blank target -* inappbrowser \_blank target position is fixed -* amazon-fireos related changes. - -### 0.5.1 (Aug 06, 2014) -* ubuntu: support qt 5.2 -* **FFOS** update InAppBrowserProxy.js -* **FFOS** app needs to be privileged -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs -* [CB-6769](https://issues.apache.org/jira/browse/CB-6769) ios: Fix statusbar color reset wasn't working on iOS7+ - -### 0.5.0 (Jun 05, 2014) -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and rench Translations added. Github close #23 -* Clean up whitespace (mainly due to no newline at eof warning) -* Adding permission info -* [CB-6806](https://issues.apache.org/jira/browse/CB-6806) Add license -* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md -* Add necessary capability so the plugin works on its own -* [CB-6474](https://issues.apache.org/jira/browse/CB-6474) InAppBrowser. Add data urls support to WP8 -* [CB-6482](https://issues.apache.org/jira/browse/CB-6482) InAppBrowser calls incorrect callback on WP8 -* Fixed use of iOS 6 deprecated methods -* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) - improvement: feature detection instead of iOS version detection -* [CB-5649](https://issues.apache.org/jira/browse/CB-5649) - InAppBrowser overrides App's orientation -* refactoring fixed -* [CB-6396](https://issues.apache.org/jira/browse/CB-6396) [Firefox OS] Adding basic support - -### 0.4.0 (Apr 17, 2014) -* [CB-6360](https://issues.apache.org/jira/browse/CB-6360): [ios] Fix for crash on iOS < 6.0 (closes #37) -* [CB-3324](https://issues.apache.org/jira/browse/CB-3324): [WP8] Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed -* [WP] await async calls, resolve warnings -* [WP] Make InAppBrowser work with embedded files, using system behavior -* [CB-6402](https://issues.apache.org/jira/browse/CB-6402): [WP8] pass empty string instead of null for [optional] windowFeatures string -* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy -* [CB-6389](https://issues.apache.org/jira/browse/CB-6389) [CB-3617](https://issues.apache.org/jira/browse/CB-3617): Add clearcache and clearsessioncache options to iOS (like Android) -* Doc update: event name and example param (closes #31) -* [CB-6253](https://issues.apache.org/jira/browse/CB-6253): [WP] Add Network Capability to WMAppManifest.xml -* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit -* [CB-6218](https://issues.apache.org/jira/browse/CB-6218): Update docs for BB10 -* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers - -### 0.3.3 (Mar 5, 2014) -* [CB-5534](https://issues.apache.org/jira/browse/CB-5534) Fix video/audio does not stop playing when browser is closed -* [CB-6172](https://issues.apache.org/jira/browse/CB-6172) Fix broken install on case-sensitive file-systems - -### 0.3.2 (Feb 26, 2014) -* Validate that callbackId is correctly formed -* [CB-6035](https://issues.apache.org/jira/browse/CB-6035) Move js-module so it is not loaded on unsupported platforms -* Removed some iOS6 Deprecations - -### 0.3.1 (Feb 05, 2014) -* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ -* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean -* add ubuntu platform -* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings -* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ -* Remove alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. -* [CB-5733](https://issues.apache.org/jira/browse/CB-5733) Fix IAB.close() not working if called before show() animation is done - -### 0.2.5 (Dec 4, 2013) -* Remove merge conflict tag -* [CB-4724](https://issues.apache.org/jira/browse/CB-4724) fixed UriFormatException -* add ubuntu platform -* [CB-3420](https://issues.apache.org/jira/browse/CB-3420) WP feature hidden=yes implemented -* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' - -### 0.2.4 (Oct 28, 2013) -* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for inappbrowser plugin -* [CB-4995](https://issues.apache.org/jira/browse/CB-4995) Fix crash when WebView is quickly opened then closed. -* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - iOS - InAppBrowser should take into account the status bar -* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. -* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 -* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) - Run IAB methods on the UI thread. -* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) Convert relative URLs to absolute URLs in JS -* [CB-3747](https://issues.apache.org/jira/browse/CB-3747) Fix back button having different dismiss logic from the close button. -* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Expose closeDialog() as a public function and make it safe to call multiple times. -* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Make it safe to call close() multiple times - -### 0.2.3 (Oct 9, 2013) -* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. -* [CB-4926](https://issues.apache.org/jira/browse/CB-4926) Fixes inappbrowser plugin loading for windows8 - -### 0.2.2 (Sept 25, 2013) -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version -* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls -* [windows8] commandProxy was moved -* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls -* [windows8] commandProxy was moved -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core references -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser -* [CB-4864](https://issues.apache.org/jira/browse/CB-4864), [CB-4865](https://issues.apache.org/jira/browse/CB-4865): Minor improvements to InAppBrowser -* Rename CHANGELOG.md -> RELEASENOTES.md -* [CB-4792](https://issues.apache.org/jira/browse/CB-4792) Added keepCallback to the show function. -* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. diff --git a/package.json b/package.json index d31094f..3be2ac9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "2.0.1-dev", + "version": "2.0.1", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 22b9b34..644d215 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.1"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index b7c1d11..1e7676f 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.1"> Cordova InAppBrowser Plugin Tests Apache 2.0 From b9e0a808376d4be675cf7feb0bfa428e199b8729 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Wed, 27 Dec 2017 19:13:50 -0500 Subject: [PATCH 18/23] Set VERSION to 2.0.2-dev (via coho) --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3be2ac9..b43fb22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "2.0.1", + "version": "2.0.2-dev", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 644d215..e370904 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.2-dev"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 1e7676f..367e3d3 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.2-dev"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 260542d13ca6d1b51896bf905873f5b0b2921666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Thu, 28 Dec 2017 20:38:45 +0100 Subject: [PATCH 19/23] Fix release notes --- RELEASENOTES.md | 655 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 655 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 30ccda0..30057af 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,3 +1,658 @@ + +# Release Notes + ### 2.0.1 (Dec 27, 2017) * [CB-13699](https://issues.apache.org/jira/browse/CB-13699) Fix to allow 2.0.0 version install +### 2.0.0 (Dec 15, 2017) +* [CB-13662](https://issues.apache.org/jira/browse/CB-13662) remove deprecated platforms + +### 1.7.2 (Nov 06, 2017) +* [CB-13473](https://issues.apache.org/jira/browse/CB-13473) (CI) Removed **Browser** builds from AppVeyor +* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again +* [CB-13347](https://issues.apache.org/jira/browse/CB-13347) Enable thirdparty cookies on `>=Android 5.0` device +* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) added `eslint` and removed `jshint` +* [CB-12975](https://issues.apache.org/jira/browse/CB-12975) (docs) Resort and reword `cordova.InAppBrowser.open` `options` lists +* [CB-12586](https://issues.apache.org/jira/browse/CB-12586) (iOS) fix method `hide` doesn't work +* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. + +### 1.7.1 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badges to `README` +* [CB-12266](https://issues.apache.org/jira/browse/CB-12266) (browser platform) loadstop event.url is now a string instead of an object, aligning it with the other platforms. +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder +* [CB-11248](https://issues.apache.org/jira/browse/CB-11248) `InAppBrowser` no focus on input text fields + +### 1.7.0 (Feb 28, 2017) +* [CB-12366](https://issues.apache.org/jira/browse/CB-12366) **iOS:** Reduce `tmpWindow` level to prevent overlapping statusbar +* [CB-12364](https://issues.apache.org/jira/browse/CB-12364) **Windows:** `Inappbrowser` inject file manual tests are not working +* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml` +* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` +* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** +* [CB-9148](https://issues.apache.org/jira/browse/CB-9148) **Android:** Add Support for `input[type=file]` File Chooser +* [CB-11136](https://issues.apache.org/jira/browse/CB-11136) (ios) Fix `InAppBrowser` when closing with `WKWebView` +* [CB-10799](https://issues.apache.org/jira/browse/CB-10799) **iOS:** fix toolbar is shown in incorrect position when in-call status bar + +### 1.6.1 (Dec 14, 2016) +* [CB-12237](https://issues.apache.org/jira/browse/CB-12237) - Update version in package.json to correct 1.6.1-dev +* [CB-12236](https://issues.apache.org/jira/browse/CB-12236) - Fixed RELEASENOTES for cordova-plugin-inappbrowser +* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed Windows 8.1 build badges +* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Incremented plugin version. + +### 1.6.0 (Dec 07, 2016) +* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.6.0 +* [CB-7608](https://issues.apache.org/jira/browse/CB-7608) (android) document useWidthViewPort +* add option useWidthViewPort +* [CB-12184](https://issues.apache.org/jira/browse/CB-12184) executeScript leads to a null pointer on exception on Android. +* fix(close button): Set correct content description +* [CB-9274](https://issues.apache.org/jira/browse/CB-9274) Adds missing methods to InAppBrowser to allow compilation for Amazon FireOS. +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes +* Increment plugin minor version because of new hide feature +* removed duplicate hide method in ios source and add jasmine test cases +* [CB-8467](https://issues.apache.org/jira/browse/CB-8467) +* [CB-12010](https://issues.apache.org/jira/browse/CB-12010) (android) Catch FileUriExposedException +* [CB-11955](https://issues.apache.org/jira/browse/CB-11955) Added Initial OSX platform support +* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been signed and submitted to secretary@apache.org." +* [CB-11694](https://issues.apache.org/jira/browse/CB-11694) Android: Set hadwareBackButton value according option in cordova.InAppBrowser.open +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. + +### 1.5.1 (Dec 07, 2016) +* [CB-7608](https://issues.apache.org/jira/browse/CB-7608) (android) document useWidthViewPort +* add option useWidthViewPort +* [CB-12184](https://issues.apache.org/jira/browse/CB-12184) executeScript leads to a null pointer on exception on Android. +* fix(close button): Set correct content description +* [CB-9274](https://issues.apache.org/jira/browse/CB-9274) Adds missing methods to InAppBrowser to allow compilation for Amazon FireOS. +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes +* Increment plugin minor version because of new hide feature +* removed duplicate hide method in ios source and add jasmine test cases +* [CB-8467](https://issues.apache.org/jira/browse/CB-8467) +* [CB-12010](https://issues.apache.org/jira/browse/CB-12010) (android) Catch FileUriExposedException +* [CB-11955](https://issues.apache.org/jira/browse/CB-11955) Added Initial OSX platform support +* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been signed and submitted to secretary@apache.org." +* [CB-11694](https://issues.apache.org/jira/browse/CB-11694) Android: Set hadwareBackButton value according option in cordova.InAppBrowser.open +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Updated version and RELEASENOTES.md for release 1.5.0 +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* Closing invalid pull request: close #28 +* Closing invalid pull request: close #78 +* Add intent scheme to be handled by OS +* Plugin uses Android Log class and not Cordova LOG class +* Adding links to guide content and reference content at the top of the readme file Github: close #163 +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Browser Platform: wrong height of webview with location=yes +* Size and position in browser platform +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes +* [CB-11013](https://issues.apache.org/jira/browse/CB-11013) IAB enabling background play of YouTube videos? +* [CB-10467](https://issues.apache.org/jira/browse/CB-10467) Hardware back button, while InAppBrowser is opened, closes the app too in addition to closing InAppBrowser +* [CB-11178](https://issues.apache.org/jira/browse/CB-11178) allow to open other apps on iOS 9 +* Closing stale pull request: close #152 +* fix some calls which used api level 16 +* [CB-5402](https://issues.apache.org/jira/browse/CB-5402) added extra content from wiki page +* doc: do not use `with` in JS samples +* Closing stale pull request: close #90 +* [CB-2063](https://issues.apache.org/jira/browse/CB-2063) (ios) Fixed presentation style +* [CB-11012](https://issues.apache.org/jira/browse/CB-11012) added some clarifications about InAppBrowser object +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for ios +* Add badges for paramedic builds on Jenkins +* [CB-11381](https://issues.apache.org/jira/browse/CB-11381) android: Does not pass sonarqube scan +* Add pull request template. +* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine requirements to package.json +* [CB-110003](https://issues.apache.org/jira/browse/CB-110003) Adding samples to Readme. +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md +* [CB-11091](https://issues.apache.org/jira/browse/CB-11091) Incremented plugin version. +* Updated version and RELEASENOTES.md for release 1.4.0 +* [CB-7679](https://issues.apache.org/jira/browse/CB-7679) add fix for iOS upload. This closes #139 +* [CB-10944](https://issues.apache.org/jira/browse/CB-10944) : NoSuchMethodError in InAppBrowser plugin +* [CB-10937](https://issues.apache.org/jira/browse/CB-10937) fix stretched icons +* [CB-10760](https://issues.apache.org/jira/browse/CB-10760) Fixing README for display on Cordova website +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add JSHint for plugins +* Fixes [CB-10607](https://issues.apache.org/jira/browse/CB-10607) +* [CB-10557](https://issues.apache.org/jira/browse/CB-10557) Incremented plugin version. +* [CB-10557](https://issues.apache.org/jira/browse/CB-10557) Updated version and RELEASENOTES.md for release 1.3.0 +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for android +* [CB-10538](https://issues.apache.org/jira/browse/CB-10538) cordova-plugin-inappbrowser timeout issue +* [CB-10395](https://issues.apache.org/jira/browse/CB-10395) InAppBrowser's WebView not storing cookies reliable on Android +* chore: edit package.json license to match SPDX id +* [CB-10305](https://issues.apache.org/jira/browse/CB-10305) Gray bar appears in the wrong place on iOS +* [CB-7786](https://issues.apache.org/jira/browse/CB-7786) Support mediaPlaybackRequiresUserAction on Android +* [CB-7500](https://issues.apache.org/jira/browse/CB-7500) executeScript with callback kills/blurs inAppBrowser window on Android +* [CB-10505](https://issues.apache.org/jira/browse/CB-10505) Incremented plugin version. +* [CB-10505](https://issues.apache.org/jira/browse/CB-10505) Updated version and RELEASENOTES.md for release 1.2.1 +* handle app store urls in system browser +* Added missing plugin dependency for manual tests +* [CB-10451](https://issues.apache.org/jira/browse/CB-10451) InAppBrowser: loadstart event is not triggered on Windows [CB-10452](https://issues.apache.org/jira/browse/CB-10452) InAppBrowser: 'exit' event is not triggered on Windows [CB-10454](https://issues.apache.org/jira/browse/CB-10454) InAppBrowser: 'loaderror' event does not have code and message on Windows [CB-10450](https://issues.apache.org/jira/browse/CB-10450) InAppBrowser: Unable to get property 'canGoBack' of undefined on Windows +* [CB-6702](https://issues.apache.org/jira/browse/CB-6702) InAppBrowser hangs when opening more than one instance +* [CB-10456](https://issues.apache.org/jira/browse/CB-10456) InAppBrowser is not closed if I close it programmatically on Android +* [CB-10441](https://issues.apache.org/jira/browse/CB-10441) Add auto tests for InAppBrowser plugin +* [CB-10428](https://issues.apache.org/jira/browse/CB-10428) Fix syntax error when browserifying inAppBrowser plugin +* [CB-10407](https://issues.apache.org/jira/browse/CB-10407) Re-adding onPageStarted to re-add LOAD_START, even though it's in the wrong place +* [CB-10368](https://issues.apache.org/jira/browse/CB-10368) Incremented plugin version. +* [CB-10368](https://issues.apache.org/jira/browse/CB-10368) Updated version and RELEASENOTES.md for release 1.2.0 +* [CB-8180](https://issues.apache.org/jira/browse/CB-8180) Changing methods of interception in WebViewClient class +* Fix lint warnings +* [CB-10009](https://issues.apache.org/jira/browse/CB-10009) Improve InAppBrowser toolbar look and feel on Windows +* Using modulemapper +* Open a new window on the browser platform +* [CB-10187](https://issues.apache.org/jira/browse/CB-10187) Incremented plugin version. +* [CB-10187](https://issues.apache.org/jira/browse/CB-10187) Updated version and RELEASENOTES.md for release 1.1.1 +* [CB-9445](https://issues.apache.org/jira/browse/CB-9445) Improves executeScript callbacks on iOS +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Incremented plugin version. +* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - re-fix: backwards compatible with cordova-ios < 4.0 +* [CB-8534](https://issues.apache.org/jira/browse/CB-8534) Allow plugins to respond to onReceivedHttpAuthRequest. This closes #82 +* [CB-3750](https://issues.apache.org/jira/browse/CB-3750) Fixes spinner on iOS. This closes #89 +* [CB-7696](https://issues.apache.org/jira/browse/CB-7696) Document target=_self behavior for Windows +* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - Compile Error in InAppBrowser Plugin for iOS - No known instance method for selector 'URLIsWhitelisted:' +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) linked issues in RELEASENOTES.md +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated version and RELEASENOTES.md for release 1.1.0 +* removed r prefix from tags +* weak ref type was wrong +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated RELEASENOTES to be newest to oldest +* Close #91 +* Close #85 +* Invoke webview if using local file +* Fixed zIndex issue on Windows 8, 8.1 where InAppBrowser opens behind default app. +* fix async self usage +* [CB-9150](https://issues.apache.org/jira/browse/CB-9150) Fix InAppBrowser executeScript crash on Windows if no data returned +* [CB-10008](https://issues.apache.org/jira/browse/CB-10008) Fix InAppBrowser popup layout on Windows +* InAppBrowser, iOS: Setting setStatusBarStyle to -1 causes CGContextSaveGState. +* Fix crash on browser window close (https://issues.apache.org/jira/browse/CB-9167) +* Close #113 +* add JIRA issue tracker link +* [CB-9799](https://issues.apache.org/jira/browse/CB-9799) Fixed javaDoc errors.. This closes #119 +* Actually fixing the contribute link. +* Fixing contribute link. +* [CB-9760](https://issues.apache.org/jira/browse/CB-9760) InAppBrowser: fallback to default window.open behavior on Ripple +* Close #114 +* [CB-9378](https://issues.apache.org/jira/browse/CB-9378) Fix InAppBrowser not taking whole screen on Windows +* remove travis-ci +* [CB-9158](https://issues.apache.org/jira/browse/CB-9158) - InAppBrowser zoomControls are always set to true +* [CB-9192](https://issues.apache.org/jira/browse/CB-9192) Incremented plugin version. +* [CB-9202](https://issues.apache.org/jira/browse/CB-9202) updated repo url to github mirror in package.json +* [CB-9192](https://issues.apache.org/jira/browse/CB-9192) Updated version and RELEASENOTES.md for release 1.0.1 +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* fix npm md issue +* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Incremented plugin version. +* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Updated version in package.json for release 1.0.0 +* Revert "CB-8858 Incremented plugin version." +* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Incremented plugin version. +* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Updated version and RELEASENOTES.md for release 1.0.0 +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-7689](https://issues.apache.org/jira/browse/CB-7689) Adds insertCSS support for windows platform +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - (prefix) InAppBrowser should take into account the status bar +* [CB-8635](https://issues.apache.org/jira/browse/CB-8635) Improves UX on windows platform +* [CB-8661](https://issues.apache.org/jira/browse/CB-8661) Return executed script result on Windows +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and browser specific references of old id to new id +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8432](https://issues.apache.org/jira/browse/CB-8432) Correct styles for browser wrapper to display it correctly on some pages +* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) +* [CB-7961](https://issues.apache.org/jira/browse/CB-7961) Add cordova-plugin-inappbrowser support for browser platform +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* Update docs for Android zoom=no option +* Added option to disable/enable zoom controls +* updated docs, set hardwareback default to true +* Add a hardwareback option to allow for the hardware back button to go back. +* [CB-8570](https://issues.apache.org/jira/browse/CB-8570) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file +* Keep external android pages in a single tab. (close #61) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Add a clobber for `cordova.InAppBrowser.open` (close #80) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` +* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Incremented plugin version. +* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Updated version and RELEASENOTES.md for release 0.6.0 +* Add missing license header for src/ubuntu/InAppBrowser_escapeScript.js +* [CB-8270](https://issues.apache.org/jira/browse/CB-8270) Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` +* ubuntu: implement inject* functions +* ubuntu: port to oxide +* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) Update to work with whilelist plugins in Cordova 4.x +* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) Update to work with whilelist plugins in Cordova 4.x +* [CB-8110](https://issues.apache.org/jira/browse/CB-8110) Incremented plugin version. +* [CB-8110](https://issues.apache.org/jira/browse/CB-8110) Updated version and RELEASENOTES.md for release 0.5.4 +* Amazon specific changes: Removed reference to closebuttoncaption according to https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-inappbrowser.git;a=commit;h=50a78baf22843b0df96ccb4ca83a45bd9ef3fc39 +* [CB-7784](https://issues.apache.org/jira/browse/CB-7784) Exit event is not fired after InAppBrowser closing +* [CB-7697](https://issues.apache.org/jira/browse/CB-7697) Add locationBar support to InAppBrowser windows platform version +* [CB-7690](https://issues.apache.org/jira/browse/CB-7690) InAppBrowser loadstart/loadstop events issues +* [CB-7695](https://issues.apache.org/jira/browse/CB-7695) Fix InAppBrowser injectScriptFile for Windows 8.1 / Windows Phone 8.1 +* [CB-7692](https://issues.apache.org/jira/browse/CB-7692) InAppBrowser local url opening bug in 8.1 +* [CB-7688](https://issues.apache.org/jira/browse/CB-7688) Alert is not supported in InAppBrowser on Windows platform +* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention deviceready in plugin docs +* Dropping trailing whitespace +* [CB-7876](https://issues.apache.org/jira/browse/CB-7876) change test target to avoid undesired redirects +* [CB-7712](https://issues.apache.org/jira/browse/CB-7712) remove references to closebuttoncaption +* [CB-7850](https://issues.apache.org/jira/browse/CB-7850) clarify role of whitelist +* [CB-7720](https://issues.apache.org/jira/browse/CB-7720) check if event is null since OK string from success callback was removed +* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* Incremented plugin version. +* Updated version and RELEASENOTES.md for release 0.5.3 +* Amazon Specific changes: Added logs and corrected indentation according to 81161ebe668a14f87e1ef4b57f2d300a609b9a8b +* Windows implementation fixes and improvements +* zIndex fixed +* renamed InAppBrowser back to inappbrowser for case sensitive operating systems +* Clean plugin.xml +* Update french translation +* Update doc to add Windows 8 +* Update windows proxy to be both compatible with windows 8 and 8.1 +* Rename windows81 by windows8 in src directory +* Append Windows 8.1 platform configuration in plugin.xml +* Append Windows 8.1 proxy using x-ms-webview +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Incremented plugin version. +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Updated version and RELEASENOTES.md for release 0.5.2 +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7490](https://issues.apache.org/jira/browse/CB-7490) Fixes InAppBrowser manual tests crash on windows platform +* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7424](https://issues.apache.org/jira/browse/CB-7424) - Wrong docs: anchor tags are not supported by the InAppBrowser +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) clarify that anchor1 doesn't exist +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) more fixup of tests on Android +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) fix up the tests for Android +* Add just a bit more logging +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) port inappbrowser to plugin-test-framework +* phonegap events supported for _blank target +* inappbrowser _blank target position is fixed +* amazon-fireos related changes. +* [CB-7244](https://issues.apache.org/jira/browse/CB-7244) Incremented plugin version. +* [CB-7244](https://issues.apache.org/jira/browse/CB-7244) Updated version and RELEASENOTES.md for release 0.5.1 +* ubuntu: support qt 5.2 +* CB-7249cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* update InAppBrowserProxy.js +* app needs to be privileged +* CB-6127lisa7cordova-plugin-consolecordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-6769](https://issues.apache.org/jira/browse/CB-6769) ios: Fix statusbar color reset wasn't working on iOS7+ +* [CB-6877](https://issues.apache.org/jira/browse/CB-6877) Incremented plugin version. +* [CB-6877](https://issues.apache.org/jira/browse/CB-6877) Updated version and RELEASENOTES.md for release 0.5.0 +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and rench Translations added. Github close #23 +* Clean up whitespace (mainly due to no newline at eof warning) +* after code review +* default parameter added +* doc updated +* console.log removed +* back/forward buttons added, iframe has no border +* not forcing the look of the inAppBrowserWrap and buttons +* Adding permission info +* [CB-6806](https://issues.apache.org/jira/browse/CB-6806) Add license +* documentation translation: cordova-plugin-inappbrowser +* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser +* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* Add necessary capability so the plugin works on its own +* [CB-6474](https://issues.apache.org/jira/browse/CB-6474) InAppBrowser. Add data urls support to WP8 +* [CB-6482](https://issues.apache.org/jira/browse/CB-6482) InAppBrowser calls incorrect callback on WP8 +* Fixed use of iOS 6 deprecated methods +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) - improvement: feature detection instead of iOS version detection +* [CB-5649](https://issues.apache.org/jira/browse/CB-5649) - InAppBrowser overrides App's orientation +* [CB-6452](https://issues.apache.org/jira/browse/CB-6452) Incremented plugin version on dev branch. +* [CB-6452](https://issues.apache.org/jira/browse/CB-6452) Updated version and RELEASENOTES.md for release 0.4.0 +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460) Update license headers +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) Fix for crash on iOS < 6.0 (closes #37) +* [CB-3324](https://issues.apache.org/jira/browse/CB-3324) Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed +* await async calls, resolve warnings +* Make InAppBrowser work with embedded files, using system behavior +* [CB-6402](https://issues.apache.org/jira/browse/CB-6402) [WP8] pass empty string instead of null for [optional] windowFeatures string +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422) [windows8] use cordova/exec/proxy +* [CB-3617](https://issues.apache.org/jira/browse/CB-3617) Document clearcache and clearsessioncache for ios +* [CB-6389](https://issues.apache.org/jira/browse/CB-6389) [CB-3617](https://issues.apache.org/jira/browse/CB-3617) Add clearcache and clearsessioncache options to iOS (like Android) +* refactoring fixed +* [CB-6396](https://issues.apache.org/jira/browse/CB-6396) [Firefox OS] Adding basic support +* Doc update: event name and example param (closes #31) +* [CB-6253](https://issues.apache.org/jira/browse/CB-6253) Add Network Capability to WMAppManifest.xml +* [CB-6212](https://issues.apache.org/jira/browse/CB-6212) iOS: fix warnings compiled under arm64 64-bit +* [CB-6218](https://issues.apache.org/jira/browse/CB-6218) Update docs for BB10 +* Tweak RELEASENOTES.md (missed a bug fix in last release) +* Incremented plugin version on dev branch. +* [CB-6218](https://issues.apache.org/jira/browse/CB-6218) Update docs for BB10 +* Updated version and RELEASENOTES.md for release 0.3.3 +* [CB-6172](https://issues.apache.org/jira/browse/CB-6172) Fix inappbrowser install failure on case-sensitive filesystems. +* [CB-5534](https://issues.apache.org/jira/browse/CB-5534) Updating the plugin.xml with the new Dialog class +* fix for [CB-5534](https://issues.apache.org/jira/browse/CB-5534) +* Add NOTICE file +* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Incremented plugin version on dev branch. +* Add NOTICE file +* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Updated version and RELEASENOTES.md for release 0.3.2 +* Validate that callbackId is correctly formed +* [CB-6035](https://issues.apache.org/jira/browse/CB-6035) - Move js-module so it is not loaded on unsupported platforms +* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Incremented plugin version on dev branch. +* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 0.3.1 +* Removed some iOS6 Deprecations +* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser +* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser +* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 0.3.1 +* Add missing import for previous commit +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean +* WTF? ubuntu got automerged twice +* add ubuntu platform +* Adding CC-A-2.5 Notice for Assets, modifying plugins to use resources +* Adding the buttons +* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Add missing import +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Delete stale test/ directory +* Remove _alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. +* [CB-5733](https://issues.apache.org/jira/browse/CB-5733) Fix IAB.close() not working if called before show() animation is done +* [CB-5719](https://issues.apache.org/jira/browse/CB-5719) Incremented plugin version on dev branch. +* [CB-5719](https://issues.apache.org/jira/browse/CB-5719) Updated version and RELEASENOTES.md for release 0.3.0 +* [CB-5592](https://issues.apache.org/jira/browse/CB-5592) Add a comment explaining why we set MIME only for file: +* [CB-5592](https://issues.apache.org/jira/browse/CB-5592) Android - Add MIME type to Intent when opening file:/// URLs +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Update license comment formatting of doc/index.md +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc.index.md for InAppBrowser plugin +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Delete stale snapshot of plugin docs +* [CB-5594](https://issues.apache.org/jira/browse/CB-5594) Add disallowoverscroll option. +* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Rename "toolbarbarpostion" -> "toolbarposition" +* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Fixed the positioning and autoresizing for certain rotation scenarios. +* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Add toolbarposition=top option. +* Apply [CB-5193](https://issues.apache.org/jira/browse/CB-5193) to InAppBrowser +* [CB-5593](https://issues.apache.org/jira/browse/CB-5593) iOS: Make InAppBrowser localizable +* [CB-5591](https://issues.apache.org/jira/browse/CB-5591) Change window.escape to encodeURIComponent +* [CB-5565](https://issues.apache.org/jira/browse/CB-5565) Incremented plugin version on dev branch. +* [CB-5565](https://issues.apache.org/jira/browse/CB-5565) Updated version and RELEASENOTES.md for release 0.2.5 +* Remove merge conflict tag +* [CB-4724](https://issues.apache.org/jira/browse/CB-4724) fixed UriFormatException +* add ubuntu platform +* [CB-3420](https://issues.apache.org/jira/browse/CB-3420) WP feature hidden=yes implemented +* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' +* [CB-5188](https://issues.apache.org/jira/browse/CB-5188) +* [CB-5188](https://issues.apache.org/jira/browse/CB-5188) Updated version and RELEASENOTES.md for release 0.2.4 +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128) added repo + issue tag to plugin.xml for inappbrowser plugin +* [CB-4995](https://issues.apache.org/jira/browse/CB-4995) Fix crash when WebView is quickly opened then closed. +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - iOS - InAppBrowser should take into account the status bar +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) - Run IAB methods on the UI thread. +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) Convert relative URLs to absolute URLs in JS +* [CB-3747](https://issues.apache.org/jira/browse/CB-3747) Fix back button having different dismiss logic from the close button. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Expose closeDialog() as a public function and make it safe to call multiple times. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Make it safe to call close() multiple times +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. +* [CB-4926](https://issues.apache.org/jira/browse/CB-4926) Fixes inappbrowser plugin loading for windows8 +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Updated version and RELEASENOTES.md for release 0.2.2 +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788) Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788) Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core references +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser +* CB-4864, [CB-4865](https://issues.apache.org/jira/browse/CB-4865) Minor improvements to InAppBrowser +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4792](https://issues.apache.org/jira/browse/CB-4792) Added keepCallback to the show function. +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. +* Add empty CHANGELOG.md +* [CB-4586](https://issues.apache.org/jira/browse/CB-4586) Making loadUrl run on the UI thread for close dialog to stop the WebView error +* [Windows8] add support for Windows 8 ( limited ) +* [CB-3616](https://issues.apache.org/jira/browse/CB-3616) Change option name to "clearcache" to match original proposal +* add "clearallcache" and "clearsessioncache" option to InAppbrowser +* [CB-4595](https://issues.apache.org/jira/browse/CB-4595) updated version +* [CB-4417](https://issues.apache.org/jira/browse/CB-4417) Move cordova-plugin-inappbrowser to its own Java package. +* updated Readme, namespace and name tag +* [plugin.xml] standardizing license + meta +* [license] adding apache license file +* [CB-4399](https://issues.apache.org/jira/browse/CB-4399) removed blackberry entry in plugin xml. Installation of plugin interferes with natively supported childbrowser functionality. To support additional inappbrowser features, see [CB-4467.](https://issues.apache.org/jira/browse/CB-4467.) +* updating plugin.xml with registry data +* [CB-4368](https://issues.apache.org/jira/browse/CB-4368) Explicit CoreGraphics.framework dependency should be specified for some core plugins + +### 1.5.0 (Sep 08, 2016) +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* Add intent scheme to be handled by OS +* Plugin uses `Android Log class` and not `Cordova LOG class` +* Adding links to guide content and reference content at the top of the readme file Github: close #163 +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) **Browser**: wrong height of webview with `location=yes` +* Size and position in browser platform +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) **Windows**: wrong height of webview with `location=yes` +* [CB-11013](https://issues.apache.org/jira/browse/CB-11013) IAB enabling background play of YouTube videos? +* [CB-10467](https://issues.apache.org/jira/browse/CB-10467) Hardware back button, while `InAppBrowser` is opened, closes the app too in addition to closing `InAppBrowser` +* [CB-11178](https://issues.apache.org/jira/browse/CB-11178) allow to open other apps on **iOS 9** +* fix some calls which used api level 16 +* [CB-5402](https://issues.apache.org/jira/browse/CB-5402) added extra content from wiki page +* [CB-2063](https://issues.apache.org/jira/browse/CB-2063) (**ios**) Fixed presentation style +* [CB-11012](https://issues.apache.org/jira/browse/CB-11012) added some clarifications about `InAppBrowser` object +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom `inappbrowser` user agent for **ios** +* Add badges for paramedic builds on Jenkins +* [CB-11381](https://issues.apache.org/jira/browse/CB-11381) android: Does not pass sonarqube scan +* Add pull request template. +* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine requirements to `package.json` +* [CB-110003](https://issues.apache.org/jira/browse/CB-110003) Adding samples to Readme. +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md + +### 1.4.0 (Apr 15, 2016) +* [CB-7679](https://issues.apache.org/jira/browse/CB-7679) add fix for **iOS** upload. +* [CB-10944](https://issues.apache.org/jira/browse/CB-10944) `NoSuchMethodError` in `InAppBrowser` plugin +* [CB-10937](https://issues.apache.org/jira/browse/CB-10937) fix stretched icons +* [CB-10760](https://issues.apache.org/jira/browse/CB-10760) Fixing README for display on Cordova website +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins + +### 1.3.0 (Feb 09, 2016) +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for android +* [CB-10538](https://issues.apache.org/jira/browse/CB-10538) cordova-plugin-inappbrowser timeout issue +* [CB-10395](https://issues.apache.org/jira/browse/CB-10395) InAppBrowser's WebView not storing cookies reliable on Android +* Edit package.json license to match SPDX id +* [CB-10305](https://issues.apache.org/jira/browse/CB-10305) Gray bar appears in the wrong place on iOS +* [CB-7786](https://issues.apache.org/jira/browse/CB-7786) Support mediaPlaybackRequiresUserAction on Android +* [CB-7500](https://issues.apache.org/jira/browse/CB-7500) executeScript with callback kills/blurs inAppBrowser window on Android + +### 1.2.1 (Feb 02, 2016) +* [CB-10407](https://issues.apache.org/jira/browse/CB-10407) InAppBrowser not firing loadstart event on android +* [CB-10428](https://issues.apache.org/jira/browse/CB-10428) Fix syntax error when browserifying inAppBrowser plugin +* handle app store urls in system browser +* [CB-6702](https://issues.apache.org/jira/browse/CB-6702) InAppBrowser hangs when opening more than one instance +* [CB-10456](https://issues.apache.org/jira/browse/CB-10456) InAppBrowser is not closed if I close it programmatically on Android +* [CB-10451](https://issues.apache.org/jira/browse/CB-10451) InAppBrowser: loadstart event is not triggered on Windows +* [CB-10452](https://issues.apache.org/jira/browse/CB-10452) InAppBrowser: 'exit' event is not triggered on Windows +* [CB-10454](https://issues.apache.org/jira/browse/CB-10454) InAppBrowser: 'loaderror' event does not have code and message on Windows +* [CB-10450](https://issues.apache.org/jira/browse/CB-10450) InAppBrowser: Unable to get property 'canGoBack' of undefined on Windows +* [CB-10441](https://issues.apache.org/jira/browse/CB-10441) Add auto tests for InAppBrowser plugin + +### 1.2.0 (Jan 15, 2016) +* [CB-8180](https://issues.apache.org/jira/browse/CB-8180) Changing methods of interception in `WebViewClient` class +* [CB-10009](https://issues.apache.org/jira/browse/CB-10009) Improve `InAppBrowser` toolbar look and feel on **Windows** +* Open a new window on the **Browser** platform + +### 1.1.1 (Dec 10, 2015) + +* [CB-9445](https://issues.apache.org/jira/browse/CB-9445) Improves executeScript callbacks on iOS +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Incremented plugin version. +* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - re-fix: backwards compatible with cordova-ios < 4.0 +* [CB-8534](https://issues.apache.org/jira/browse/CB-8534) Allow plugins to respond to onReceivedHttpAuthRequest. This closes #82 +* [CB-3750](https://issues.apache.org/jira/browse/CB-3750) Fixes spinner on iOS. This closes #89 +* [CB-7696](https://issues.apache.org/jira/browse/CB-7696) Document target=_self behavior for Windows +* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - Compile Error in InAppBrowser Plugin for iOS - No known instance method for selector 'URLIsWhitelisted:' + +### 1.1.0 (Nov 18, 2015) +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest +* Invoke webview if using local file +* Fixed `zIndex` issue on **Windows 8**, **8.188 where InAppBrowser opens behind default app. +* fix `async` self usage +* [CB-9150](https://issues.apache.org/jira/browse/CB-9150) Fix InAppBrowser `executeScript` crash on **Windows** if no data returned +* [CB-10008](https://issues.apache.org/jira/browse/CB-10008) Fix InAppBrowser popup layout on **Windows** +* Setting `setStatusBarStyle` to `-1` causes `CGContextSaveGState`. +* [CB-9167](https://issues.apache.org/jira/browse/CB-9167) Fix crash on **browser** window close +* [CB-9799](https://issues.apache.org/jira/browse/CB-9799) Fixed `javaDoc` errors. +* Fixing contribute link. +* [CB-9760](https://issues.apache.org/jira/browse/CB-9760) InAppBrowser: fallback to default `window.open` behavior on **Ripple** +* [CB-9378](https://issues.apache.org/jira/browse/CB-9378) Fix InAppBrowser not taking whole screen on **Windows** +* [CB-9158](https://issues.apache.org/jira/browse/CB-9158) - InAppBrowser `zoomControls` are always set to true + +### 1.0.1 (Jun 17, 2015) +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* fix npm md issue + +### 1.0.0 (Apr 15, 2015) +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-7689](https://issues.apache.org/jira/browse/CB-7689) Adds insertCSS support for windows platform +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - (prefix) InAppBrowser should take into account the status bar +* [CB-8635](https://issues.apache.org/jira/browse/CB-8635) Improves UX on windows platform +* [CB-8661](https://issues.apache.org/jira/browse/CB-8661) Return executed script result on Windows +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and browser specific references of old id to new id +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8432](https://issues.apache.org/jira/browse/CB-8432) Correct styles for browser wrapper to display it correctly on some pages +* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) +* [CB-7961](https://issues.apache.org/jira/browse/CB-7961) Add cordova-plugin-inappbrowser support for browser platform +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* Update docs for Android zoom=no option +* Added option to disable/enable zoom controls +* updated docs, set hardwareback default to true +* Add a hardwareback option to allow for the hardware back button to go back. +* [CB-8570](https://issues.apache.org/jira/browse/CB-8570) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file +* Keep external android pages in a single tab. (close #61) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Add a clobber for `cordova.InAppBrowser.open` (close #80) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` + +### 0.6.0 (Feb 04, 2015) +* [CB-8270](https://issues.apache.org/jira/browse/CB-8270) ios: Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` +* ubuntu: implement `inject*` functions +* ubuntu: port to oxide +* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) ios, android: Update to work with whilelist plugins in Cordova 4.x + +### 0.5.4 (Dec 02, 2014) +* [CB-7784](https://issues.apache.org/jira/browse/CB-7784) Exit event is not fired after `InAppBrowser` closing +* [CB-7697](https://issues.apache.org/jira/browse/CB-7697) Add `locationBar` support to `InAppBrowser` **Windows** platform version +* [CB-7690](https://issues.apache.org/jira/browse/CB-7690) `InAppBrowser` `loadstart/loadstop` events issues +* [CB-7695](https://issues.apache.org/jira/browse/CB-7695) Fix `InAppBrowser` `injectScriptFile` for **Windows 8.1** / **Windows Phone 8.1** +* [CB-7692](https://issues.apache.org/jira/browse/CB-7692) `InAppBrowser` local url opening bug in 8.1 +* [CB-7688](https://issues.apache.org/jira/browse/CB-7688) `Alert` is not supported in `InAppBrowser` on **Windows** platform +* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs +* [CB-7876](https://issues.apache.org/jira/browse/CB-7876) change test target to avoid undesired redirects +* [CB-7712](https://issues.apache.org/jira/browse/CB-7712) remove references to `closebuttoncaption` +* [CB-7850](https://issues.apache.org/jira/browse/CB-7850) clarify role of whitelist +* [CB-7720](https://issues.apache.org/jira/browse/CB-7720) check if event is null since OK string from success callback was removed +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser + +### 0.5.3 (Oct 03, 2014) +* Windows implementation fixes and improvements +* zIndex fixed +* renamed InAppBrowser back to inappbrowser for case sensitive operating systems +* Update french translation +* Update doc to add Windows 8 +* Update windows proxy to be both compatible with windows 8 and 8.1 +* Rename windows81 by windows8 in src directory +* Append Windows 8.1 platform configuration in plugin.xml +* Append Windows 8.1 proxy using x-ms-webview + +### 0.5.2 (Sep 17, 2014) +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7490](https://issues.apache.org/jira/browse/CB-7490) Fixes InAppBrowser manual tests crash on windows platform +* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7424](https://issues.apache.org/jira/browse/CB-7424) Wrong docs: anchor tags are not supported by the InAppBrowser +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) clarify that anchor1 doesn't exist +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) more fixup of tests on Android +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) fix up the tests for Android +* Add just a bit more logging +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) port inappbrowser to plugin-test-framework +* phonegap events supported for \_blank target +* inappbrowser \_blank target position is fixed +* amazon-fireos related changes. + +### 0.5.1 (Aug 06, 2014) +* ubuntu: support qt 5.2 +* **FFOS** update InAppBrowserProxy.js +* **FFOS** app needs to be privileged +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs +* [CB-6769](https://issues.apache.org/jira/browse/CB-6769) ios: Fix statusbar color reset wasn't working on iOS7+ + +### 0.5.0 (Jun 05, 2014) +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and rench Translations added. Github close #23 +* Clean up whitespace (mainly due to no newline at eof warning) +* Adding permission info +* [CB-6806](https://issues.apache.org/jira/browse/CB-6806) Add license +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* Add necessary capability so the plugin works on its own +* [CB-6474](https://issues.apache.org/jira/browse/CB-6474) InAppBrowser. Add data urls support to WP8 +* [CB-6482](https://issues.apache.org/jira/browse/CB-6482) InAppBrowser calls incorrect callback on WP8 +* Fixed use of iOS 6 deprecated methods +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) - improvement: feature detection instead of iOS version detection +* [CB-5649](https://issues.apache.org/jira/browse/CB-5649) - InAppBrowser overrides App's orientation +* refactoring fixed +* [CB-6396](https://issues.apache.org/jira/browse/CB-6396) [Firefox OS] Adding basic support + +### 0.4.0 (Apr 17, 2014) +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360): [ios] Fix for crash on iOS < 6.0 (closes #37) +* [CB-3324](https://issues.apache.org/jira/browse/CB-3324): [WP8] Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed +* [WP] await async calls, resolve warnings +* [WP] Make InAppBrowser work with embedded files, using system behavior +* [CB-6402](https://issues.apache.org/jira/browse/CB-6402): [WP8] pass empty string instead of null for [optional] windowFeatures string +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy +* [CB-6389](https://issues.apache.org/jira/browse/CB-6389) [CB-3617](https://issues.apache.org/jira/browse/CB-3617): Add clearcache and clearsessioncache options to iOS (like Android) +* Doc update: event name and example param (closes #31) +* [CB-6253](https://issues.apache.org/jira/browse/CB-6253): [WP] Add Network Capability to WMAppManifest.xml +* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit +* [CB-6218](https://issues.apache.org/jira/browse/CB-6218): Update docs for BB10 +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers + +### 0.3.3 (Mar 5, 2014) +* [CB-5534](https://issues.apache.org/jira/browse/CB-5534) Fix video/audio does not stop playing when browser is closed +* [CB-6172](https://issues.apache.org/jira/browse/CB-6172) Fix broken install on case-sensitive file-systems + +### 0.3.2 (Feb 26, 2014) +* Validate that callbackId is correctly formed +* [CB-6035](https://issues.apache.org/jira/browse/CB-6035) Move js-module so it is not loaded on unsupported platforms +* Removed some iOS6 Deprecations + +### 0.3.1 (Feb 05, 2014) +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean +* add ubuntu platform +* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Remove alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. +* [CB-5733](https://issues.apache.org/jira/browse/CB-5733) Fix IAB.close() not working if called before show() animation is done + +### 0.2.5 (Dec 4, 2013) +* Remove merge conflict tag +* [CB-4724](https://issues.apache.org/jira/browse/CB-4724) fixed UriFormatException +* add ubuntu platform +* [CB-3420](https://issues.apache.org/jira/browse/CB-3420) WP feature hidden=yes implemented +* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' + +### 0.2.4 (Oct 28, 2013) +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for inappbrowser plugin +* [CB-4995](https://issues.apache.org/jira/browse/CB-4995) Fix crash when WebView is quickly opened then closed. +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - iOS - InAppBrowser should take into account the status bar +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) - Run IAB methods on the UI thread. +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) Convert relative URLs to absolute URLs in JS +* [CB-3747](https://issues.apache.org/jira/browse/CB-3747) Fix back button having different dismiss logic from the close button. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Expose closeDialog() as a public function and make it safe to call multiple times. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Make it safe to call close() multiple times + +### 0.2.3 (Oct 9, 2013) +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. +* [CB-4926](https://issues.apache.org/jira/browse/CB-4926) Fixes inappbrowser plugin loading for windows8 + +### 0.2.2 (Sept 25, 2013) +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core references +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser +* [CB-4864](https://issues.apache.org/jira/browse/CB-4864), [CB-4865](https://issues.apache.org/jira/browse/CB-4865): Minor improvements to InAppBrowser +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4792](https://issues.apache.org/jira/browse/CB-4792) Added keepCallback to the show function. +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. From 8f66f075ddb2f1ba400b19d50017bb5f3379eb47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Tue, 9 Jan 2018 20:28:45 +0100 Subject: [PATCH 20/23] CB-13746: Add build-tools-26.0.2 to travis --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index c6280ed..6098fe3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ matrix: - tools - platform-tools - tools + - build-tools-26.0.2 - env: PLATFORM=android-5.1 os: linux language: android @@ -52,6 +53,7 @@ matrix: - tools - platform-tools - tools + - build-tools-26.0.2 - env: PLATFORM=android-6.0 os: linux language: android @@ -61,6 +63,7 @@ matrix: - tools - platform-tools - tools + - build-tools-26.0.2 - env: PLATFORM=android-7.0 os: linux language: android @@ -70,6 +73,7 @@ matrix: - tools - platform-tools - tools + - build-tools-26.0.2 before_install: - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm From b73ba93884dcaa88429aae6e4ea6d117effae7d2 Mon Sep 17 00:00:00 2001 From: Dave Alden Date: Wed, 17 Jan 2018 20:13:19 +0000 Subject: [PATCH 21/23] CB-13791: Add Android support for a footer close button --- README.md | 6 +- src/android/InAppBrowser.java | 174 ++++++++++++++++++++-------------- 2 files changed, 109 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index 7a2ec96..936f1dc 100644 --- a/README.md +++ b/README.md @@ -112,9 +112,13 @@ instance, or the system browser. - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. - __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened - __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened - - __closebuttoncaption__: set to a string to use as the close buttons caption instead of a X. Note that you need to localize this value yourself. + - __closebuttoncaption__: set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself. - __closebuttoncolor__: set to a valid hex color string, for example: `#00ff00`, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to `yes`. + - __footer__: set to `yes` to show a close button in the footer similar to the iOS __Done__ button. + The close button will appear the same as for the header hence use __closebuttoncaption__ and __closebuttoncolor__ to set its properties. + - __footercolor__: set to a valid hex color string, for example `#00ff00` or `#CC00ff00` (`#aarrggbb`) , and it will change the footer color from default. + Only has effect if user has __footer__ set to `yes`. - __hardwareback__: set to `yes` to use the hardware back button to navigate backwards through the `InAppBrowser`'s history. If there is no previous page, the `InAppBrowser` will close. The default value is `yes`, so you must set it to `no` if you want the back button to simply close the InAppBrowser. - __hidenavigationbuttons__: set to `yes` to hide the navigation buttons on the location toolbar, only has effect if user has location set to `yes`. The default value is `no`. - __hideurlbar__: set to `yes` to hide the url bar on the location toolbar, only has effect if user has location set to `yes`. The default value is `no`. diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 8f937fb..2b0dbe0 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -103,8 +103,10 @@ public class InAppBrowser extends CordovaPlugin { private static final String HIDE_NAVIGATION = "hidenavigationbuttons"; private static final String NAVIGATION_COLOR = "navigationbuttoncolor"; private static final String HIDE_URL = "hideurlbar"; + private static final String FOOTER = "footer"; + private static final String FOOTER_COLOR = "footercolor"; - private static final List customizableOptions = Arrays.asList(CLOSE_BUTTON_CAPTION, TOOLBAR_COLOR, NAVIGATION_COLOR, CLOSE_BUTTON_COLOR); + private static final List customizableOptions = Arrays.asList(CLOSE_BUTTON_CAPTION, TOOLBAR_COLOR, NAVIGATION_COLOR, CLOSE_BUTTON_COLOR, FOOTER_COLOR); private InAppBrowserDialog dialog; private WebView inAppWebView; @@ -129,6 +131,8 @@ public class InAppBrowser extends CordovaPlugin { private boolean hideNavigationButtons = false; private String navigationButtonColor = ""; private boolean hideUrlBar = false; + private boolean showFooter = false; + private String footerColor = ""; /** * Executes the request and returns PluginResult. @@ -397,11 +401,9 @@ public class InAppBrowser extends CordovaPlugin { option = new StringTokenizer(features.nextToken(), "="); if (option.hasMoreElements()) { String key = option.nextToken(); - String value = null; - if (customizableOptions.contains(key)) value = option.nextToken(); - else { - String token = option.nextToken(); - value = token.equals("yes") || token.equals("no") ? token : "yes"; + String value = option.nextToken(); + if (!customizableOptions.contains(key)){ + value = value.equals("yes") || value.equals("no") ? value : "yes"; } map.put(key, value); } @@ -431,7 +433,7 @@ public class InAppBrowser extends CordovaPlugin { intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName()); this.cordova.getActivity().startActivity(intent); return ""; - // not catching FileUriExposedException explicitly because buildtools<24 doesn't know about it + // not catching FileUriExposedException explicitly because buildtools<24 doesn't know about it } catch (java.lang.RuntimeException e) { LOG.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString()); return e.toString(); @@ -561,10 +563,10 @@ public class InAppBrowser extends CordovaPlugin { showLocationBar = show.equals("yes") ? true : false; } if(showLocationBar) { - String hideNavigation = features.get(HIDE_NAVIGATION); - String hideUrl = features.get(HIDE_URL); - if(hideNavigation != null) hideNavigationButtons = hideNavigation.equals("yes") ? true : false; - if(hideUrl != null) hideUrlBar = hideUrl.equals("yes") ? true : false; + String hideNavigation = features.get(HIDE_NAVIGATION); + String hideUrl = features.get(HIDE_URL); + if(hideNavigation != null) hideNavigationButtons = hideNavigation.equals("yes") ? true : false; + if(hideUrl != null) hideUrlBar = hideUrl.equals("yes") ? true : false; } String zoom = features.get(ZOOM); if (zoom != null) { @@ -599,7 +601,7 @@ public class InAppBrowser extends CordovaPlugin { } String wideViewPort = features.get(USER_WIDE_VIEW_PORT); if (wideViewPort != null ) { - useWideViewPort = wideViewPort.equals("yes") ? true : false; + useWideViewPort = wideViewPort.equals("yes") ? true : false; } String closeButtonCaptionSet = features.get(CLOSE_BUTTON_CAPTION); if (closeButtonCaptionSet != null) { @@ -607,7 +609,7 @@ public class InAppBrowser extends CordovaPlugin { } String closeButtonColorSet = features.get(CLOSE_BUTTON_COLOR); if (closeButtonColorSet != null) { - closeButtonColor = closeButtonColorSet; + closeButtonColor = closeButtonColorSet; } String toolbarColorSet = features.get(TOOLBAR_COLOR); if (toolbarColorSet != null) { @@ -617,6 +619,14 @@ public class InAppBrowser extends CordovaPlugin { if (navigationButtonColorSet != null) { navigationButtonColor = navigationButtonColorSet; } + String showFooterSet = features.get(FOOTER); + if (showFooterSet != null) { + showFooter = showFooterSet.equals("yes") ? true : false; + } + String footerColorSet = features.get(FOOTER_COLOR); + if (footerColorSet != null) { + footerColor = footerColorSet; + } } final CordovaWebView thatWebView = this.webView; @@ -630,13 +640,60 @@ public class InAppBrowser extends CordovaPlugin { */ private int dpToPixels(int dipValue) { int value = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, - (float) dipValue, - cordova.getActivity().getResources().getDisplayMetrics() + (float) dipValue, + cordova.getActivity().getResources().getDisplayMetrics() ); return value; } + private View createCloseButton(int id){ + View _close; + Resources activityRes = cordova.getActivity().getResources(); + + if (closeButtonCaption != "") { + // Use TextView for text + TextView close = new TextView(cordova.getActivity()); + close.setText(closeButtonCaption); + close.setTextSize(20); + if (closeButtonColor != "") close.setTextColor(android.graphics.Color.parseColor(closeButtonColor)); + close.setGravity(android.view.Gravity.CENTER_VERTICAL); + close.setPadding(this.dpToPixels(10), 0, this.dpToPixels(10), 0); + _close = close; + } + else { + ImageButton close = new ImageButton(cordova.getActivity()); + int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); + Drawable closeIcon = activityRes.getDrawable(closeResId); + if (closeButtonColor != "") close.setColorFilter(android.graphics.Color.parseColor(closeButtonColor)); + close.setImageDrawable(closeIcon); + close.setScaleType(ImageView.ScaleType.FIT_CENTER); + if (Build.VERSION.SDK_INT >= 16) + close.getAdjustViewBounds(); + + _close = close; + } + + RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + _close.setLayoutParams(closeLayoutParams); + + if (Build.VERSION.SDK_INT >= 16) + _close.setBackground(null); + else + _close.setBackgroundDrawable(null); + + _close.setContentDescription("Close Button"); + _close.setId(Integer.valueOf(id)); + _close.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + closeDialog(); + } + }); + + return _close; + } + @SuppressLint("NewApi") public void run() { @@ -741,67 +798,37 @@ public class InAppBrowser extends CordovaPlugin { public boolean onKey(View v, int keyCode, KeyEvent event) { // If the event is a key-down event on the "enter" button if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { - navigate(edittext.getText().toString()); - return true; + navigate(edittext.getText().toString()); + return true; } return false; } }); - // Close/Done button - if (closeButtonCaption != "") { - // Use TextView for text - TextView close = new TextView(cordova.getActivity()); - close.setText(closeButtonCaption); - close.setTextSize(20); - if (closeButtonColor != "") close.setTextColor(android.graphics.Color.parseColor(closeButtonColor)); - close.setGravity(android.view.Gravity.CENTER_VERTICAL); - RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); - closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); - close.setLayoutParams(closeLayoutParams); - close.setContentDescription("Close Button"); - close.setId(Integer.valueOf(5)); - if (Build.VERSION.SDK_INT >= 16) - close.setBackground(null); - else - close.setBackgroundDrawable(null); - back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); - close.setPadding(this.dpToPixels(10), 0, this.dpToPixels(10), 0); - close.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - closeDialog(); - } - }); - toolbar.addView(close); - } - else { - ImageButton close = new ImageButton(cordova.getActivity()); - RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); - closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); - close.setLayoutParams(closeLayoutParams); - close.setContentDescription("Close Button"); - close.setId(Integer.valueOf(5)); - int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); - Drawable closeIcon = activityRes.getDrawable(closeResId); - if (closeButtonColor != "") close.setColorFilter(android.graphics.Color.parseColor(closeButtonColor)); - if (Build.VERSION.SDK_INT >= 16) - close.setBackground(null); - else - close.setBackgroundDrawable(null); - close.setImageDrawable(closeIcon); - close.setScaleType(ImageView.ScaleType.FIT_CENTER); - back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); - if (Build.VERSION.SDK_INT >= 16) - close.getAdjustViewBounds(); + // Header Close/Done button + View close = createCloseButton(5); + toolbar.addView(close); - close.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - closeDialog(); - } - }); - toolbar.addView(close); + // Footer + RelativeLayout footer = new RelativeLayout(cordova.getActivity()); + int _footerColor; + if(footerColor != ""){ + _footerColor = Color.parseColor(footerColor); + }else{ + _footerColor = android.graphics.Color.LTGRAY; } + footer.setBackgroundColor(_footerColor); + RelativeLayout.LayoutParams footerLayout = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44)); + footerLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); + footer.setLayoutParams(footerLayout); + if (closeButtonCaption != "") footer.setPadding(this.dpToPixels(8), this.dpToPixels(8), this.dpToPixels(8), this.dpToPixels(8)); + footer.setHorizontalGravity(Gravity.LEFT); + footer.setVerticalGravity(Gravity.BOTTOM); + + View footerClose = createCloseButton(7); + footer.addView(footerClose); + // WebView inAppWebView = new WebView(cordova.getActivity()); @@ -915,7 +942,14 @@ public class InAppBrowser extends CordovaPlugin { } // Add our webview to our main view/layout - main.addView(inAppWebView); + RelativeLayout webViewLayout = new RelativeLayout(cordova.getActivity()); + webViewLayout.addView(inAppWebView); + main.addView(webViewLayout); + + // Don't add the footer unless it's been enabled + if (showFooter) { + webViewLayout.addView(footer); + } WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); lp.copyFrom(dialog.getWindow().getAttributes()); @@ -1105,7 +1139,7 @@ public class InAppBrowser extends CordovaPlugin { // Update the UI if we haven't already if (!newloc.equals(edittext.getText().toString())) { edittext.setText(newloc); - } + } try { JSONObject obj = new JSONObject(); From 7eb2e1ea0302ac601ae7abe9b6478c14ccfe6311 Mon Sep 17 00:00:00 2001 From: Suraj Pindoria Date: Wed, 24 Jan 2018 14:38:34 -0800 Subject: [PATCH 22/23] CB-13826 Updated version and RELEASENOTES.md for release 2.0.2 --- RELEASENOTES.md | 12 ++++++++++++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 30057af..4949f7c 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,18 @@ --> # Release Notes +### 2.0.2 (Jan 24, 2018) +* [CB-13791](https://issues.apache.org/jira/browse/CB-13791) Add **Android** support for a footer close button +* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) restore gitignore to default +* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) restore gitignore to default +* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) restore gitignore to default +* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) restore gitignore to default +* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) ignore idea folder +* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) change hidetoolbarnavigationbuttons to hidenavigationbuttons in iso +* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) **Android** works well now, all changes are now documented +* [CB-13409](https://issues.apache.org/jira/browse/CB-13409) Lets user adjust color of toolbar, hide navigation buttons and set custom text on close button +* [CB-13746](https://issues.apache.org/jira/browse/CB-13746) Add build-tools-26.0.2 to travis + ### 2.0.1 (Dec 27, 2017) * [CB-13699](https://issues.apache.org/jira/browse/CB-13699) Fix to allow 2.0.0 version install diff --git a/package.json b/package.json index b43fb22..42baada 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "2.0.2-dev", + "version": "2.0.2", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index e370904..ec72372 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.2"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 367e3d3..1db34ea 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.2"> Cordova InAppBrowser Plugin Tests Apache 2.0 From 3f0528c38010be98f5a0248f2468d4e35fa5b482 Mon Sep 17 00:00:00 2001 From: Suraj Pindoria Date: Thu, 25 Jan 2018 11:47:20 -0800 Subject: [PATCH 23/23] CB-13826 Incremented plugin version. --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 42baada..12c04ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "2.0.2", + "version": "2.0.3-dev", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index ec72372..10bf94e 100644 --- a/plugin.xml +++ b/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.3-dev"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 1db34ea..f5b5d20 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -20,7 +20,7 @@ + version="2.0.3-dev"> Cordova InAppBrowser Plugin Tests Apache 2.0