How to create your own custom browser Android App? - Android Studio code

Mon, 24 Jun 2024 10:17:18 +0000

In this video it shows simple steps of how to create your own custom browser App in Android.

It uses WebView to create the web browser layout and then registers it as web client in your App. It further uses loadUrl method to load the url in the webview making it your own browser App.

I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com

Complete source code and other details/ steps of this video are posted in the below link:
https://programmerworld.co/and....roid/how-to-create-y

However, the main Java code is copied below also for reference:

package com.programmerworld.custombrowserapp;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {

private EditText editText;
private WebView webView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

webView = findViewById(R.id.webView);
editText = findViewById(R.id.editText);
webView.setWebViewClient(new WebViewClient());
}

public void buttonGO_Browse(View view){
String stringURL = editText.getText().toString();
stringURL = "https://www."+stringURL;

webView.loadUrl(stringURL);
}
}

-