Code Monkey home page Code Monkey logo

cordova-plugin-themeablebrowser's People

Contributors

agrieve avatar apla avatar bwin avatar castlek avatar cfjedimaster avatar clelland avatar cmarcelk avatar hardeep avatar hermwong avatar infil00p avatar initialxy avatar jpchase avatar jsoref avatar ldeluca avatar mark-bradshaw avatar marti1125 avatar mwoghiren avatar nadyaa avatar purplecabbage avatar robinnorth avatar rocco avatar rodms10 avatar sencenan avatar sgrebnov avatar shazron avatar sidneys avatar stacic avatar stevengill avatar tomasfejfar avatar zalun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-themeablebrowser's Issues

ios documentation images

Is it possible to update the documentation on where to put the images for iOS? I found out, but I don't know if I did the right thing (put them in en.lproj).

about the "Life Circle" problem

hi @initialxy
I am using Android 4.4.2 and iOS 8.3 with your latest plugin version in npm
about the "Life Circle" problem
I don't know how to explain it
anyway,see the code first,you can directly use it

function checkThemeablebrowser() 
{
 cordova.ThemeableBrowser.open('http://yourdomain', '_blank',
 {
  statusbar: 
  {
  color: '#000'
  },
  toolbar: 
  {
  height: 44,
  color: '#f0f0f0ff',
  //image: ''
  },
  title:
  {
  color: '#003264ff',
  //staticText: 'a text',
  showPageTitle: true
  },
  closeButton: 
  {
  wwwImage: 'images/close.png',
  wwwImagePressed: 'images/close_pressed.png',
  wwwImageDensity: 2,
  align: 'left',
  event: 'closePressed'
  },
  backButton: 
  {
  wwwImage: 'images/back.png',
  wwwImagePressed: 'images/back_pressed.png',
  wwwImageDensity: 2,
  align: 'left',
  event: 'backPressed'
  },
  backButtonCanClose: false, 
  forwardButton: 
  {
  wwwImage: 'images/forward.png',
  wwwImagePressed: 'images/forward_pressed.png',
  wwwImageDensity: 2,
  align: 'left',
  event: 'forwardPressed'
  },
  customButtons: 
  [
   {
   wwwImage: 'images/share.png',
   wwwImagePressed: 'images/share_pressed.png',
   wwwImageDensity: 2,
   align: 'right',
   event: 'sharePressed'
   }
  ],
  menu: 
  {
  title: 'title',
  cancel: 'cancel',
  wwwImage: 'images/menu.png',
  wwwImagePressed: 'images/menu_pressed.png',
  wwwImageDensity: 2,
  align: 'right',
   items: 
   [
    {
    event: 'helloPressed',
    label: 'helloWorld!'
    },
    {
    event: 'testPressed',
    label: 'test!'
    }
   ]
  }
})
  .addEventListener('closePressed', function(e)
  {
  alert('closePressed!');
  navigator.notification.alert("closePressed!", null, 'title', 'ok');
  })
  .addEventListener('backPressed', function(e)
  {
  alert('backPressed!');
  navigator.notification.alert("backPressed!", null, 'title', 'ok');
  })
  .addEventListener('forwardPressed', function(e)
  {
  alert('forwardPressed!');
  navigator.notification.alert("forwardPressed!", null, 'title', 'ok');
  })
  .addEventListener('sharePressed', function(e)
  {
  alert(e.url);
  navigator.notification.alert(e.url, null, 'title', 'ok');
  })
  .addEventListener('helloPressed', function(e)
  {
  alert('helloPressed!');
  navigator.notification.alert("helloPressed!", null, 'title', 'ok');
  })
  .addEventListener(cordova.ThemeableBrowser.EVT_ERR, function(e)
  {
  alert('EVT_ERR:' + e.message);
  navigator.notification.alert(e.message, null, endMessage_title, 'title', 'ok');
  })
  .addEventListener(cordova.ThemeableBrowser.EVT_WRN, function(e)
  {
  alert('EVT_WRN:' + e.message);
  navigator.notification.alert(e.message, null, endMessage_title, 'title', 'ok');
  });
}

these are my testing Process

when the "closePressed" trigger
in iOS:the "alert" and the "navigator.notification.alert" can also trigger
in Android:never trigger One of them

when the "backPressed" trigger
in iOS:only "alert" can be trigger
in Android:never trigger One of them

when the "forwardPressed" trigger
in iOS:only "alert" can be trigger
in Android:never trigger One of them

when the "sharePressed" trigger
in iOS:only "alert" can be trigger
in Android:the "alert" and the "navigator.notification.alert" can also trigger

when I click the "menu" icon,the "menu" will show,at the moment...
in iOS:only the "alert" with "EVT_WRN" can be trigger
in Android:never trigger One of them

when the "menu" shown,for example that I click the "hello world" item
in iOS:only "alert" can be trigger
in Android:the "alert" and the "navigator.notification.alert" can also trigger

when the "menu" shown
the menu will in the screen bottom position (ipad mini)
is it normal ? (iphone not try yet)
maybe the center position is more a correct "default position" ?

I know the "navigator.notification.alert" seem phonegap's problem
but really don't know,why the pure "alert" and phonegap's "navigator.notification.alert" sometimes in A situation but sometimes in B situation ?? @_@

Custom Button dont show in themeablebrowser

Hi I want to add custom button but its now showing can you please help heres the code

function innAppInit(_url) {
  app.Log('browser news link=' + _url);
   if (_url == null) {
      _url = 'http://apache.org';
     }
   var ref = cordova.ThemeableBrowser.open(_url, '_blank', {

    backButtonCanClose: false,
    hideForwardButton: true,
    toolbarColor: '#239EC9',
    titleColor: '#FFFFFF',
    statusbarColor: '#239EC9',
    navButtonAlign: 'left',
    closeButtonAlign: 'right',

    titleStaticText: 'Add New Web Page',
    customButtons: [{
        image: 'themeablebrowser_stub_close',
        imagePressed: 'themeablebrowser_stub_close_highlight',
        align: 'right',
        event: 'customButtonPressed'
    }],
    menuButtonImage: 'themeablebrowser_stub_menu',
    menuButtonPressedImage: 'themeablebrowser_stub_menu_highlight',
    closeButtonImage: 'themeablebrowser_stub_close',
    closeButtonPressedImage: 'themeablebrowser_stub_close_highlight',
    backButtonImage: 'themeablebrowser_stub_back',
    backButtonPressedImage: 'themeablebrowser_stub_back_highlight',

});
ref.addEventListener('customButtonPressed', function(event) {
    alert(event.url);
});
ref.addEventListener('loadstart', function(event) {
    try {
        app.Log('loadstart function');
        $('.ui-loader').show();

    } catch (e) {
        app.ErrorLog(e);
    }
});
ref.addEventListener('loadstop', function(event) {
    try {
        app.Log('loadstop function');
        $('.ui-loader').hide();


        ref.executeScript({
                code: 'return document.title'
            },
            function(values) {
                alert(values);
            });

    } catch (e) {
        app.ErrorLog(e);
    }
});
ref.addEventListener('event_getURL', function(event) {
    try {

        var url = event.url;
        app.Log('get url=' + url);
        ref.close();

    } catch (e) {
        app.ErrorLog(e);
    }
});
ref.addEventListener('exit', function(event) {
    try {
        app.Log('exit function');

        $('.ui-loader').hide();

    } catch (e) {
        app.ErrorLog(e);
    }
});

}

themeablebrowser not opening in android

hi its great that you are improving themeablebrowser
I have an issue in android when i click a link themeablebrowser, its not working eclipse is giving error

04-30 14:08:27.184: D/SystemWebChromeClient(21575): file:///android_asset/www/plugins/cordova-plugin-whitelist/whitelist.js: Line 25 : No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.

second log

04-30 15:49:08.300: W/InAppChromeClient(23918): ThemeableBrowser does not support Cordova API calls: file:///android_asset/www/contactus.html gap:[0,"ThemeableBrowser","open","ThemeableBrowser1467816280"]


third log when i execute command --cordova build andriod
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\Projects\WMCApp\platforms\android\src\com\initialxy\cordova\themeablebr
owser\ThemeableBrowser.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

heres is my code 

 <a id="lnkEmail" style="border: none;box-shadow: none;text-align: left;" data-role="button" 
                href="#">
                    [email protected] 
                </a>
 $('#lnkEmail').on('click',function(){ 
      innAppInit('mailto:[email protected]');        
  });  
     app.Log('faqs/contactus link=' + _url);
     if(_target == null || _target == undefined || _target == ''){
        _target = '_blank';
     }
     if (_url == null || _url == '') {
         _url = 'https://www.website.com';
     }
     try {

         var ref = cordova.ThemeableBrowser.open(_url, _target, {
             backButtonCanClose: false,
             disableAnimation: true,
             statusbar: {
                 color: '#239EC9'
             },
             toolbar: {
                 height: 44,
                 color: '#239EC9'
             },
             title: {
                 color: '#FFFFFF',
                 showPageTitle: false,
                 staticText: 'website.com'
             },
             closeButton: {
                 image: 'close',
                 imagePressed: 'close_pressed',
                 align: 'right',
                 event: 'closePressed'
             }
         }).addEventListener(cordova.ThemeableBrowser.EVT_ERR, function(e) {
             if (e.code === cordova.ThemeableBrowser.ERR_CRITICAL) {
                 // TODO: Handle critical error.
             } else if (e.code === cordova.ThemeableBrowser.ERR_LOADFAIL) {
                 // TODO: Image failed to load.
             }
             app.Log('e.code=' + e.code);
             app.Log('e.message=' + e.message);


         }).addEventListener(cordova.ThemeableBrowser.EVT_WRN, function(e) {
             if (e.code === cordova.ThemeableBrowser.WRN_UNDEFINED) {
                 // TODO: Some property undefined in config.
             } else if (e.code === cordova.ThemeableBrowser.WRN_UNEXPECTED) {
                 // TODO: Something strange happened. But no big deal.
             }

             app.Log('e.code=' + e.code);
             app.Log('e.message=' + e.message);
         });;
     } catch (e) {
         app.ErrorLog(e);
     }

     try {
         ref.addEventListener('loadstart', function(event) {

             app.Log('loadstart function');
         });
     } catch (e) {
         app.ErrorLog(e);
     }

     try {
         ref.addEventListener('loadstop', function(event) {
             app.Log('loadstop function');
         });
     } catch (e) {
         app.ErrorLog(e);
     }

     try {
         ref.addEventListener('closePressed', function(event) {
             app.Log('closePressed function');
         });
     } catch (e) {
         app.ErrorLog(e);
     }

 }
In config.xml i have added whitelist
<plugin name="cordova-plugin-whitelist" version="1" />
    <access origin="*" />
   <allow-intent href="http://*/*" />
   <allow-intent href="https://*/*" />
  <allow-intent href="tel:*" />
  <allow-intent href="sms:*" />
  <allow-intent href="mailto:*" />
   <allow-intent href="geo:*" /> 

Please add two error check

I received memory exception of:

  1. NullPointerException (@ThemeableBrowser$ThemeableBrowserClient:onPageStarted:1176) {main}
  2. NullPointerException (@ThemeableBrowser$6$6:onPageFinished:703) {main}

Link to native browser

Is it possible to link to the native browser from within themablebrowser? I have tried target="_system" but this opens the link inside themablebrowser. URL scheming seems to work, but is not preferable and apparently not supported by Safari.

Why not making location available?

Hey @initialxy,

I debate making the location bar false by default since we could eventually want to show what's going on to the user.

In which case we would also like to style it eventually... thoughts?

some issues feedback to you

hi @initialxy
I am a PGB's user (build.phonegap.com)

I use your full code at here (really as same as yours)
https://github.com/initialxy/cordova-plugin-themeablebrowser

and...this is my screenshot (left side is android 4.4.2,the right side is ipad mini iOS 8.2)
http://www.littlebau.com/th.jpg

issue 1
no mater Android or iOS,The upper left and right corner's "button" disappear

issue 2
in android,when I click..
upper left corner,it will "back" to the app
upper right corner,it will show the "menu",and click 'Hello World!' will trigger it's behavior
but in iOS...it will no any response

How to detect the back button of android?

Because the back button always close the themeablebrowser window.
Does it possible to back previous page?
It not work when I set backButtonCanClose false.
And the last inappbrowser plugin can back to previous page.

images loading probleme(Android)

i put images in res/drawable , when i build my project i got the following error, res\drawable-hdpi-v4\import.png:0: error: invalid symbol: 'import' FAILED

iPad crash

iPad can't click share and menu button.

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<UIAlertController: 0x7febcd1c69e0>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'

How to open themeable browser within themeable browser

Hi again
i have three pages 1) index page 2) faqs page and 3) contactus page.
On index page i have a link which opens contactus page in themeable browser
Now in contactus page there is a hyperlink which suppose to open faqs page but currently its not openning.
probably the themeable browser is already open i think. So how do i open themeable browser within a link in themeable browser

ThemeableBrowser within ThemeableBrowser

I wanted to open this custom browser within the same browser like this:

var ref = cordova.ThemeableBrowser.open(host+url, '_blank', options)
.addEventListener("myButtonPressed", function(e) {
cordova.ThemeableBrowser.open("http://www.google.com", "_blank");
});

However, it does not work. Could you please help me to make it work. Or am I missing anything here?

insertCSS/executeScript option?

looks like insertCSS/executeScript option were missed?

when I used "loadstop", the alert can be executed, but the insertCSS/executeScript not working, I have the files in the "www" folder.

.addEventListener('loadstop', function() {
alert('load stop');
ref.insertCSS({file: "css/style.css"});
ref.executeScript({file: "js/test.js"});
});

plz advise!

Window.open inside themeable browser not working

I have added both InAppBrowser and themeable browser plugin in my app. On click of a link, I am opening a pdf file in themeable browser and added a custom button to the toolbar for sharing content.

On click of this share button, I am calling a javascript function. In this function alert is working properly but new window is not opening. Any suggestions ??

function shareUrl(ShareURlpath)
{
var ref = window.open('http://apache.org', '_blank', 'location=yes');
alert(ShareURlpath);
}

ref.show() not working in ios

I am trying to add spinner while loading content on browser. Its working fine on Android but on in iOS. The method 'show' not available on plugin.

pinch or double tap to zoom not working

In cordova-plugin-inappbrowser, enableViewportScale: 'yes' enables pinch or double tap to zoom on iOS (while Android has this feature enabled by default and is not affected by this option value), however I can't have double tap to zoom either on iOS or Android in cordova-plugin-themeablebrowser even with this option on.

Should I expect zooming to be available in this plugin? I can't code in iOS but try to look into the iOS code. The variable enableviewportscale is still there. Thanks.

Overriding toolbarposition=top

Here's a feature request: I get that the toolbarposition is always top to remain consistent across platforms. But could it be optional as it were in InAppBrowser?
I think it's a fine idea to have it default to "top", but is there any other reason toolbarposition is no longer optional other than keeping platform consistency?
I'd really like to be able to position it at the bottom on the iOS-build of the app. Simply because the app I'm building is going to replace an older one, made with Titanium, that has the toolbar at the bottom, so there is that consistency issue.
Thanks again for a great plugin!

NullPointerException on {ThemeableBrowser.java:670}

I've had a couple of crashes show up in my Fabric panel indicating that users are having trouble with this plugin (version 0.2.12).

The stack trace I'm getting is:

java.lang.NullPointerException
       at com.initialxy.cordova.themeablebrowser.ThemeableBrowser$6$4.onClick(ThemeableBrowser.java:670)
       at android.view.View.performClick(View.java:4633)
       at android.view.View$PerformClick.run(View.java:19274)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:146)
       at android.app.ActivityThread.main(ActivityThread.java:5593)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
       at dalvik.system.NativeStart.main(NativeStart.java)

Which as far as I can tell simply indicates that when the close button is being pressed, that inAppWebView.getUrl() is failing for some reason. I've not personally been able to replicate it, but I've had a couple of reports from 4.4.2 (API level 19).

Navigate to url by clicking on custom button

Hi there!
First, absolutely awesome work with this plugin! This plugin makes customizable web wrapping in Phonegap a breeze!
I have some features I would love to be able to implement. Maybe it is possible, but I don't know how yet.

Is there a way to have the current browser instance navigate to a custom url by clicking a custom toolbar button?
The scenario I'm thinking is that I'd like to put a "home" button in the toolbar, so that the user quickly can return to the site home page by touching it. Such a feature could also be useful for adding buttons as "hard coded" links to other url:s on your web-page in the toolbar.
At first I thought this could be accomplished with the executeScript method and then using window.location on the browser instance, but the script seems to be executed outside the scope of the browser.

Using XDK, fails to compile for Android but compiles for Crosswalk

I'm fairly new to Cordova, so forgive me if this is trivial. I was using themeablebrowser from the Cordova Plugins Registry and it seemed to work, but I couldn't figure out how to access native images (and maybe I can't, since builds occur on Intel's servers). I decided to try the new wwwImage feature, but realized the version in the Cordova Plugins is 0.2.7. So, I added your plugin straight from github. For whatever reason, builds to Crosswalk for Android work, but Android builds do not. I get these errors.

-compile:
[javac] Compiling 12 source files to .../WebToAppMB/platforms/android/ant-build/classes
[javac] .../WebToAppMB/platforms/android/src/com/initialxy/cordova/themeablebrowser/ThemeableBrowser.java:985: cannot find symbol
[javac] symbol : variable LOLLIPOP
[javac] location: class android.os.Build.VERSION_CODES
[javac] if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
[javac] ^
[javac] .../WebToAppMB/platforms/android/src/com/initialxy/cordova/themeablebrowser/ThemeableBrowser.java:988: getDrawable(int) in android.content.res.Resources cannot be applied to (int,android.content.res.Resources.Theme)
[javac] result = activityRes.getDrawable(id, cordova.getActivity().getTheme());
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: .../WebToAppMB/platforms/android/src/com/initialxy/cordova/themeablebrowser/ThemeableBrowser.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors
BUILD FAILED
/Developer/android-sdk-linux/tools/ant/build.xml:720: The following error occurred while executing this line:
/Developer/android-sdk-linux/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Support for third-party cookies in TB on Android 5.0 and later?

Hi there and thanks for this great plug-in!

Is there any way to set ThemeableBrowser web views to allow third-party cookies by default?
Since Android 5.0 (Lollipop and later) Android apps are by default not allowed to handle third-party cookies. In our use case, we need third-party cookies to allow a personal account login session that is handled by a third-party on our site.
There are some threads on the Internet discussing how to work around this and we've tried different ways to implement them in the ThemeableBrowser web view but without success.

The preferred solution is to implement this in MainAcitivity.java (located in Cordova project -> platforms -> android -> src -> [APP FOLDER]): http://tol8.blogspot.se/2014/11/fixed-apps-cordovaphonegap-targeting.html

But since ThemeableBrowser launches it's own web view this does not seem to be affected by any settings to the web view in MainActivity.java.

Some feature request and enhancement

I Congratulates you on making this remarkable themeablebrowser
I have some suggestionst.

  1. Rename themeablebrowser to tbrowser (but obviously its up to you. Its just a suggestion because name is too long)
  2. Can you add slideleft on open and sliderright on close option
  3. show loader between loadstart and loadstop to know brwoser is fetching external site or work in progress with changeable image.
  4. i i want to show tbrowser on page load but i dont want to show page instead. right now my first page shows up and then animated tbrower show up
  5. No animtion on load and animate on close and vice versa option

inappbrowser access to phonegap views?

Hi,

is it possbile access to the exist page while in the browser view?

for example:
I am opening url: google.com, after I click the search button, all I want to do is jump back to my done pages, like my search page.

cordova.ThemeableBrowser.open('http://www.google.com', '_blank');

how can I do that?

plz advise, thx.

How add button on toolbar or menu item

Hi,

I have a question, how i can add a button on toolbar or menu item.

I am using themeablebrowser to open preview .docx file. I want add a button "download", share,..
Thank you so much!

Opening links from within inappbrowser

I'm looking for a way to open the native browser from within the inappbrowser. In my app the following works fine, but when using this code inside the inappbrowser, the link simply opens inside the inappbrowser:

<a href="#" onclick="window.open(url, '_system', 'location=yes')">Open</a>

Is there a work around that works cross platform? I thought of using browser:// but apparently this doesn't exist like eg twitter://

Help?

Hardware Back Handling

HI
First of all thanks a lot for your awesome plugin.
I wanted to show a confirmation box when users try to close this Themeable browser or hit hardware back button.Help me out

Need Help with JavaScript Object

I have added a custom button that, when clicked, closes the IAB and opens the barcode scanner which in return once something is scanned will open IAB again to what was scanned. The problem is after the first scan the button no longer works. The only way I found it to work multiple times is it copy/paste the code over and over again into the .addEventListener. This is not ideally what I want. Is there anyway around the copy/past method?

0.2.4 version will let ios no any response

hi @initialxy
when I use PGB 3.7.1 and your plugin 0.2.4 version
Android will show a windows (a apache website content)
but in iOS 8.3
nothing happened (no any error message)

0.2.2 version is work well
the code just like your sample code

How to disable animation effect in themeablebrowser

Hi I am showing themeablebrowser on page load the problem is i want to show tbrowser without animation. because first page is shown and then tbrowser is animatedly visible.
so how do i disable animation effect

display CordovaWebView controls on ThemeableBrowser?

I use the Ionic framework for development with ThemeableBrowser to display external links. If a button on the browser is to trigger an Ionic control (e.g. action sheet), the control would not be visible upon button pressed until the browser is closed. Is there a way to display these CordovaWebView controls on top of the browser, or I have to resort to native controls (with cordova plugins like this)?

Image import plugin for ThemeableBrowser

@initialxy - First of all, this plugin looks fantastic.

As someone who uses Phonegap Build and also someone who is not too familiar with Cordova and custom plugins, I found your documentation on native images difficult to understand. I understand why you don't want to include the images, but I disagree with your thought that they are not needed. In my case, the default InAppBrowser looks terrible on Android, and I couldn't find a way to simply make it look better. That's where your plugin appealed to me - its a massive visual improvement on Android to the default InAppBrowser.

So in my case - I just wanted to use your plugin WITH the images, and I think there may me more like me. So I have attempted to create a custom plugin that imports your images as you described in issue #11 and would like to make it easily available to others using this if they'd like to use your default images.

Here's the repo: https://github.com/ingageco/cordova-plugin-themeablebrowserimages

Thoughts?

File upload dialog causes browser window to crash

I am using the themeablebrowser to "wrapp" a website.
On this website there is a form with a file/select input where the user can submit and upload photos from their devices.
When on the iPhone, I click on the file select button the native photo/file dialog pops up. However no matter what i select (take photo, select from camera roll or even cancel) the browser window just collapses (or crashes?). No exit event fires either so I cannot handle this error by launching a new browser window or anything.
Is this a know bug or am I doing something wrong here?
I haven't tried Android yet.

Phonegap build

Hi.

Great job!

I have an issue, I'm using phonegap build and I don't know how to upload "native images". Any idea?

Thanks.

In ionic themeablebrowser works fine with android platform, but nothing happens when put it into ios platform

Hi, I'm trying to add a custom inappbrowser into my app so I choose the themeablebrowser. It works well on android, but when I test it on ios emulator(6 and 6s) and iphone 4s, no page comes out after I click corresponding link. Ionic and cordova are both updated to the latest version. By the way, at first I tried cordova-plugin-inappbrowser, if I used window.open(link,'_blank',location) the page could show. So I think there may be something wrong in themeablebrowser's ios part. Could I get some help?

how to use images

I stumbled on your project and would like to incorporate it in mine. It's not clear to me how to implement the images (close, back, forward, etc). Do you have an example of howto using Phonegap Build?

executescript not working

Hi i want to get current page title how do i get this. my ref.executescript is not working.
heres what i have done so far

 function innAppInit(_url) {
 app.Log('browser news link=' + _url);
  if (_url == null) {
    _url = 'http://apache.org';
  }
var ref = cordova.ThemeableBrowser.open(_url, '_blank', {       

    statusbar: {
        color: '#239EC9'
    },
    toolbar: {
        height: 44,
        color: '#239EC9'
    },
    title: {
        color: '#FFFFFF',
        showPageTitle: false,
        staticText: 'Add New Web Page'
    },
    backButton: {
        image: 'back',
        imagePressed: 'back_pressed',
        align: 'left',
        event: 'backPressed'
    },
    forwardButton: {
        image: 'forward',
        imagePressed: 'forward_pressed',
        align: 'left',
        event: 'forwardPressed'
    },
    closeButton: {
        image: 'close',
        imagePressed: 'close_pressed',
        align: 'right',
        event: 'closePressed'
    },
    customButtons: [{
        image: 'share',
        imagePressed: 'share_pressed',
        align: 'right',
        event: 'event_getThumb'
    }],     
    backButtonCanClose: false
 });
}

     ref.addEventListener('loadstop', function(event) {
         try {

             ref.executeScript({
                     code: 'return document.title'
                 },
                 function(values) {
                     alert(values);
                     $('#txtDisplayName').val(values);
                 });
         } catch (e) {

         }
     });

iOS share button not working

I'm using this plugin in combination with this plugin: https://build.phonegap.com/plugins/1197. In Android the sharing popup is shown when clicking on "sharePressed" but iOS doesn't show it.

    }).addEventListener('sharePressed', function(e) {
        window.plugins.socialsharing.share('', 'Gedeeld via de app van Pannenkoekenhuizen', 'www/icon.png', e.url);
    });

Can this be themeablebrowser or SocialSharing?

Centering a Button

Hey, many thanks for this plugin.
Is it possible to center a button (for example close button) like title does? I can either align "left" or "right".

back button on ios

First of all, thank you for your plugin. That was just what I needed. Your latest addition (last night?) is also very good.

I installed the plugin on an Android and iOS device. The back button is not working on iOS, on Android it is.

The back button is showing, but greyed out. After clicking on a link within the webpage, the button will stay greyed out.

In Android, the button will be white and working on above scenario.

opening new window in themeablebrowser

When a webpage triggers window.open() inside the themeablebrowser, a new pop up window is opened. However, there are two issues here:

  1. the new window cannot be loaded properly (it should have an image, but only some text is visible)
  2. I cannot go back to the previous page

I tried to look for solution here or in cordova's InAppBrowser, but couldn't find anyone raising this issue. Does anyone have experience how this can be handled? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.