We are porting the jQuery mobile app using the Webview control in Android. The jQuery mobile app has a login page. We want to allow the user to save their login information.
The trick is that the client would prefer that we do not use cookies for this.
Solution / Problem No. 1:
We thought about the possibility of creating an Android login screen that calls the authentication service and stores the token. Then the token is passed to webview via querystring in the url property. The jQuery mobile app can then grab the token from the query string and validate it, allowing you to bypass the login screen of the mobile app.
The problem with this, however, is this: what happens when the user exits the application through the jQuery mobile application? How can a mobile application inform the Android wrapper about the removal of a token?
Solution # 2, but the same problem
The same Android login screen, but instead of passing it using the query string parameter, use javascript on the Android side, going through the Webview DOM and fill in the username and password on the mobile jQuery login screen. If this token exists on the Android side when the application starts, just bypass the Android login screen and automatically fill in the user credentials.
This problem still has the same problem: the user manually logs out.
Don't we think about it right?
Ideas?
source share