Want to pass the cookies to the webview to load a webpage - javascript

I had Successful login to a website using jsoup and I obtained cookies from Jsoup cookies function in Map but I am struck at something.After successful login I Want to open a webpage of the website in the webview but the webpage redirects to the login page because cookies are not successfully passed to the webview and I don't know why. The page wants cookies of successful login to load that page
Here is the login page url.
http://111.68.99.8/StudentProfile/
and page I want to load after Successful Login
http://111.68.99.8/StudentProfile/PersonalInfo.aspx
Here is the MainActivity.java
package com.example.ebad.bu;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.AsyncTask;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.TextView;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class MainActivity extends ActionBarActivity {
String url = "http://111.68.99.8/StudentProfile/";
Map<String, String> logingcookies;
HashMap<String,String> hashMap;
ProgressDialog progressDialog,progressDialoge;
Button login, personal;
TextView Enrollement, password, E;
String enrol = "";
String pass = "";
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
login = (Button) findViewById(R.id.login_button);
personal = (Button) findViewById(R.id.pers);
login.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Enrollement = (TextView) findViewById(R.id.Enrollment);
enrol = Enrollement.getText().toString();
password = (TextView) findViewById(R.id.password);
pass = password.getText().toString();
new Title().execute();
}
});
}
private class Title extends AsyncTask<Void, Void, Void> {
String title;
String father;
#Override
protected void onPreExecute() {
super.onPreExecute();
progressDialog = new ProgressDialog(MainActivity.this);
progressDialog.setTitle("Title");
progressDialog.setMessage("Loading");
progressDialog.setIndeterminate(false);
progressDialog.show();
}
#Override
protected Void doInBackground(Void... params) {
try {
Connection.Response loginForm = Jsoup.connect(url).method(Connection.Method.GET).timeout(1000).execute();
Document doc = loginForm.parse();
String viewstate = doc.select("input[name=__VIEWSTATE]").attr("value");
String stategenerator = doc.select("input[name=__VIEWSTATEGENERATOR]").attr("value");
String Eventvalidation = doc.select("input[name=__EVENTVALIDATION]").attr("value");
doc = Jsoup.connect(url)
.data("__LASTFOCUS", "")
.data("__EVENTTARGET", "")
.data("__EVENTARGUMENT", "")
.data("__VIEWSTATE", viewstate)
.data("__VIEWSTATEGENERATOR", stategenerator)
.data("__EVENTVALIDATION", Eventvalidation)
.data("ctl00$Body$ENROLLMENTTextBox$tb", enrol)
.data("ctl00$Body$ENROLLMENTTextBox$cv_vce_ClientState", "")
.data("ctl00$Body$PasswordTextBox$tb", pass)
.data("ctl00$Body$PasswordTextBox$cv_vce_ClientState", "")
.data("ctl00$Body$LoginButton", "Login")
.cookies(loginForm.cookies())
.post();
logingcookies = loginForm.cookies();
title = doc.select("div[id=ctl00_Accounts]").html();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
#Override
protected void onPostExecute(Void aVoid) {
/*Intent showadditionmenu = new Intent(MainActivity.this,Per.class);
//showadditionmenu.putStringArrayListExtra("logingcookies", (ArrayList<String>) logingcookies);
showadditionmenu.putExtra("logingcookies", String.valueOf(logingcookies));
MainActivity.this.startActivity(showadditionmenu);*/
/* Intent i = new Intent(MainActivity.this,Per.class);
i.putExtra("hashMap",hashMap );
startActivity(i);
*/
hashMap = new HashMap<String,String>(logingcookies);
Intent i = new Intent(MainActivity.this,wee.class);
i.putExtra("hashMap",hashMap );
startActivity(i);
/* E = (TextView) findViewById(R.id.message);
E.setText(title);
progressDialog.dismiss();*/
}
}
}
I have passed the saved cookie to the activity that load the webpage in webivew.. Here is the other activity;
Wee.java
package com.example.ebad.bu;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Ebad on 11/8/2015.
*/
public class wee extends Activity {
String url= "http://111.68.99.8/StudentProfile/PersonalInfo.aspx";
HashMap<String ,String> hashMap;
Map<String,String> map;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout);
Intent intent = getIntent();
hashMap = (HashMap<String,String>) intent.getSerializableExtra("hashMap");
WebView webView = (WebView) findViewById(R.id.webviewe);
webView.setWebViewClient(new WebViewClient());
webView.loadUrl(url,hashMap);
}
}
Is there any way that I can view that webpage without logging in again to the webview?

Haven't tested it, but using CookieManager ahould work.
Usage should be something like this:
CookieSyncManager.createInstance(this);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie(); //optional
cookieManager.setAcceptCookie(true);
Then loop over your cookies using the setCookie method.
Note: If useing lollipop and up you should also use setAcceptThirdPartyCookies.
Good luck.

Related

Main Activity Using onStart, onStop, onResume Not Showing the Appropriate XML/Interface

I'm following a guide on coding by Easy Tuto, currently on part 7 at the end where the recycler_note_item.xml would show up on the interface. In the video, he fixed the problem by adding the onStart, onStop, onResume commands and adding `noteAdapter.startListening' in between the lines as shown here: image In the video, it worked and showed the item however nothing showed up for me as can be seen here . I tried scouring the video trying to find what I did wrong. I'm pretty new to coding and I was using his video as a base to learn more about it. I added those lines myself but it diddn't work for me it seems. Can someone please help me? It would be greatly appreciated. Here is my code for MainActivity.Java:
package com.example.myapplication;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageButton;
import com.firebase.ui.firestore.FirestoreRecyclerOptions;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.firebase.firestore.Query;
public class MainActivity extends AppCompatActivity {
FloatingActionButton addNoteBtn;
RecyclerView recyclerView;
ImageButton menuBtn;
NoteAdapter noteAdapter;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
addNoteBtn = findViewById(R.id.add_note_btn);
recyclerView = findViewById(R.id.recyler_view);
menuBtn = findViewById(R.id.menu_btn);
addNoteBtn.setOnClickListener((v)-> startActivity(new Intent(MainActivity.this,NoteDetailsActivity.class)) );
menuBtn.setOnClickListener((v)->showMenu());
setupRecyclerView();
}
void showMenu(){
//TODO Display menu
}
void setupRecyclerView(){
Query query = Utility.getCollectionReferenceForNotes().orderBy("timestamp",Query.Direction.DESCENDING);
FirestoreRecyclerOptions<Note> options = new FirestoreRecyclerOptions.Builder<Note>()
.setQuery(query,Note.class).build();
recyclerView.setLayoutManager(new LinearLayoutManager(this));
noteAdapter = new NoteAdapter(options,this);
recyclerView.setAdapter(noteAdapter);
}
#Override
protected void onStart() {
super.onStart();
noteAdapter.startListening();
}
#Override
protected void onStop() {
super.onStop();
noteAdapter.stopListening();
}
#Override
protected void onResume() {
super.onResume();
noteAdapter.notifyDataSetChanged();
}
}
I think the other relevant codes is my NoteAdapter which is this:
package com.example.myapplication;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.firebase.ui.firestore.FirestoreRecyclerAdapter;
import com.firebase.ui.firestore.FirestoreRecyclerOptions;
import io.grpc.okhttp.internal.Util;
public class NoteAdapter extends FirestoreRecyclerAdapter<Note, NoteAdapter.NoteViewHolder>{
Context context;
public NoteAdapter(#NonNull FirestoreRecyclerOptions<Note> options, Context context) {
super(options);
this.context = context;
}
#Override
protected void onBindViewHolder(#NonNull NoteViewHolder holder, int position, #NonNull Note note) {
holder.titleTextView.setText(note.title);
holder.contentTextView.setText(note.content);
holder.timestampTextView.setText(Utility.timestamptoString(note.timeStamp));
}
#NonNull
#Override
public NoteViewHolder onCreateViewHolder(#NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.recycler_note_item,parent,true);
return new NoteViewHolder(view);
}
class NoteViewHolder extends RecyclerView.ViewHolder{
TextView titleTextView,contentTextView,timestampTextView;
public NoteViewHolder(#NonNull View itemView) {
super(itemView);
titleTextView = itemView.findViewById(R.id.note_title_text_view);
contentTextView = itemView.findViewById(R.id.note_content_text_view);
timestampTextView = itemView.findViewById(R.id.note_timestamp_text_view);
}
}
}
Please tell me if there are any other relevant codes I can give to help give more context on my problem. Thanks for helping me out if anyone!

my paystack payment gateway popup is not showing/poping up

This code is not working and my paystack payment gateway is not showing, though it displays the spinner but will not show the form for card input.
Please I need a complete code that will help me get my job done:
webView.setWebChromeClient(new WebChromeClient() {
#Override
public boolean onCreateWindow(WebView view, boolean isDialog,
boolean isUserGesture, Message resultMsg) {
WebView newWebView = new WebView(WebpageActivity.this);
newWebView.getSettings().setJavaScriptEnabled(true);
newWebView.getSettings().setSupportZoom(true);
newWebView.getSettings().setBuiltInZoomControls(true);
newWebView.getSettings().setPluginState(PluginState.ON);
newWebView.getSettings().setSupportMultipleWindows(true);
view.addView(newWebView);
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
transport.setWebView(newWebView);
resultMsg.sendToTarget();
newWebView.setWebViewClient(new WebViewClient() {
#Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
return true;
}
}
});
Well, this code should work when pasted on your MainActivity file of your android webview project.
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.net.Uri;
import android.webkit.WebViewClient;
import android.webkit.WebSettings.PluginState;
public class MainActivity extends Activity {
private WebView webView = null;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.webView = (WebView) findViewById(R.id.webView);
WebSettings webSettings = webView.getSettings();
webView.setInitialScale(1);
webSettings.setJavaScriptEnabled(true);
webSettings.setLoadWithOverviewMode(true);
webSettings.setUseWideViewPort(true);
webSettings.setAllowFileAccess(true);
webSettings.setAllowContentAccess(true);
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(true);
webSettings.setPluginState(PluginState.ON);
webSettings.setSupportMultipleWindows(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
WebViewClientImpl webViewClient = new WebViewClientImpl(this);
webView.setWebViewClient(webViewClient);
webView.loadUrl("https://www.your_url.com/");
}
#Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && this.webView.canGoBack()) {
this.webView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
public class WebViewClientImpl extends WebViewClient {
private Activity activity = null;
public WebViewClientImpl(Activity activity) {
this.activity = activity;
}
#Override
public boolean shouldOverrideUrlLoading(WebView webView, String url) {
if(url.indexOf("your_url") > -1 ) return false;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
activity.startActivity(intent);
return true;
}
}
}
Now, after pasting the above code you need to use the PHP paystack integration this time and not the javascript paystack integration initialization and callback functions.
At this point you only need to worry about your sessions.
Tested And Confirmed.

How can I get a value on a button click inside a WebView?

I have a native android app that goes into a WebView for the checkout process. I am implementing appsflyer to track revenue through the app. How can I detect which button was clicked on the page, and what the item price is for revenue?
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;
import com.appsflyer.AFInAppEventParameterName;
import com.appsflyer.AFInAppEventType;
import com.appsflyer.AppsFlyerLib;
import org.json.JSONException;
import org.json.JSONObject;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class EventActivity extends AppCompatActivity {
ProgressDialog pDialog;
Boolean redirecting = false;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_event);
String appsFlyerUID = AppCore.getInstance(getApplicationContext()).getAppsFlyerUID();
String idfa = AppCore.getInstance(getApplicationContext()).getMixpanelAdvertisingIdentifier();
Intent intent = getIntent();
try {
JSONObject event = new JSONObject(intent.getStringExtra("event"));
String eventId = event.getString("id");
String title = event.getString("title");
String startsAt = event.getString("starts_at");
String venue = event.getString("venue");
String city = event.getString("city");
String state = event.getString("state");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss");
Date newDate = format.parse(startsAt);
format = new SimpleDateFormat("EEEE, MMMM d # h:mm a");
String date = format.format(newDate);
((TextView)findViewById(R.id.event_title)).setText(title);
((TextView)findViewById(R.id.event_date)).setText(date);
((TextView)findViewById(R.id.event_venue)).setText(venue + " - " + city + ", " + state);
String url = "http://tlapi.ticketliquidator.com/event_map/" + eventId + "?utm_campaign=" + idfa + "&utm_term=" + appsFlyerUID;
Map<String, Object> eventValue = new HashMap<String, Object>();
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "View Event " + eventId,eventValue);
final WebView wv = (WebView) findViewById(R.id.event_webview);
wv.getSettings().setJavaScriptEnabled(true);
final Activity self = this;
wv.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
redirecting = true;
view.loadUrl(url);
return true;
}
public void onPageFinished(WebView view, String url) {
if(redirecting){
pDialog.dismiss();
}
}
public void onPageStarted(WebView view, String url, Bitmap favicon) {
if(redirecting){
pDialog = new ProgressDialog(self);
pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
pDialog.setMessage(" Loading...");
pDialog.setCancelable(true);
pDialog.show();
}
}
});
pDialog = new ProgressDialog(this);
pDialog.setMessage("Getting event...");
pDialog.show();
wv.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
if(progress == 100)
pDialog.dismiss();
}
});
wv.loadUrl(url);
} catch (Exception e) {
e.printStackTrace();
}
}
}
This is my android class for the WebView. I am trying to pull information from this web page...
Api WebView
I just need to know which button was clicked in the WebView, and get the price beside that button. Then I will send that back to appsflyer for tracking.
You'll have to trick it with java script as for that after loading the page you'll have to inject your javascript into the loaded webpage like this
#Override
public void onPageFinished(WebView view, String url){
// your javascript as string which works fine in scratchpad
String javaScript ="javascript:(function() {alert();})()";
webview.loadUrl(javaScript);
}
So that that you can inject the javascript and find the respective DOM as per your requirement and based on that you can call java method like this.
you can't access the event of button click inside your webview, webview is used to run an html page, and for that you have to code inside your html page, use JavaScript to capture onClick event

ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference

import android.content.Context;
import android.graphics.Color;
import android.icu.text.SimpleDateFormat;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;
import com.github.sundeepk.compactcalendarview.CompactCalendarView;
import com.github.sundeepk.compactcalendarview.domain.Event;
import java.util.Date;
import java.util.Locale;
public class Calendarpage extends AppCompatActivity {
//modify here
ActionBar actionBar = null;
CompactCalendarView compactCalendar;
private SimpleDateFormat dateFormatMonth = new SimpleDateFormat ("MMM- yyyy", Locale.getDefault());
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_calendar);
// modify here
ActionBar myActionBar = getSupportActionBar();
if (myActionBar != null) {
myActionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(null);
}
compactCalendar = (CompactCalendarView) findViewById(R.id.compactcalendar_view);
compactCalendar.setUseThreeLetterAbbreviation(true);
Event ev1 = new Event(Color.RED, 1514160000L, "Chirstmas Day");
compactCalendar.addEvent(ev1);
compactCalendar.setListener(new CompactCalendarView.CompactCalendarViewListener() {
#Override
public void onDayClick(Date dateClicked) {
Context context = getApplicationContext();
if (dateClicked.toString().compareTo("Mon Dec 25 00:00:00 AST 2017") == 0) {
Toast.makeText(context, "Christmas Day", Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(context, "No Events Planned That Day", Toast.LENGTH_SHORT).show();
}
}
#Override
public void onMonthScroll(Date firstDayOfNewMonth) {
getSupportActionBar.setTitle(String.valueOf(dateFormatMonth.format(firstDayOfNewMonth)));
}
});
}
}
now added the changes you made but the getSupportActionBar. is in red? its just asking me to create local variables when right clicking. very stressed with this as I can't move on until this page works.. as I still need to be able to add events to dates
Try to make this change
In your OnCreate :
ActionBar myActionBar = getSupportActionBar();
if (myActionBar != null) {
myActionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(null);
}
In your setListener
#Override
public void onMonthScroll(Date firstDayOfNewMonth) {
getSupportActionBar().setTitle(String.valueOf(
dateFormatMonth.format(firstDayOfNewMonth)));
}
Good luck
EDIT try this
compactCalendar.setListener(new CompactCalendarView.CompactCalendarViewListener() {
#Override
public void onMonthScroll(Date firstDayOfNewMonth) {
setNewTitleBar(dateFormatMonth.format(firstDayOfNewMonth));
}
});
}
private void setNewTitleBar(String newTitle) {
getSupportActionBar().setTitle(newTitle);
}
}

Uncaught ReferenceError: myFunction is not defined at null:1 Android exception in webview

I am calling javascript function from an activity but I am getting Uncaught ReferenceError: myFunction is not defined at null:1 error. Here is my files
MainActivity.java
package com.example.androidexample;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.Menu;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView webview = (WebView)this.findViewById(R.id.webView1);
WebSettings webSettings = webview.getSettings();
// Enable Javascript for interaction
webSettings.setJavaScriptEnabled(true);
// Make the zoom controls visible
webSettings.setBuiltInZoomControls(true);
// Allow for touching selecting/deselecting data series
webview.requestFocusFromTouch();
// Set the client
webview.setWebViewClient(new WebViewClient());
webview.setWebChromeClient(new WebChromeClient());
//webview.loadUrl("file:///android_asset/test.html");
/*String str = "<books>" +
"<book title=\"A Tale of Two Cities\"/>" +
"<book title=\"1984\"/>" +
"</books>";*/
webview.loadUrl("file:///android_asset/test.html");
webview.loadUrl("javascript:myFunction()");
//webview.loadUrl("javascript:myFunction("+str+")");
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
test.html
<html>
<body>
<script type="text/javascript" src="marknote.js"></script>
<script type="text/javascript">
function myFunction()
{
var str = '<books><book></book></books>';
var parser = new marknote.Parser();
var doc = parser.parse(str);
var bookEls = doc.getRootElement().getChildElements();
for (var i=0; i<bookEls.length; i++) {
var bookEl = bookEls[i];
alert("Element name is " + bookEl.getName());
}
}
</script>
</body>
</html>
I have seen this error occurred when I am using webview.loadUrl("javascript:myFunction()");. I want to pass a xml string from java and parse it into javascript. Please help me to find a solution.
You should execute the javascript when the page is loaded
webview.setWebViewClient(new WebViewClient(){
public void onPageFinished(WebView view, String url){
webview.loadUrl("javascript:myFunction()");
}
});
The code will be executed and will find your javascript function. The way you are doing now does not wait.
This one worked just need to change parameter set up sequence
package com.example.androidexample;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.Menu;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final WebView webview = (WebView)this.findViewById(R.id.webView1);
WebSettings webSettings = webview.getSettings();
// Enable Javascript for interaction
webSettings.setJavaScriptEnabled(true);
// Make the zoom controls visible
webSettings.setBuiltInZoomControls(true);
// Allow for touching selecting/deselecting data series
webview.requestFocusFromTouch();
// Set the client
// webview.setWebViewClient(new WebViewClient());
// webview.setWebChromeClient(new WebChromeClient());
final String str = "<books>" +
"<book title=\"A Tale of Two Cities\"/>" +
"<book title=\"1984\"/>" +
"</books>";
// webview.loadUrl("file:///android_asset/test.html");
webview.setWebChromeClient(new WebChromeClient());
webview.setWebViewClient(new WebViewClient()
{
public void onPageFinished(WebView view, String url)
{
webview.loadUrl("javascript:myFunction('"+str+"')");
}
}
);
webview.loadUrl("file:///android_asset/test.html");
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}

Categories