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

Web and WebWorks Development

Reply
New Contributor
Posts: 8
Registered: ‎02-15-2013
My Device: BlackBerry Z10, BlackBerry PlayBook
My Carrier: Telus

Ability to save passwords with WebWorks

Hello Everyone,

 

I'm working on my very first BlackBerry app and was hoping someone would be able to answer a question about saving passwords.

 

I'm creating a very simple HTML5 app that is basically an index page that links to other URLS. Those URLs require a username and password. There isn't a login form on the destination pages, they just use basic HTTP authentication (like an .htaccess file).

 

Anyhow, I noticed in BB10 the normal browser will prompt you to save passwords after entering the username/password in but I can't seem to figure out how to get the WebWorks SDK to do the same.

 

Any points in the right direction would be appreciated.

 

Thanks

Joey

 

 

Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Ability to save passwords with WebWorks

AFAIK, the browser itself is an HTML5 app, so BlackBerry has added a password saving feature to the webview and you'll have to create your own in order to save passwords.

 

You can use localstorage or a web database to do so.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Ability to save passwords with WebWorks

interfaSys is correct. If you use HTTP authentication then the browser will prompt for a username and password, this will happen in WW as well, since the WebView exposes this ability. If your page does it in the browser, then it should in WW as well.

 

@erikjohnzon
erjohnson@blackberry.com
New Contributor
Posts: 8
Registered: ‎02-15-2013
My Device: BlackBerry Z10, BlackBerry PlayBook
My Carrier: Telus

Re: Ability to save passwords with WebWorks

Hi Erik,

 

The browser prompts to save the username/password but the Webview does not. Is there a setting I can enable that causes the webview to behave the same?

 

Thanks

Joey

Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Ability to save passwords with WebWorks

Interesting, do you have a site we could test out?

@erikjohnzon
erjohnson@blackberry.com
New Contributor
Posts: 8
Registered: ‎02-15-2013
My Device: BlackBerry Z10, BlackBerry PlayBook
My Carrier: Telus

Re: Ability to save passwords with WebWorks

Sure - http://www.pagetutor.com/keeper/mystash/secretstuff.html

 

Username: jimmy

Password: page

 

 

Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Ability to save passwords with WebWorks

Works fine for me. Are you on an old build? The simulator?

@erikjohnzon
erjohnson@blackberry.com
New Contributor
Posts: 8
Registered: ‎02-15-2013
My Device: BlackBerry Z10, BlackBerry PlayBook
My Carrier: Telus

Re: Ability to save passwords with WebWorks

[ Edited ]

I haven't been using the simulator, I've just been packaging it in Ripple and loading it onto my Z10.

 

WebWorks SDK 1.0.4.11

Ripple UI v0.9.13

Ripple Build & Deploy v0.9.5

Z10 - 10.0.9.348

 

I just downloaded the Dev Alpha C simulator (v10.1.0.338) and it behaves the same - if I visit the site in the browser, it offers to save the username/password.  If I tap on the link from within the app/webview, it does not offer to save the user/pass.

 

Here's my config.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
	xmlns:rim="http://www.blackberry.com/ns/widgets"
	version="1.0.0.9" id="dashboardtest" xml:lang="en"> 


  <name>Dashboard Test</name>

  <author>Joey O.</author>

  <description>Dashboard Test</description>

  <icon src="images/icon.jpg"/>

  <content src="index.html"/> 

  <rim:splash src="images/splashvert.jpg"/>

</widget>

 

And my index.html

 

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Dashboard Test</title>

<style type="text/css">
body
 {
	margin: 0 auto;
	width: 700px;
	height: 1200px;
 } 

</style>
</head>

<body>

<div id="body">
<a href="http://www.pagetutor.com/keeper/mystash/secretstuff.html">Test Link</a>
</div>

</body>
</html>

 

Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Ability to save passwords with WebWorks

Oh I see, you are prompted, but there is no option to save?

@erikjohnzon
erjohnson@blackberry.com
New Contributor
Posts: 8
Registered: ‎02-15-2013
My Device: BlackBerry Z10, BlackBerry PlayBook
My Carrier: Telus

Re: Ability to save passwords with WebWorks

Correct Smiley Happy