Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Posts: 2
Registered: ‎04-24-2013
My Device: Blackberry Z10
My Carrier: Rogers
Accepted Solution

Showing part of a website in webview/creating a clickable music feed

Hi All,

 

This is a 2 part question:

 

1. I am trying to build an app in Cascades that is similar to Uberhype(https://play.google.com/store/apps/details?id=com.dirtywaterlabs.uberhype&hl=en) a popular android music app. I have the screen layout, pages and menu created but I do not know how to create a clickable track list for the music feed. Could anyone point me in the right direction?

 

2. How does one display only part of a website in webview? I do not want to show the search field, links and advertisement on the site just the body. Any help would be appreciated.

 

Thank you for your time.

 

 

 

 

 

Retired
Posts: 54
Registered: ‎06-26-2012
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Showing part of a website in webview/creating a clickable music feed

1. Please check the rssnews sample app in github Cascades samples.
2. I will get back to you about this one. Seems to me that you could do this by customizing the webview and injecting some javascript to render only the intended portion of your web page.

Retired
Posts: 54
Registered: ‎06-26-2012
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Showing part of a website in webview/creating a clickable music feed

2.These are the inputs obtained from a collegue:

 

The Browser does something like this for "Reader Mode". We use a script that searches for a large block of text and removes the rest. The script is based off of https://code.google.com/p/arc90labs-readability/source/browse/trunk/js/readability.js

Using the script or recreating something similar is your best bet. The CS webview will allow you to execute JavaScript within the webpage and return a result.

Creating your own script to do this will not be too difficult if you:

  1. Already know javascript
  2. Know the id or some key identifier for the content you want
  3. Only need this to work on a single webpage or website (otherwise you need some sophisticated detection)
  4. Don't expect javascript to work (for fancy scrolling, animations, videos or even loading other links)
  5. Don't need the text/content to be rendered exactly as it was in the webpage, styles may be lost.
New Contributor
Posts: 2
Registered: ‎04-24-2013
My Device: Blackberry Z10
My Carrier: Rogers

Re: Showing part of a website in webview/creating a clickable music feed

This is precisely what I needed! Thanks alot kizkasen.
Retired
Posts: 54
Registered: ‎06-26-2012
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Showing part of a website in webview/creating a clickable music feed

You are welcome. For 1, you may also check this sample:

https://github.com/blackberry/Qt2Cascades-Samples/tree/master/rsslisting