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

Web and WebWorks Development

Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers


I'm currently developing a Cascades application but have 1 feature that requires oauth & i'm using a webview to do that, i've got everything working on a computer but not sure how to implement on the device


the issue is the redirect_uri, currently set to ripples http://localhost:9910


how do i get or find a localhost equvalent for when its actually running on the device, not in chrome, i dont want to have to run a web service for this

Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: localhost

[ Edited ]

I'm assuming you just need to check the webview out


Go to any website (try one you use seldom - its annoying - I dunno, msbnc)


Now click on the Ripple icon in Chrome


At the bottom click on Start ripple services


This starts up a web server on 9910


Now - told you - complicated


I hope you're using Win7


Take your HTML directory (e.g. harry) and COPY it to C:\Users\<you>\RippleSites


Final steps


Go to http://localhost:9910/harry/index.html (replace harry with wherever you put it)


The DOS box you have open should now produce some output (this is all OK providing index.html gets read)


OK - done - Click the Ripple icon again - start Ripple




First time around is hard - then its easy as all you have to do next time is start services, go to a 9910 and switch to Ripple (nice + easy)


As is usual with BB documentation is the least reliable method to get anything working


I wish they'd employ some monkeys to write Shakespeare (old quote)


I know the dox are bad and easy to fix - I am an independant and abhor low quality (I once documented Wing Commander 4 - boring or what?)

Click the like button if you find my posts useful!
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: localhost

[ Edited ]

i've got it working with ripple in chrome, my question was since ripple is initiating the localhost.  how do i get a localhost on the actual device.  the reason for this is, oauth gives me a key & attaches it to the redirect url (oAuth requires it to be http://localhost:XXXX)


in my code i set the redirect_uri to http://localhost:9910/oAuth/authtest.html


oauth returns http://localhost:9910/oAuth/authtest.html?code=oAuthToken


basically the issue is im sure how to have my uri navigate to the html file while on the device