jazzmatazz2005
New Member
i just had an app made for me and i noticed that the webview launches the default browser.
I've tried different thing but nothing works
this is my web_activity java
any help will be much appreciated.
I've tried different thing but nothing works
this is my web_activity java
any help will be much appreciated.
Code:
package com.ctechs.audiomix;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import com.rocdamic.com.R;
public class Web_activity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.web_activity);
Intent intent = getIntent();
String url_to_open = intent.getExtras().getString("url_to_open");
WebView wb_homepage = (WebView)findViewById(R.id.webView1);
wb_homepage.getSettings().setJavaScriptEnabled(true);
wb_homepage.loadUrl(url_to_open);
}
}