Welcome to the CrackBerry Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 19 of 19
Like Tree1Likes
  • 1 Post By mikeo007
  1. Sith_Apprentice's Avatar
    Mod Team Emeritus

    Posts
    10,164 Posts
    Global Posts
    10,167 Global Posts
    PIN
    Changes way too often
    Thread AuthorThread Author   #1  

    Default Cascades Webview with reader mode?

    Anyone been able to enable the RIM reader mode from within an app, more specifically from within the webview control?
    ~S_A
    All views and opinions here are my own, and do not represent any views, opinions, or official communications either actual or implied of my employer.
  2. bbquincar's Avatar
    CrackBerry Addict

    Posts
    528 Posts
    PIN
    2846D23F
    #2  

    Default

    i heard there is a work around but i haven't seen any actual code for it yet.
    Id love to get it also for my app some of the webpages don't load as nice as they could.
    BlackBerry for Life - Proud owner of the new BlackBerry Passport
  3. Thunderbuck's Avatar

    Posts
    6,555 Posts
    Global Posts
    6,558 Global Posts
    PIN
    2B6927F7
    #3  

    Default

    What may work is to invoke the browser as a card.

    "Reader mode" is a browser feature, not part of the native HTML stack (or I'm pretty sure it isn't, anyway)
  4. Sith_Apprentice's Avatar
    Mod Team Emeritus

    Posts
    10,164 Posts
    Global Posts
    10,167 Global Posts
    PIN
    Changes way too often
    Thread AuthorThread Author   #4  

    Default Re: Cascades Webview with reader mode?

    I've seen snippets of code that remove the chrome from the window but that isn't the same with the text capabilites etc.
    Someone with Twitter, can you tweet @blackberrydev?
    ~S_A
    All views and opinions here are my own, and do not represent any views, opinions, or official communications either actual or implied of my employer.
  5. peter9477's Avatar
    CrackBerry Genius of Geniuses

    Posts
    5,216 Posts
    Global Posts
    5,218 Global Posts
    #5  

    Default

    Thunderbuck is correct, "reader" mode is not a property of the WebView, but something they implemented on top of it in the browser. You'd have to reproduce it from scratch...
    Battery Guru for BB10 tracks voltage, power, battery health. (Also on the PlayBook.) White Noise helps you sleep or concentrate.
    Follow us on Twitter or Facebook or visit Engenuity's mobile apps page.
  6. Sith_Apprentice's Avatar
    Mod Team Emeritus

    Posts
    10,164 Posts
    Global Posts
    10,167 Global Posts
    PIN
    Changes way too often
    Thread AuthorThread Author   #6  

    Default

    Quote Originally Posted by peter9477 View Post
    Thunderbuck is correct, "reader" mode is not a property of the WebView, but something they implemented on top of it in the browser. You'd have to reproduce it from scratch...
    that is well beyond my pay grade. I wonder if it is something that RIM can release, perhaps a sample. Or even integrate into the webview in a future SDK release.
    ~S_A
    All views and opinions here are my own, and do not represent any views, opinions, or official communications either actual or implied of my employer.
  7. Thunderbuck's Avatar

    Posts
    6,555 Posts
    Global Posts
    6,558 Global Posts
    PIN
    2B6927F7
    #7  

    Default

    As I say, invoke the browser as a card and it would appear to the user to be within the app. Don't know for sure that it would bring Reader Mode, but I believe all browser features come over with the card.

    I've got my own browser invocation issue I'm struggling with, but I'll try this out to confirm.
  8. Sith_Apprentice's Avatar
    Mod Team Emeritus

    Posts
    10,164 Posts
    Global Posts
    10,167 Global Posts
    PIN
    Changes way too often
    Thread AuthorThread Author   #8  

    Default

    Quote Originally Posted by Thunderbuck View Post
    As I say, invoke the browser as a card and it would appear to the user to be within the app. Don't know for sure that it would bring Reader Mode, but I believe all browser features come over with the card.

    I've got my own browser invocation issue I'm struggling with, but I'll try this out to confirm.
    I guess a bound invocation would be invisible to the user right? I have only used unbound before, and it prompts for a selection.
    ~S_A
    All views and opinions here are my own, and do not represent any views, opinions, or official communications either actual or implied of my employer.
  9. big bb's Avatar
    CrackBerry Abuser

    Posts
    394 Posts
    Global Posts
    396 Global Posts
    #9  

    Default

    Quote Originally Posted by Thunderbuck View Post
    As I say, invoke the browser as a card and it would appear to the user to be within the app. Don't know for sure that it would bring Reader Mode, but I believe all browser features come over with the card.

    I've got my own browser invocation issue I'm struggling with, but I'll try this out to confirm.
    In a webinar they said that the browser could not be invoked as a card, has that changed.
    Quote Originally Posted by G-bone View Post
    BlackBerry : We invented the Smartphone Business.
    We're takin' it Back!
  10. bbquincar's Avatar
    CrackBerry Addict

    Posts
    528 Posts
    PIN
    2846D23F
    #10  

    Default

    I don't think the invoknig a card is the way to go RIM needs to add this as a feature we can use just like refresh and forward and back in browser options.
    should be a seamless as possible.
    BlackBerry for Life - Proud owner of the new BlackBerry Passport
  11. Brian Scheirer's Avatar
    CrackBerry Abuser

    Posts
    214 Posts
    #11  

    Default

    I've never seen a way to invoke the Browser as a card.
    My BB10 Cascades Coding Site: http://BBcascades.com/ Blog: http://bbcascadescode.tumblr.com/

    My Apps: The Dive Plan | Visual Connection | Combo Pics | Beer Math | Random Stories | Logic Puzzles | camZOO

    Oh ya... And I write for some website called "CrackBerry"... check out my posts here
    Thanked by:
    Sith_Apprentice (01-10-2013) 
  12. Thunderbuck's Avatar

    Posts
    6,555 Posts
    Global Posts
    6,558 Global Posts
    PIN
    2B6927F7
    #12  

    Default

    Quote Originally Posted by Sith_Apprentice View Post
    I guess a bound invocation would be invisible to the user right? I have only used unbound before, and it prompts for a selection.
    Bound invocation is definitely seamless. However, if it can't be invoked as a card the transition is still pretty obvious.
  13. Sith_Apprentice's Avatar
    Mod Team Emeritus

    Posts
    10,164 Posts
    Global Posts
    10,167 Global Posts
    PIN
    Changes way too often
    Thread AuthorThread Author   #13  

    Default Re: Cascades Webview with reader mode?

    Quote Originally Posted by Thunderbuck View Post
    Bound invocation is definitely seamless. However, if it can't be invoked as a card the transition is still pretty obvious.
    So no way for reader mode within an app, at least at this time. I'll have to push to the browser then. Thanks all!
    ~S_A
    All views and opinions here are my own, and do not represent any views, opinions, or official communications either actual or implied of my employer.
  14. Thunderbuck's Avatar

    Posts
    6,555 Posts
    Global Posts
    6,558 Global Posts
    PIN
    2B6927F7
    #14  

    Default

    Quote Originally Posted by Sith_Apprentice View Post
    So no way for reader mode within an app, at least at this time. I'll have to push to the browser then. Thanks all!
    Sorry. I've actually got a project where this would come in handy, too. Now debating whether I want to push to a browser or add in another page with a WebView.

    EDIT: just to add to that, it looks like the reason you can't invoke the browser as a card is that the browser does not EXPOSE a card to invoke. If anyone's writing an alternate browser, this could be an interesting opportunity...
    Last edited by Thunderbuck; 01-12-2013 at 05:30 PM.
  15. mikeo007's Avatar
    CrackBerry Genius

    Posts
    4,219 Posts
    Global Posts
    4,951 Global Posts
    #15  

    Default

    Wonder what the chances are of RIM opening up some of the source for the BB10 browser? You could just lift the reader code if they were to do that. Actually, since the entire browser front end if HTML/CSS/JS anyway, maybe you could just pull the source code right out of the OS files...
    r0v3rT3N likes this.
  16. Thunderbuck's Avatar

    Posts
    6,555 Posts
    Global Posts
    6,558 Global Posts
    PIN
    2B6927F7
    #16  

    Default

    Quote Originally Posted by mikeo007 View Post
    Wonder what the chances are of RIM opening up some of the source for the BB10 browser? You could just lift the reader code if they were to do that. Actually, since the entire browser front end if HTML/CSS/JS anyway, maybe you could just pull the source code right out of the OS files...
    At its core, Reader Mode is essentially one huge regex thing to pull the text out.

    As it stands now, I'm just thrilled I finally got WebView working on a sheet so I can build my little newsreader thingie I've been working on. Refining it into Reader View might be a subsequent step.
  17. Martin Green's Avatar
    CrackBerry Abuser

    Posts
    160 Posts
    #17  

    Default

    I know this thread is pretty old but I wanted to dispel a common misconception about how a Reader Mode is implemented. Although many people just assume it is done with a RegEx, it is most certainly NOT done this way since it is impossible to do more than trivial parsing of HTML with RegEx (read the perl regex docs if you don't believe me... it can't be done because of the way elements are nested in HTML). After a lot of research I figured out how to create a Reader Mode for WebView that looks and behaves almost identically to the one in the BB10 Browser. Since this feature gives my app a competitive advantage I'm not going to divulge the algorithm here, but I will provide a hint. The page must be loaded into the WebView, and then your code must walk the DOM tree, deciding which elements to keep and which to dump.
  18. RodgerLeblanc's Avatar
    CrackBerry Abuser

    Posts
    179 Posts
    Global Posts
    215 Global Posts
    #18  

    Default

    Use this URL scheme and you're good to go :
    http://www.readability.com/m?url=http://www.whatever.com
    Check out my apps :
    http://appworld.blackberry.com/webstore/vendor/70290

    Hey devs, try UpFront and see for yourself how your app could benefit from integrating into it.
    http://appworld.blackberry.com/webst...ntent/55423610
  19. Martin Green's Avatar
    CrackBerry Abuser

    Posts
    160 Posts
    #19  

    Default

    Quote Originally Posted by RodgerLeblanc View Post
    Use this URL scheme and you're good to go :
    whatever.com ? www.whatever.com ? Readability
    ...which is fine if you don't mind branding the Reader Mode in your app with Readability's logo and style, but I wanted Reader Mode to look and work identically to the one in the BB10 browser, so I implemented it with JavaScript. If you use the Readability API you are also giving them the right to sell and divulge information about you and your browsing habits. No thanks!

    For casual use the Readability service is fine, but if you want to add Reader Mode to your app it is more professional to implement it yourself.

Similar Threads

  1. Good case with sleep mode, besides otterbox
    By Haywirem520 in forum BBOS Phone Accessories
    Replies: 15
    Last Post: 07-22-2008, 03:12 PM
  2. Help with UMA mode on the BBCurve
    By CurlyQ7978 in forum General BlackBerry Discussion
    Replies: 3
    Last Post: 04-25-2008, 07:11 PM
  3. Help with vibrating mode
    By bombshell4929 in forum BlackBerry Curve 83xx
    Replies: 3
    Last Post: 02-18-2008, 05:32 PM
  4. Problems with holstering mode on the otterbox defender.
    By thewesman in forum BBOS Phone Accessories
    Replies: 0
    Last Post: 12-11-2007, 05:03 PM
  5. Pearl HORIZONTAL case, with sleeper mode...
    By naviwilliams in forum BBOS Phone Accessories
    Replies: 6
    Last Post: 04-06-2007, 07:30 PM

Posting Permissions