Android - WebView not saving input forms - android

I'm using a simple webView client in my android application, but, when the user log in, close the app and open app again the input forms not save the user information like webbrowser.
How i solve it?
I need when the user enter the 'username' the app save this like a webbrowser, if possible save the password too :)
Thank in advance.

Have you tried following the tutorial on the Android Developer site from Google?. I think that this is what you are looking forward to achieve....
"" Building Apps with Contacts & Sign-In ""
https://developer.android.com/training/building-userinfo.html

Related

Get List Of More From Developer To Mobile App

I want to list all my applications of my developer account.
I can get that in web with following link : https://play.google.com/store/apps/developer?id={my developer id} But as it can't be accessed in mobile application, so is there any api key or anything i can use to achieve? Any help would be great. Thanks
To achieve this create one webview and load your desired URL in that webview.
Here is the webview code. https://www.androidhive.info/2016/12/android-working-with-webview-building-a-simple-in-app-browser/

Keep User logged in on android webview (wordpress site)

i have developed a wordpress website and I used webview for the android app.
now my concern is that whenever a user log in to the app and opens the app after closing the app.I want to keep them logged in !
I was having the same issue and I solved it by enabling a cache for the App. You might be able to do so by adding this to your Webview instance in MainActivity.java:
//enable in-app cache
myWebView.getSettings().setAppCacheEnabled(true);
Hope this works for you too.
This is to be managed by wordpress side, and not in Android.
two ways either save your user login username and password to sharedprefrence and check it everytime or save your user login username and password to sqlite and check if cursor count is 1 then redirect to webview else type username and password.
cache is no good about security also if user when the close app on ios, the cache gonna be delete

Android Studio access webcam via WebView

I'm trying to access and display a webcam interface in my application.
Currently I'm trying to do that using a WebView (still no success), but open to other suggestions.
When I go to "http://192.168.43.74:81" (the ip of the camera) on my phone's browser I get a popup asking me to insert a username and a password, I do that and log the camera successfully.
This is how I try to do that using a WebView:
WebView camera = (WebView) findViewById(R.id.camera);
camera.getSettings().setJavaScriptEnabled(true);
camera.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
camera.loadUrl(CAMERA_URL);
camera.setWebViewClient(new WebViewClient());
When I set CAMERA_URL to google's url for example, I'm able to access google and browse the internet normally, using the webview. When I set CAMERA_URL to the webcam's IP, I get a blank page on my webview, and the following message:
Access Error: Unauthorized
Access to this document requires a User ID
This is the same message I get when I try to log in via my browser, but hit cancel instead of trying to log in. I assume I'm doing something wrong, and would appreciate some help:
How do I make it work?
Is there a better way to go about it than a WebView?
and finally, though a somewhat different question, is there a way to automatically make the login instead of having the user type the username/password every time?
I apologize if this question is trivial, or has been asked before. I was unable to find a solution by searching. Thank you!

Android code for login in to soundcloud

i looking to get an android code for login in to soundcloud.com.I get an application from "https://github.com/soundcloud/android-intent-sharing". it is not ask to login when the user try to share sound with out login..? ,
can you suggest me any helping tutorial.
you are probably looking for this, Android is using Java.

Phonegap ChildBrowser Issue

I am creating a mobile app which connects to some jive based community using childbrowser.
I can easily open the community, login and do stuff.
But I also need to fetch session details in my app, so that I could use these to fetch JSON strings to show user image/info on my app showing that user is logged in.
I tried working on childbrowser, but couldn't investigate much.
It seems it won't work with my community URL. While using google url it shows popups on location changes, but not for my url.
Can any one help me in fetching the data I want ?
Here is the sample code I am using to detect location change:
function openURL() {
window.plugins.childBrowser.onLocationChange= function(loc){
alert('In index.html new loc = ' + loc);
};
window.plugins.childBrowser.showWebPage("https://communityName.jive-mobile.com/#jive-login", { showLocationBar: false });
}
I am getting my login page, but after login I can't see any alert coming !!
I need to get proof of user login and user session details.
Thanks
I have just updated the ChildBrowser plugin for my own use, following code given here: How do I get the web page contents from a WebView?
I am using this to log in on Google API oAuth2, watching for the right page to load. I am using the onPageLoaded(html) event that has the (computed) html source. You might want to use this to get the html that was loaded and check for "stuff". I don't use jive so I wouldn't know where to start, but I'll put up a sample Google oAuth2 project for you to try.
HTH
EDIT:
the code is at: https://code.google.com/p/filechunkreader/
Don't let yourself get fooled by the name, this project is the repo for my Java plugins experiments. It contains so far 2 plugins, FileChunkReader and a custom version of ChildBrowser.

Categories

Resources