how to start third activity if url is same in webview
for example i have webview in my webview if url is like this
http://example.com/access.html
then start thirdactivity
how can i do this please help me to fix this issue thanks
in advance
here is my webview code
public class SecondActivity extends AppCompatActivity {
private WebView wv1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
String url = getIntent().getStringExtra("url");
wv1=(WebView)findViewById(R.id.webView);
wv1.setWebViewClient(new WebViewClient());
wv1.getSettings().setLoadsImagesAutomatically(true);
wv1.getSettings().setJavaScriptEnabled(true);
wv1.loadUrl(url);
}
}
here is xml file of secondactivity
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark"
tools:context="com.shuvro.barcodescanner.BarcodeScannerActivity">
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>