How to show dialog when user clicks in a webview dialog - android

Currently, I have a WebView which opens my google drive pdf file which is encrypted (it has a password)
My project
it shows a dialog where I need to input a password,
now my problem is;
Is it possible to set a text in the input?
After the WebView retrieve the URL,
is it possible to set a text in the dialog?
thank you.

Related

Open Non editable url in a browser from activity in android

I can open a url from my app but i want to make that url non editable or to hide the url from the user. So that the user can't edit it(address bar - read only) or if that is not possible then hide the address bar from the user.
I used webview to display the webPage

Google Map and Web view

I have a Google Map opening in a Webview using query strings and the API to determine the location.
This worked fine up until a week or so ago; now the window pops up asking what application you would like to use.
Has something changed? How can I stop this box popping up and have the webview handle the map instead of it trying to open a new browser or Maps?
Relevant code:
String detail = (String)getIntent().getExtras().get(CustomizedListView.KEY_DETAIL);
WebView detailweb = (WebView)findViewById(R.id.detailsText);
detailweb.loadData(detail, "text/html", "UTF-8");

Android press Button cannot appear Webview program troubleshooting

I implemented the the Android webview encounter some problem
Beginning do a OptionMenu, and he will appear when you press the Menu four locations
I use the mouse click taipei he displayed to Toast
But I would like to implement the functionality Toast message screen webview display the specified web page
I use Intent a = new Intent (Intent.ACTION_VIEW, Uri.parse ();
 startActivity (a);
Can successfully display the webpage
But I would like to the webview implement web pages using setContentView ();
Switch to taipei.xml <= webview, when I click on the submit button, it could not display the webpage using webview
Please help me to see where the problems lie, because beginners just learning, I hope to try to attach the code to solve my problem.
Code URL: [I implemented the the Android webview encounter some problem
Beginning do a OptionMenu, and he will appear when you press the Menu four locations
I use the mouse click taipei he displayed to Toast
But I would like to implement the functionality Toast message screen webview display the specified web page
I use Intent a = new Intent (Intent.ACTION_VIEW, Uri.parse ("http://www.taipei-101.com.tw/"));
 startActivity (a);
Can successfully display the webpage
But I would like to the webview implement web pages using setContentView ();
Switch to taipei.xml <= webview, when I click on the submit button, it could not display the webpage using webview
Please help me to see where the problems lie, because beginners just learning, I hope to try to attach the code to solve my problem.
Code URL: http://www.javaworld.com.tw/jute/post/view?bid=26&id=312960&sty=1#312960
And attach performed on screen picture
And attach performed on screen picture in the cod URL
Implore help thank you

How to add a web address in a AlertBox as a link?

I am showing a Alertbox after clicking a button. The Alert box is customised one. Along with the Alert title it has to show a web address like http://www.google.com. While clicking the web it site has to load in a seperate Activity with the content of the specific address.I am using a webview and the website is loading successfully the problem is, not able to show the web address in alertbox. It will be better if i can show it as a link.
thanks and regards
Parvathi
String text = "<a href=http://www.google.de>Link zum klicken</a>";
builder.setMessage(Html.fromHtml(text));

Launch a background web search

I am trying to launch a websearch using data input from a user. The data is input through TextEdit boxes. Upon submission of the data, i would like my program to: 1) search for a specific webpage based on the user input 2)Find specific elements at the webpage 3) Display the webpage.
Here is an example:
User Input (in a non browser/webview page)
1) Store Name: Macey's 2)Zip Code: 77471
In the background my program will:
1) Find the Macey's website
2) Find the store nearest zip code 77471
3) Load the Web page for the store nearest zip code 77471
Obviously there is a lot of error handeling, exceptions, ect that would go along with this. For the sake of making this example "easy" lets pretend that 1) A the Macey's main page exists 2)A sperate page for the 77471 store exists. 3)There is a link to the 77471 store on the Macey's main page.
I have the code for getting the user input variables and i know how to launch the webview. What i dont know how to do is to search for the Macy's home page, then find the link i am looking for on the homepage and navigate to it. Loading the webview is not the problem. Find the data is.
Below is my current code. Right now i am setup so that the user will navigate to the webpage they are looking for but i would rather handle the searching for them, if it is possible.
public void InitializeWebView(){
portal = (WebView)findViewById(R.id.web_Portal);
WebSettings Settings = portal.getSettings();
Settings.setSavePassword(false);
Settings.setSaveFormData(false);
Settings.setJavaScriptEnabled(true);
Settings.setSupportZoom(true);
Settings.supportZoom();
portal.setWebViewClient(new WebViewClient(){
#Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
}
public void searchAndShow(String Store, String zip){
portal.loadUrl("http://www.google.com");
}
You can get search result in JSON format from google using their API. Here is a nice example in JAVA. Just don't use key parameter until you do not have a vlid key.

Categories

Resources