How to Convert Website into Android Application step by step with addmob adds | DastgeerTech

Saturday, August 4, 2018

How to Convert Website into Android Application step by step with addmob adds

Project Source code

Screen shot

Complete website convert into android app with Admob adds

1 step: create new project in android studio
2 step:Open activity_main.xml (or) main.xml,
create application interface and add webview element to it.
and copy paste code 

<RelativeLayout xmlns:android="" xmlns:app="" xmlns:tools="" xmlns:ads="" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="">
<WebView android:layout_below="@+id/adView" android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent" >
< xmlns:ads="" android:id="@+id/adView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" ads:adSize="SMART_BANNER" ads:adUnitId="ca-app-pub-6638829118614493/4690341639">

Step 3:  Open

import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActivity {
private AdView mAdView;
WebView webView;
public void onBackPressed() {
if (webView.canGoBack()) {
} else {
@Override protected void onCreate(Bundle savedInstanceState) {
webView = (WebView) findViewById(;
WebSettings webSettings = webView.getSettings();
webView.setWebViewClient(new WebViewClient());
mAdView = findViewById(;
AdRequest adRequest = new AdRequest.Builder().build();
Step 4: Open AndroidManifest.xml file 
and give internet permission to it just after the package name. 
It is important because app data will load from website.

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>

Step 5: open strings.xml
change adunit id

<string name="app_name">DastgeerTech</string>
<string name="banner_ad_unit_id">ca-app-pub-6638829118614493/4690341639</string>
<string name="click_here">click here</string>
Step 6 : open the app-level build.gradle file for your app, and look for a "dependencies" section.
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation ''
    implementation ''}
Add the line in bold above
Click here :Website To Android App - Material Design | Full Applications With Admob

  1. It turns out that even the hottest port has a few places where you can get off the beaten path. Here are some recommendations that will make you feel like you're in the know

  2. This particular papers fabulous, and My spouse and i enjoy each of the perform that you have placed into this. I’m sure that you will be making a really useful place. I has been additionally pleased. Good perform! realizzazione e commerce san marino

  3. So I followed your directions: No success yet The app when loaded on a phone goes to open the closes. Cahned the admob codes and the website address which is What else needs to be changed to allow it to Convert Website Into Android Application?? appreciate some help as new to apps



Whatsapp Button works on Mobile Device only