android tutorial skillmaking

How To Create a Web View in Android App

How To Create a Web View in Android App

 

If you want to know that how to create a Web View in Android App then you should read this article till end. Here I will explain to you that how can you make a web view in your android app. I hope this article may helpful for you.



Activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="sumit.net.web.MainActivity">

<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
/>
</RelativeLayout>




 MainActivity.java

import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends ActionBarActivity {
private WebView myWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myWebView = (WebView)findViewById(R.id.webView);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView.loadUrl("http://example.com");
myWebView.setWebViewClient(new WebViewClient());
}

I hope this code will help you to create a web view in the Android app. If you got any solution by this code then you please share your thoughts about this article in the comment section. If you got any problem then also post a comment, i will try to give the answer them.



best seo tips for beginners

Best SEO Tips For Beginners: 2019

Best SEO Tips for Beginners: 2019

best seo tips for beginners



Are you a beginner in the blogging industry? Do you want to learn SEO? If your answer is yes then this is the right place for you. Because here I will share some SEO tip which may helpful for you. These tips are personally used by me. You should read these SEO tips. Here you will get all answers which may important for you. If you want to learn SEO then you should keep reading this article till the end.

 

  1. Never Compete With Big Website

If you want to compete with already rank website which has already high DA & PA then this is completely wrong for you. Because you have a new website that does not have any PA / DA. In a rank of a website, there are many factors works like website’s age, DA, PA, backlinks etc. But a new website hasn’t these all. So you shouldn’t try to beat a big website like ndtv, timesofindia etc. You should start with low competition. And when your website has enough backlinks and other SEO factors then you can beat a big website. But at the start, you should never try to beat big websites.

 

  1. Follow Your Passion

Every person has a passion which is very important in blogging. Because if you work in your passion then you can do definitely a good job.  This is very important for a blogger. You should choose your topic according to your interest. And you should also make your website with your interest. If your passion is traveling then you can start your blog where you can review the places. Then you can make a very interesting article which will be loved by people. So you should definitely start with your passion.



  1. You should Never Use Keyword Staffing

If you are using keyword stuffing in your website then you can’t rank on Google search results. So you should never use keyword staffing on your website. Keyword staffing meaning you use a keyword multiple times in your article. Google takes it like a spam.

  1. Create Backlinks for Your Blog

If your article ranked on Google in 3rd or 4th page or any other page and you want to rank your article at first page then you should create backlinks. Backlinks are very important to rank your website. Make sure that you should focus on quality backlinks, not for quantity backlinks. Make sure you should create backlinks in those websites who also have your topic. Many beginners do this mistake.

  1. You should use SEO plugin in your WordPress Website

If you haveSEMrush a WordPress website then you should use SEO plugin like Yoast. This is a very good plugin for SEO. By this plugin, you can easily create Meta description, Meta keyword, SEO title etc. This plugin checks your SEO score and readability score. This is a very helpful tool for beginners. You can use the free version of this plugin. If you have some money for investment then you should use the premium version of this plugin.

  1. Use Google Search Console

You should use Google Search Console for your website. It helps to know about your website’s traffic that which article has more traffic. Google Search Console is the totally free tool of everyone.

  1. Start Using Google Keyword Planner Tool

 

If you are a beginner then you should use the Google Keyword Planner Tool. Here you can get an idea that which keyword should you choose. This is very important that you should choose a searchable keyword. Here you should never choose high competition keyword. If you choose a high competition keyword then it is very difficult for you. So you choose low completion keyword. And you can add some extra word in your keyword. Ex.: you choose a keyword which is “mobile phone under 10000” here you can add words like “best mobile phone under 10000 in India”.



The conclusion of Best SEO Tips for Beginners

So if you are a beginner then you should use these tips. You should never compete with the big website, you should follow your passion, you should use SEO plugin, don’t use keyword stuffing in your article, you should create quality backlinks, you should use Google Search Console & Google Keyword Planner tool. So I hope this article may help you to learn about SEO. These tips are very important for every blogger. I hope you love this article. You should share your thoughts about this article in the comment section. If you have any query regarding this article then you should write a comment below.

If you want to learn digital marketing then you should join our facebook group: Digital Marketing SKILLMAKING Group

Why Digital Marketing Important for us?

How to Protect Your Website From Spam Comments?

Best SEO Tips For Beginners

SEMrush

how to write seo friendly article onpage seo

How To Write SEO Friendly Article (On Page SEO Tips): 2019

How To Write SEO Friendly Article (On Page SEO Tips): 2019

how to write seo friendly article onpage seo



If you are new in the digital marketing field and also want to learn digital marketing or blogging then you are in the right place. Here I will share my thoughts and strategies for beginners. If you also a beginner then you should definitely read this article till the end. After planning a keyword you have a big challenge that how to write SEO friendly article. We can say that how can we manage on page SEO. If you are also a beginner then you should read this article. Here I will explain you step by step that how to write SEO friendly article. I also use this strategy which I am going to explain. I hope it may help you to write your article. Here I will explain you in some points which are given below:

  • Firstly you should read some article which relates to your topic. It will increase your knowledge in that topic. Definitely, this is time-consuming. But it is very important that you have to good knowledge about that topic. It will help you to write long content.
  • After got some knowledge, you should start your article with your keyword. First heading of your article should be your main keyword. It will help you to rank properly. Your first heading plays an important role to get a rank in search results.

 

  • You should write at least 500 words in your article. It also plays an important role. Infect you should write knowledgeable content for your visitors. Because they need quality content.
  • You should use 2% keyword in your article. It always helps the search engine to find the keyword in your article. So we can say that this is an important factor in content writing.
  • You should use <h1> tag only for one time on a webpage. This is a very important point. You can use h2 to h6 tags at multiple times in your webpage. But h1 tag must be used at once in a single webpage.
  • You should use at least one image in 500 words. Make sure your image size should be less than 100kb. Because if you use an image of more than 100kb then it increases the load time of your website.
  • You should keep highlight your keywords in your article at least two times in an article. Use bold text and use italic to highlight your keyword. It helps to search engine’s crawler to find results.
  • You should add description and keyword in Meta tags. Or if you have a WordPress website then you should use Yoast plugin. This is the best for SEO. Here you can write focus keywords and description of Meta tags.
  • Now you should check plagiarism in your content. If you will get any plagiarism then you can go for paid tools. Because paid tools provide the best quality score. While free tool will never help you to find plagiarism. And this is very important that the article should be your own. Never copy it from another website.





Thus you can write SEO friendly article for your blog. Now the article is ready to publish. Thus you can write a good article. I hope you will get some knowledge from this article. If you have any thoughts in your mind or facing any problem in digital marketing then you can ask me freely in the comment section. I always try to give my best. If you also want to learn digital marketing or want to share your thought then you should join our Facebook Group by click on the link which is given below:

Digital Marketing SKILLMAKING Group


You can also check for:

Why Digital Marketing Important for us?

How to protect your website from spam comments?

How to Write SEO Friendly Article (Full On Page SEO) 2019



SEMrush

how to protect your website by spam comments

How To Protect Your Website From Spam Comments

How To Protect Your Website From Spam Comments?

how to protect your website by spam comments

Are you also facing a problem of spam comment? If your answer is ‘yes’ then keep reading this article. This is the right place for you. Here you will get the solution of your problem. So make sure you need to read this article with focus. Here I will explain to you that how can you protect your website by spam comments or we can say bots. So if you want to protect your website from spam comment then you should use Google Captcha. Google Captcha is the best way to protect your website from spam comments. If you want to use Google Captcha in comment section then you will never get any spam comments. Because Google Captcha verify that is the person is authentic. If Google verifies it then the person can submit the comment. Otherwise, the commenter cannot submit any comment.

 

So if you want to learn that how can you configure Google Captcha in your WordPress website then you should follow these steps which are given below:

Step 1:

Add a plugin Google Captcha (reCAPTCHA) by BestWebSof.

how to protect your website from spam comments



Step 2:

Activate the plugin.

how to protect your website form spam comments

Step 3:

Now Click on Settings.

how to protect your website from spam comments

SEMrush

Step 4:

Now Click on Get API Key as shown in the picture below.

how to protect your website from spam comments

Step 5:

Write your website’s domain name (As. Example.com). And select reCaptch v2.

how to protect your website from spam comments



Step 6:

Write your website name in the domain section. (As example.com)

how to protect your website from spam comments

Step 7:

Now copy the site key and secret key.

how to protect your website from spam comments

Step 8:

Now paste it in WordPress plugin (Google ReCaptcha)

how to protect your website from spam comments

Step 9:

Now click on save changes.

Step 10:

Now click on test reCaptcha.

how to protect your website from spam comments




Now you can see that your Google ReCaptcha will be installed in your website. Now if anybody wants to comment in your post. Then commenter will verify the captcha before submitting a comment. And also when you are going to login in your WordPress admin panel then you also get a captcha.

how to protect your website from spam comments

Thus you can increase your website’s security by using Google Captcha verification. I hope this article may help you solve your problem. I was also facing this problem on my website then I got this solution. This is one of the best solutions to bots. Hope you will enjoy this article. If you really enjoy this article and also get some interesting content for you then tell me your thoughts in the comment section. If you have any question or query then you can also ask me freely the in comment section. I will try to give the answer to them. If you are interested in Digital Marketing then you should join our Facebook Group by click below.

Digital Marketing SKILLMAKING Official

Why Digital Marketing Important for Us?

How To Protect Your Website From Spam Comments?



 

Importance of Digital Marketing

Why Digital Marketing Important for Us?

Why Digital Marketing Important for Us?

Importance of Digital Marketing



If you are new in this field of Digital Marketing and want to know the importance of Digital Marketing then you should read this article till the end. Here you can get all information about Digital Marketing importance. Most people don’t know about the importance of Digital Marketing. They try for getting some success in this field but they didn’t get it only the cause of some knowledge. Here I will share my experience that what is the importance of Digital Marketing for us.

As we can see that in this era everything is going to online. If you want to buy any product or any services you can get it online. So as you can see that it is very easy as compared to traditional shopping. While in traditional shopping you go to a shop in your market and you will fix the price and buy it. So you can see that digital marketing make it easy.

Importance of Digital Marketing for Students

Now we talk about our actual topic that why digital marketing is important for us. So if you are a student of professional then we can say that digital marketing may work effectively for both of you. Firstly we will talk about if you are a student then why digital marketing important to you. If you are a student of school level or college level then you can easily learn digital marketing and teach people about your favorite subject. Ex. If you are a student of 12th with PCM then if your physics is very strong then you can write some valuable content about a topic of physics. Just like that if you are in your college then you can also do it. And if you work properly then you can get Google Adsense approval. Once if you get approval then you can easily make money with teaching. So we can say that it may help you.



Importance of Digital Marketing for Professionals

If you are a professional or a business owner then you can also get benefits with digital marketing. If you have a business then you can easily promote it online. As you can see that every person live active online like social media etc. You can promote your business online with Facebook, Instagram, google search and other platforms. Here you can promote your product in the bases of interest and behavior of people. While in traditional marketing then we can’t promote our business on the basis of interest and behavior. Ex. You run a training institute where you provide training for engineers then if you go for traditional marketing then you can’t get a targeted audience. If you place an ad in a newspaper then the newspaper agency will charge you a high pay. And you also know that the newspaper goes to every home but you also know that every home hasn’t an engineer while you know that you want to promote your training institute only for engineers. While you know that newspaper ad will appear only for one day. And after one day your ad will go to in rough. While if you use digital marketing to promoting your training institute then your ad will appear in the front of all engineers with a separate age group. As you know that a 50 years old person doesn’t want to get training then why should we appear our ad in front of those people? In the digital marketing, we can decide that our ad should appear only in the front of a separate age group like 18-22 years old age group. So we can say that digital marketing is effective for business promotion.

Hope you will get the answer of why digital marketing important for us? If you get this some information from this article then please share your thoughts in the comment section. Thank you.

If you want to learn Digital Marketing then you should join this facebook group by click below:

Digital Marketing SKILLMAKING Official

Importance of Digital Marketing



digital marketing in khatima

Digital Marketing in Khatima | SEO in Khatima

Digital Marketing in Khatima | SEO in Khatima

digital marketing in khatima




If you want to get services of digital marketing in Khatima then this is the right place for you. I hope this article may help to you. Because here you can get all information about digital marketing. If you are a business owner and want to use digital marketing for your business then you should read this article. Here I will explain you all about digital marketing. Here I will consider all the key points which you should know most. Here I will explain you like what is digital marketing, why digital marketing is important for you, the benefits of digital marketing, where could you get services of digital marketing in Khatima.

What is Digital Marketing?: Digital Marketing in Khatima

This is the first step for you to know about digital marketing. If you are new in digital marketing and also want to know about digital marketing then you should read this article. Here you can get a short introduction to Digital Marketing. If you already know about digital marketing then you can skip this paragraph.

Digital marketing is a strategy to promote your business, brand, products, and service in an efficient way. You can easily promote your business with cost-effectively through digital marketing. This is the best way of promotion. You can reach to your targeted audience for your product or services. We can say that this era is all about digital marketing. If you want to get promotion of your product or service then you should definitely use digital marketing strategy. This can easily promote your business online. Everybody knows that most audience is active in online activities like facebook, Instagram, google etc. Infect if you go to a new city where you don’t know about anything then what do you do firstly. 99% peoples search for it in Google. And google suggests you for anything which you want. These things can be services or products etc. Like hotel service, restaurant services, schools facilities, coaching institutes etc. So you can use digital marketing for all of them. So if you want to get Digital Marketing in Khatima then you should read this article till end.



Why Digital Marketing? : Digital Marketing in Khatima

Everybody asks this question that why we should use digital marketing. If we divide marketing strategy into two parts, first one is traditional marketing and the second one is digital marketing. Then we get that digital marketing is more cost effective as compared to traditional marketing. Let suppose, if you are an owner of a hotel and you make an advertisement in the newspaper. It will pay a huge amount to the newspaper agency. They will give your hotel’s ad in their newspaper for one day. The newspaper goes to every home in your city but as you know that the person who lives in your city will never come to your hotel for room service. As you, that newspaper will go to every home but some people do not interested in your ads. And you know that your hotel services will be used by a traveler who comes from the different city. A traveler always checks the hotel in Google. He will search that “best hotel in Khatima” and he found some results of best hotels. If your hotel’s website appears on the first page or in the top 5 results then he will definitely come to your hotel and use your hotel services. This work can be done by digital marketing. If you want to get service of Digital Marketing in Khatima then you should contact us.

Benefits of Digital Marketing: Digital Marketing in Khatima

As you read above that how digital marketing is important for us. Digital Marketing has a lot of benefits. Some benefits are given below which may help you to know more about the use of digital marketing.

  • You can promote your brand, business, product, and services online.
  • Digital Marketing makes the global reach.
  • Digital Marketing works in interest and behavior of the audience.
  • Digital Marketing increases your engagement.
  • Digital Marketing increases the conversion rate for your business.
  • Digital Marketing makes you more competitive.
  • Digital Marketing provides the low barrier.

So these are some benefits of Digital Marketing. Also, many other benefits are available in digital marketing.  Hope it will helpful for you.



Where could you get services of Digital Marketing in Khatima?

If you are a business owner in Khatima and also want to get digital marketing services in khatima then you should read this article till end. If you want to promote your product, brand, or services in khatima then you should choose SKILLMAKING. SKILLMAKING is the best way to promote your business in Khatima. If you have a hotel, restaurant, school, training institute, other educational institutes etc. and also want to use digital marketing for promote them. Then SKILLMAKING is the best option for you. Many other services of digital marketing in Khatima are also available but SKILLMAKING is the best way. This is very important that you should choose an experienced digital marketer to promote your business online. Because an experienced person can manage easily. SKILLMAKING has well experienced digital marketers who can easily promote your business online. SKILLMAKING has Google Certification. You can check, SKILLMAKING also worked for Cetpa Infotech Pvt. Ltd. Roorkee. This is a training company in Roorkee. Website of Cetpa Infotech is http://traininginroorkee.com . It is rank in many keywords like “Training in Roorkee”, “Java Training in Roorkee”, “Android Training in Roorkee”, “PHP Training in Roorkee” etc.

SKILLMAKING also provides these facilities which are given below:

  • Digital Marketing in Khatima
  • SEO in Khatima
  • SEM in Khatima
  • Search Engine Optimization in Khatima
  • Online promotion in Khatima
  • Website Designing in Khatima
  • Website Development in Khatima

NOTE: This Digital Marketing Service is owned by the residential person of Khatima.

So if you are planning to promote yor business online then you should contact SKILLMAKING. Our contact information is given below:

Name: SUMIT SINGH

Company: SKILLMAKING

Email: [email protected] & [email protected]

Phone: 7500893874 & 7906818313

Website: https://skillmaking.com

Digital Marketing in Khatima

Sumit Google Digital Unlocked Certificate

You can verify this certificate by Click Here




android tutorial skillmaking

How to Create Splash Screen in Android

How to Create Splash Screen in Android





If you are an android developer. And also want to learn that how to create splash screen in Android then you should read this article till end. Here you can get all information with coding about splash screen in android.

If you want to create an android app who has also Splash screen then you should read this article which is given below. You need two activities. The fist one is used to create a splash screen and the second one is used to create a activity_main.xml

Step 1:

Create two activities. First one is activity_main.xml and the second one is activity_second.xml.

Step 2:

Copy an image and paste into a drawable folder.

Step 3:

Set the background image in activity_main.xml.



Step 4:

Open MainActivity.java and write this code.

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent i=new Intent(MainActivity.this,Second.class);
                startActivity(i);
            }
        },3000);
    }
}

Step 5:

Run this app in your mobile.



Output:

splash screen in android

Note: Random Number Generator

AutoComplete Text View

Alert Dialog Box in Android

modi

15 अगस्त से भारत में मोदी सरकार लागू कर रही है नया नियम, नही मानने पर होगी जेल

15 अगस्त से भारत में मोदी सरकार लागू कर रही है नया नियम, नही मानने पर होगी जेल

modi



जैसा कि हम सभी जानते हैं अभी केंद्र में मोदी की सरकार हैं और सरकार द्वारा लगाए गए सभी नियम सभी लोगों के लिए मान्य होते हैं. पिछले साल हुए उत्तर प्रदेश के विधानसभा चुनाव में मोदी सरकार ने जबरदस्त जीत हासिल करके योगी आदित्यनाथ को मुख्यमंत्री बनाया था.

yogi

योगी आदित्यनाथ ने उत्तर प्रदेश में ऐलान किया है कि 15 अगस्त से कोई भी व्यक्ति पॉलिथीन का उपयोग करते हुए पाया गया तो से जेल की हवा खानी पड़ सकती है. यही नहीं यह नियम आने वाले समय में देश में एक साथ लागू किया जा सकता है.

jail

पॉलीथिन उपयोग करने वाले व्यक्ति को 8 महीने की सजा हो सकती है. योगी सरकार का कहना है कि बढ़ते प्रदूषण को रोकने के लिए इस नियम को लागू किया गया है.

jail



दोस्तों इस नियम के बारे में आपका क्या कहना है, हमें कमेंट करके जरूर बताएं. योगी आदित्यनाथ के अभी तक के कामों को आप कैसे देखते हैं. क्या सरकार अच्छा काम कर रही है. हमें अपनी राय जरूर बताएं.

आप किस पार्टी को सबसे अच्छा मानते हैं और क्यों मानते हैं.

उत्तर प्रदेश के लिए सबसे अच्छा कार्य किसने किया है. योगी आदित्यनाथ, अखिलेश यादव, या मायावती आप अपने विचार हमें कमेंट में बताएं.

 



jio phone 1 to jio phone 2 exchange

Jio Phone 1 को Jio Phone 2 में कैसे बदलें ? जरूर पढ़ें |

Jio Phone 1 को Jio Phone 2 में कैसे बदलें ? जरूर पढ़ें |

jio phone 1 to jio phone 2 exchange

 

तो आख़िरकार आज जिओ ने अपना जिओ फ़ोन २ लांच कर दिया है. लेकिन अगर अभी भी आपके पास  Jio Phone 1 है और आप सोच रहे है की Jio Phone 1 को  Jio Phone 2 में कैसे एक्सचेंज करना है तो आपको इसके बारे में यहाँ साडी जानकारी मिल जाएगी |




 

 

 

क्या आप Jio Phone 1 को Jio Phone 2 में चेंज करा सकते है ?

तो यहाँ पर जिओ ने बताया है की 21 जुलाई से उसका मानसून ऑफर स्टार्ट हो रहा है | इसमें जिओ का कहना है की जिसके पास भी कोई भी पुराना फ़ोन है चाहे वो किसी भी कंपनी का हो उसे वो 501 रूपए देकर Jio Phone 1 में चेंज करा सकते है, याद रहे Jio Phone 1 मिलेंगे Jio Phone 2 नहीं | तो हम ये कह सकते है की ये ऑफर सिर्फ उन लोगो के लिए है तो अभी तक पुराने फीचर फ़ोन इस्तेमाल कर रहे थे | तो वो सभी लोग 501 रूपए देकर Jio Phone 1 ले सकते है|

क्या तीन साल बाद Jio Phone 2  के बदले 2999 रूपए वापस मिलेंगे ?

Jio Phone 2 आपको 2999 रूपए में मिलेगा | और ये बात ध्यान रहे की अगर आप Jio Phone 2 लेते है तो ये 2999 रूपए आपको देना है और ये रूपए आपको तीन साल बाद वापस नहीं होंगे |




क्या Jio Phone 1 मिलना बंद हो जायेगा ?

आप किसी भी जिओ फ़ोन के स्टोर में जाकर Jio Phone 1 ले सकते है 1500 रूपए में | इसका मतलब Jio Phone 1 मिलना बंद नहीं होगा | और आप तीन साल बाद Jio Phone 1  को वापस देकर अपने 1500 रूपए वापस ले सकते है |

एक बात ध्यान रहे अगर आप अपने किसी और कंपनी के फीचर फ़ोन के साथ 501 रूपए देकर Jio Phone 1 लेते हैं तो आपको तीन साल बाद 501 रूपए वापस नहीं होंगे |

android tutorial skillmaking

How to Create Alert Dialog Box in Android

How to Create Alert Dialog Box in Android

If you want to create an Alert Dialog Box in android then you should read this article till end. Here you can get all the information about this topic.



activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="sumit.net.alert_dialog.MainActivity">

    <Button
        android:layout_width="150dp"
        android:layout_height="50dp"
        android:id="@+id/btn1"
        android:text="exit"
        android:textSize="22dp"
        android:layout_alignParentTop="true"
        android:layout_alignParentStart="true"
        android:layout_marginStart="89dp"
        android:layout_marginTop="193dp" />

</RelativeLayout>




MainActivity.java

package sumit.net.alert_dialog;

import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {
Button b1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        b1=(Button)findViewById(R.id.btn1);
        new AlertDialog.Builder(MainActivity.this)
                .setIcon(R.mipmap.ic_launcher)
                .setTitle("game")
                .setMessage("do you want surf this page")
                .setPositiveButton("Yes",null)
                .setNegativeButton("No", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent i=new Intent(MainActivity.this,Splash.class);
                startActivity(i);
            }
        }).show();
        b1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                new AlertDialog.Builder(MainActivity.this)
                        .setIcon(R.mipmap.ic_launcher)
                    .setTitle("Exit")
                        .setMessage("do you want exit")
                        .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                finish();
                            }
                        }).setNegativeButton("No",null)
                        .show();


            }
        });
    }

    @Override
    public void onBackPressed() {
        new AlertDialog.Builder(MainActivity.this)
                .setIcon(R.mipmap.ic_launcher)
                .setTitle("game")
                .setMessage("dO you want exit this application")
                .setPositiveButton("yes", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        moveTaskToBack(true);

                    }
                }).setNegativeButton("no",null)
                .show();

    }
}




OUTPUT

dialog box in android alert dialog box in android