Convert Your Website into a Professional Android App Using ANDROID STUDIO 2023[Free in Hindi]
Convert website into Professional Android App
Today we know. How to convert your website into a professional Android app using Android Studio? We implement many features in our app.
Table of Contents
Convert website to Android app for free
We create our app in Android Studio freely. I am available in the source code of this app.
You can publish your app in the Google Play store. And earn money by Ad Mob. See all the steps completely and get your app. If you’re facing any errors, please comment. Below is the post.
Source Code: How to Convert Website into a Professional Android App
Step 01 – How to Download Android Studio
- Open Browser
- Search Android Studio on Google
- Go to the official Website
- Download Software
- Install Software
Step 02 – How to Create Project in Android Studio
- Open “Search bar” in pc
- Type “Android”
- Click on the first Software
- Click on “Create Project” in Android Studio
- Set your app Name.
- Set your own “Package Name”
- Set your “Project Location”
- Select Language.
- Select Minimum SDK Version.
- Click on “Finish”
Step 03 – How to Open JAVA and XML Files in Android Studio
- Activity Main JAVA
- Main Activity XML
- Manifest
Step 04 – How to Remove Action Bar in Android App – Android Studio
- To remove the Action bar > go to theme > Replace “DAYNIGHT” with “No”
Step 05 – How to set or add the logo in android app in Android Studio
- Add app Logo > res > new > Image assist > select logo > resize > remove Bg > finish
Step 05 – How to add internet permissions in Android Studio – android Studio.
Internet Connection Error in android Studio
- Copy Code > Go to “AndroidManifest.xml ” > find “manifest” > Paste Code
<uses-permissionandroid:name=”android.permission.INTERNET”/>
- Copy Code > Go to “AndroidManifest.xml ” > find “manifest” > Paste Code
<uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE”/>
Step 06 – How to add webView (XML) in Android App – Android Studio
Activity Main XML
- Copy Code > Go to “Activity_Main.xml” > Remove “TextView” > Paste Code
<WebViewandroid:layout_width=”fill_parent”android:layout_height=”fill_parent”android:id=”@+id/webView”android:layout_alignParentTop=”true”android:layout_alignParentLeft=”true”android:layout_alignParentStart=”true”android:layout_alignParentBottom=”true”android:layout_alignParentRight=”true”android:layout_alignParentEnd=”true”tools:ignore=”MissingConstraints”/>
Step 07 -How to add webView (Java) in Android App – Android Studio
Main Activity JAVA
- Copy Code > Go to “Main Activity Java” > Prevent Package name or remove all code > Paste Code
- Insert Your Website URL in the highlighted text (red).
import
android.os.Bundle;import
android.webkit.WebView;import
android.webkit.WebViewClient;import
androidx.appcompat.app.AppCompatActivity;public class
MainActivityextends
AppCompatActivity {
StringwebsiteURL
=”https://myb21.com/”;// Add your website urlprivate
WebViewwebview;@Overrideprotected voidonCreate
(Bundle savedInstanceState) {super
.onCreate(savedInstanceState);
setContentView(R.layout.activity_main
);//Webview stuffwebview
= findViewById(R.id.webView
);webview
.getSettings().setJavaScriptEnabled(true
);webview
.getSettings().setDomStorageEnabled(true
);webview
.setOverScrollMode(WebView.OVER_SCROLL_NEVER
);webview
.loadUrl(websiteURL
);webview
.setWebViewClient(new
WebViewClientDemo());
}private class
WebViewClientDemoextends
WebViewClient {@Override//Keep webview in app when clicking linkspublic booleanshouldOverrideUrlLoading
(WebView view,
String url) {
view.loadUrl(url);return true;}
}}
Step 08 -How to solve internet connection error in android app – Android Studio
MainActivity.java With Internet connection Code
Copy Code > Go to “Main Activity Java” > Prevent Package name or remove all code > Paste CodeInsert Your Website URL on highlight text (red).import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebView;
import android.webkit.WebViewClient;import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity { String websiteURL = “https://myb21.com/”; // add your website url
private WebView webview;@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);if( ! CheckNetwork.isInternetAvailable(this)) //returns true if internet available
{
//if there is no internet do this
setContentView(R.layout.activity_main);
//Toast.makeText(this,”No Internet Connection, Chris”,Toast.LENGTH_LONG).show();new AlertDialog.Builder(this) //alert the person knowing they are about to close
.setTitle(“No internet connection available”)
.setMessage(“Please Check you’re Mobile data or Wifi network.”)
.setPositiveButton(“Ok”, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
})
//.setNegativeButton(“No”, null)
.show();}
else
{
//Webview stuff
webview = findViewById(R.id.webView);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setDomStorageEnabled(true);
webview.setOverScrollMode(WebView.OVER_SCROLL_NEVER);
webview.loadUrl(websiteURL);
webview.setWebViewClient(new WebViewClientDemo());}
}private class WebViewClientDemo extends WebViewClient {
@Override
//Keep webview in app when clicking links
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}}class CheckNetwork {private static final String TAG = CheckNetwork.class.getSimpleName();public static boolean isInternetAvailable(Context context)
{
NetworkInfo info = (NetworkInfo) ((ConnectivityManager)
context.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();if (info == null)
{
Log.d(TAG,”no internet connection”);
return false;
}
else
{
if(info.isConnected())
{
Log.d(TAG,” internet connection available…”);
return true;
}
else
{
Log.d(TAG,” internet connection”);
return true;
} }
}
}
Step 09 How to set Back & Exit Feature In Android App – Android Studio
- Copy Code > Go to “Main Activity Java” > private class (web view client demo) > Paste Code
//set back button functionality@Overridepublic voidonBackPressed
() {//if user presses the back button do thisif
(webview
.isFocused() &&webview
.canGoBack()) {//check if in webview and the user can go backwebview
.goBack();//go back in webview
}else
{//do this if the webview cannot go back any furthernew
AlertDialog.Builder(this
)//alert the person knowing they are about to close
.setTitle(“EXIT”
)
.setMessage(“Are you sure. You want to close this app?”)
.setPositiveButton(“Yes”, newDialogInterface.OnClickListener() {@Overridepublic voidonClick
(DialogInterface dialog, int
which) {
finish();}
})
.setNegativeButton(“No”, null)
.show();}
}
Step 10 – How to add Swipe Down to Refresh In Android App (XML File) – Android Studio
- Copy Code > Go to “Activity Main XML” > > Paste Code (Replace with Webview)
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id=”@+id/swipeContainer” android:layout_width=”match_parent” android:layout_height=”match_parent”> <WebView android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:id=”@+id/webView” android:layout_alignParentTop=”true” android:layout_alignParentLeft=”true” android:layout_alignParentStart=”true” android:layout_alignParentBottom=”true” android:layout_alignParentRight=”true” android:layout_alignParentEnd=”true” tools:ignore=”MissingConstraints” /></androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
Step 11 – How to add Swipe Down to Refresh In Android App (Java File) – Android Studio
Code 01
- Copy Code > Go to “Main Activity Java” > Go to the web link below the surface ( below Private web view) > Paste Code
SwipeRefreshLayout mySwipeRefreshLayout;
Code 02
- Copy Code > Go to “Main Activity Java” > web view stuff – (onCreate) > Paste Code
//Swipe to refresh functionalitymySwipeRefreshLayout
= (SwipeRefreshLayout)this
.findViewById(R.id.swipeContainer
);mySwipeRefreshLayout
.setOnRefreshListener(new
SwipeRefreshLayout.OnRefreshListener() {@Overridepublic voidonRefresh
() {webview
.reload();
}
}
);
Step 12 – How to add Swipe Down to Refresh In Android App (Java File) – Android Studio
- Copy Code > Go to “Main Activity Java” > go to private class webview client demo > Paste Code
private class
WebViewClientDemoextends
WebViewClient {@Override//Keep webview in app when clicking linkspublic booleanshouldOverrideUrlLoading
(WebView view,
String url) {
view.loadUrl(url);return true;}@Overridepublic voidonPageFinished
(WebView view,
String url) {super
.onPageFinished(view,
url);mySwipeRefreshLayout
.setRefreshing(false
);
}
}
Step 13 How to Convert Website into Professional Android App Using ANDROID STUDIO 2023 [HINDI] -Complete Java file Code
package
com.myb21.p04cpdfdownload;import
android.app.AlertDialog;import
android.content.Context;import
android.content.DialogInterface;import
android.net.ConnectivityManager;import
android.net.NetworkInfo;import
android.os.Bundle;import
android.util.Log;import
android.webkit.WebView;import
android.webkit.WebViewClient;import
androidx.appcompat.app.AppCompatActivity;import
androidx.swiperefreshlayout.widget.SwipeRefreshLayout;public class
MainActivityextends
AppCompatActivity {
StringwebsiteURL
=”https://magazinex.in/”;//
sets web urlprivate
WebViewwebview;
SwipeRefreshLayoutmySwipeRefreshLayout;@Overrideprotected voidonCreate
(Bundle savedInstanceState) {super
.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);if
( ! CheckNetwork.isInternetAvailable(this))//returns true if internet available
{//if there is no internet do this setContentView(R.layout.activity_main);//Toast.makeText(this,”No Internet Connection, Chris”,Toast.LENGTH_LONG).show();new
AlertDialog.Builder(this)//alert the person knowing they are about to close.setTitle(“No internet connection available”)
.setMessage(“Please Check you’re Mobile data or Wifi network.”)
.setPositiveButton(“Ok”, new DialogInterface.OnClickListener() {@Overridepublic voidonClick(DialogInterface dialog, intwhich) {finish();
}
})//.setNegativeButton(“No”, null).show();}else{//Webview stuffwebview= findViewById(R.id.webView);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setDomStorageEnabled(true);
webview.setOverScrollMode(WebView.OVER_SCROLL_NEVER);
webview.loadUrl(websiteURL);
webview.setWebViewClient(new
WebViewClientDemo());
}//Swipe to refresh functionalitymySwipeRefreshLayout
= (SwipeRefreshLayout)this.findViewById(R.id.swipeContainer);mySwipeRefreshLayout
.setOnRefreshListener(new
SwipeRefreshLayout.OnRefreshListener() {@Overridepublic voidonRefresh
() {webview.reload();
}
}
);}private class
WebViewClientDemoextends
WebViewClient {@Override//Keep webview in app when clicking linkspublic booleanshouldOverrideUrlLoading
(WebView view,String url) {view.loadUrl(url);return true;
}@Overridepublic voidonPageFinished
(WebView view, String url) {super.onPageFinished(view,url);
mySwipeRefreshLayout.setRefreshing(false);
}
}//set back button functionality@Overridepublic voidonBackPressed() {//if user presses the back button do thisif
(webview.isFocused() &&
webview.canGoBack()) {//check if in webview and the user can go backwebview
.goBack();//
go back in webview}else
{//do this if the webview cannot go back any furthernew
AlertDialog.Builder(this
)//alert the person knowing they are about to close
.setTitle(“EXIT”
)
.setMessage(“Are you sure. You want to close this app?”)
.setPositiveButton(“Yes”, newDialogInterface.OnClickListener() {@Overridepublic voidonClick
(DialogInterface dialog, int
which) {
finish();}
})
.setNegativeButton(“No”, null)
.show();}
}}class
CheckNetwork {private static final
StringTAG
= CheckNetwork.class
.getSimpleName();public static booleanisInternetAvailable
(Context context)
{
NetworkInfo info = (NetworkInfo) ((ConnectivityManager)
context.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();if
(info ==null
)
{
Log.d(TAG,”no internet connection”);return false;
}else
{if (info.isConnected())
{
Log.d(TAG,” internet connection available…”);return true;
}else
{
Log.d(TAG,” internet connection”);return true;
}
}
}
}
Code 13
Screen Rotation:
- add in manifest
android:screenOrientation=”portrait”>
FAQ
- Convert Website to Android App for free
- Convert the Website into an App for free
- Convert Website into App free
- Convert Website into Android App
- Convert Website to Android App source code GitHub
- Convert Website to Android App with push notifications
- Convert Website to APK free
- Create an APK file for your Website free
- Download an APK file to your PC.
Deshawn
• 18/02/2024Terrific article! This is the type of information that are supposed to be shared across the net.
Disgrace on Google for now not positioning this put up
upper! Come on over and consult with my site . Thanks =)
Ashtin
• 20/02/2024Hi! This post couldn’t be written any better! Reading through this post reminds me of my old room mate!
He always kept talking about this. I will forward this write-up to him.
Fairly certain he will have a good read. Thank you
for sharing!
Natilee
• 20/02/2024If some one wishes expert view on the topic of blogging then i suggest him/her to go to see this weblog, Keep up the nice job.
Alene
• 20/02/2024Hello There. I discovered your weblog using msn. This is an extremely well written article.
I’ll be sure to bookmark it and come back to read more of your useful info.
Thanks for the post. I will definitely return.
Georgenal
• 28/11/2025?Brindiamo per ogni trionfatore del massimo premio !
Ogni piattaforma affidabile dovrebbe garantire una gestione accurata della navigazione protetta. Una buona conoscenza degli strumenti di sicurezza aiuta a prevenire incidenti indesiderati [url=https://infinitumondovi.it/casino-senza-invio-documenti/#][/url]. Con piccoli gesti quotidiani ГЁ possibile proteggersi in modo efficace.
La crescente diffusione dei giochi online rende essenziale proteggere la propria minori online. Controllare le impostazioni del proprio account può ridurre i rischi associati. Adottare abitudini digitali consapevoli rende l’esperienza molto più sicura.
Casino bonus senza documenti se adaptan a tendencias – https://infinitumondovi.it/casino-senza-invio-documenti/
?Che la fortuna ti sorrida con che tu ottenga straordinari scommesse trionfanti !
wette sport
• 01/12/2025betsafe sportwetten bonus
Visit my webpage; wette sport
bestes sportwetten portal
• 01/12/2025wette gewinnen
Feel free to visit my website – bestes sportwetten portal
Uvc-2020.com
• 04/12/2025beste quote wetten com erfahrungen (Uvc-2020.com) dass
wett tipps dfb pokal
• 04/12/2025wettanbieter gratiswette
Also visit my page – wett tipps dfb pokal
Scottnar
• 05/12/2025?Celebremos a cada cazador de emociones intensas !
Jugar en casino sin registro permite acceder a una experiencia rГЎpida y privada sin procesos complicados. [url=http://casinoretirosinverificacion.com/#][/url] Muchos jugadores optan por estas opciones debido a la libertad que ofrecen plataformas como Casino Retiro Sin VerificaciГіn. Gracias a esta flexibilidad, cada sesiГіn se vuelve mГЎs cГіmoda al usar servicios como casinos sin kyc.
Jugar en Casino sin KYC permite acceder a una experiencia rГЎpida y privada sin procesos complicados. Muchos jugadores optan por estas opciones debido a la libertad que ofrecen plataformas como casinos sin verificaciГіn. Gracias a esta flexibilidad, cada sesiГіn se vuelve mГЎs cГіmoda al usar servicios como casinoretirosinverificacion.
Casinos sin verificacion, apuesta sin preocupaciones – https://casinoretirosinverificacion.com/#
?Que la suerte te beneficie con aguardandote el deleite de lanzamientos prosperos !
Blondell
• 05/12/2025sinkende quoten online wetten kostenlos (Blondell)
Scottnar
• 05/12/2025?Celebremos a cada triunfador del galardon supremo !
Jugar en casinos sin verificacion permite acceder a una experiencia rГЎpida y privada sin procesos complicados. [url=http://casinoretirosinverificacion.com/][/url] Muchos jugadores optan por estas opciones debido a la libertad que ofrecen plataformas como casino sin kyc. Gracias a esta flexibilidad, cada sesiГіn se vuelve mГЎs cГіmoda al usar servicios como casinos sin kyc.
Jugar en casino sin kyc permite acceder a una experiencia rГЎpida y privada sin procesos complicados. Muchos jugadores optan por estas opciones debido a la libertad que ofrecen plataformas como casinos sin kyc. Gracias a esta flexibilidad, cada sesiГіn se vuelve mГЎs cГіmoda al usar servicios como casinos sin verificaciГіn.
Casinos sin verificacion, disfruta tus juegos favoritos – http://casinoretirosinverificacion.com/
?Que la suerte te beneficie con aguardandote magnificos botes destacados!
Scottnar
• 06/12/2025?Celebremos a cada triunfador del galardon supremo !
Jugar en casino sin verificaciГіn permite acceder a una experiencia rГЎpida y privada sin procesos complicados. [url=https://casinoretirosinverificacion.com/#][/url] Muchos jugadores optan por estas opciones debido a la libertad que ofrecen plataformas como casino sin registro. Gracias a esta flexibilidad, cada sesiГіn se vuelve mГЎs cГіmoda al usar servicios como casinoretirosinverificacion.com/.
Jugar en casinos sin kyc permite acceder a una experiencia rГЎpida y privada sin procesos complicados. Muchos jugadores optan por estas opciones debido a la libertad que ofrecen plataformas como casinos sin verificacion. Gracias a esta flexibilidad, cada sesiГіn se vuelve mГЎs cГіmoda al usar servicios como casinoretirosinverificacion.
Casinoretirosinverificacion.com, diversiГіn garantizada – п»їhttps://casinoretirosinverificacion.com/
?Que la suerte te beneficie con celebremos juntos inolvidables lanzamientos prosperos !
Live Sportwetten
• 06/12/2025englische wettanbieter
Visit my website: Live Sportwetten
beste wettanbieter online
• 06/12/2025sportwetten geld zurück österreich
Feel free to visit my web page: beste wettanbieter online
Cftainstitute.org
• 06/12/2025betibet sportwetten online deutschland
Here is my webpage; kombiwetten vorhersagen (Cftainstitute.org)
sichere wett tipps morgen
• 06/12/2025neue buchmacher
Look into my page: sichere wett tipps morgen
free sportwetten bonus Ohne einzahlung
• 07/12/2025wettseiten free sportwetten bonus Ohne einzahlung
http://192.241.205.46
• 07/12/2025beste buchmacher
Stop by my web page Wettanbieter test (http://192.241.205.46)
Online buchmacher
• 07/12/2025wettquoten erklärt
my web page: Online buchmacher
Hellen
• 10/12/2025wie funktionieren live wetten
Also visit my web-site: sportwetten beste strategie (Hellen)
Https://Baaslp.org
• 10/12/2025esc-wettquoten
Also visit my site: betibet beste bonus sportwetten (https://Baaslp.org)
MichaelVaw
• 13/12/2025?Levantemos nuestras copas por cada simbolo de la suerte !
Muchos jugadores buscan casino online fuera de espaГ±a para acceder a experiencias mГЎs libres y variadas. [url=http://bodegaslasangrederonda.es/en/#][/url] Incluyen herramientas modernas que facilitan sesiones mГЎs dinГЎmicas. De este modo casino online fuera de espaГ±a se posiciona como una alternativa rentable y conveniente.
Cada vez mГЎs usuarios prefieren casinos online fuera de espana por su flexibilidad y catГЎlogo internacional. Garantizan una experiencia continua sin restricciones ni interrupciones. AsГ casinos online fuera de espana sigue ganando seguidores entre los usuarios mГЎs exigentes.
casinos fuera de espana: Casinos fuera de espana con jackpots mГЎs altos – http://bodegaslasangrederonda.es/en/#
?Que la fortuna te acompane con momentos increibles triunfos inolvidables!
Kombiwette Mehrweg Rechner
• 14/12/2025urteil online sportwetten
Here is my web-site … Kombiwette Mehrweg Rechner
wettanbieter ohne lugas Limit
• 14/12/2025wette tipps heute
Visit my blog post … wettanbieter ohne lugas Limit
Register
• 14/12/2025Thanks for sharing. I read many of your blog posts, cool, your blog is very good. https://accounts.binance.com/register-person?ref=IXBIAFVY
創建免費帳戶
• 14/12/2025Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me? https://accounts.binance.info/fr/register?ref=T7KCZASX
Business Classifieds
Share "LIVE FISH CENTRE IN PEN"
Share "LIVE FISH CENTRE IN PEN"
Share "SATARA SPECIAL TEA MUMBAI"
Share "SATARA SPECIAL TEA MUMBAI"
Share "Best engineering college in Tamil Nadu – Easa College"
Share "Best engineering college in Tamil Nadu – Easa College"
Share "G7 Multiplex Bandra"
Share "G7 Multiplex Bandra"
Share "ANVI BACKERS PEN"
Share "ANVI BACKERS PEN"
Share "Mega Computers & Electronics Pen"
Share "Mega Computers & Electronics Pen"
Share "Amazon Web Development Service | Nordia"
Share "Amazon Web Development Service | Nordia"
Share "VASTUSHILP PEN"
Share "VASTUSHILP PEN"
Share "RAJPAL ELECTRONICS"
Share "RAJPAL ELECTRONICS"
Share "SAUBHAGYA INN INTERNATIONAL PEN"
Share "SAUBHAGYA INN INTERNATIONAL PEN"
Share "Himalayan Pure Shilajit Resin 25gm – Indus Organics"
Share "Himalayan Pure Shilajit Resin 25gm – Indus Organics"
Share "Jain & Shirdhankar Pen"
Share "Jain & Shirdhankar Pen"
Share "Rajlaxshmi Motors Pen"
Share "Rajlaxshmi Motors Pen"
Share "Prime Cab Service Pen"
Share "Prime Cab Service Pen"
Share "JAMIA DARUL HABEEB"
Share "JAMIA DARUL HABEEB"
Share "Quality Inn & Suites Lehigh Acres Fort Myers"
Share "Quality Inn & Suites Lehigh Acres Fort Myers"
Share "Lucky Hotels and Restaurants"
Share "Lucky Hotels and Restaurants"
Share "Danve’s GANESH GENERAL STORES PEN"
Share "Danve’s GANESH GENERAL STORES PEN"
Share "Emmaus Medical & Counseling"
Share "Emmaus Medical & Counseling"
Share "Pools Now"
Share "Pools Now"
Modal title