Latest Updated Deals
thumbnail

Webview call action, zoom option and download option in android studio


Buy Now

WebView call action:

 webView.setWebViewClient(new WebViewClient(){

    @Override
public boolean shouldOverrideUrlLoading(WebView wView, String url)
{

if (url.startsWith("mailto:") || url.startsWith("tel:") || url.startsWith("geo:")) {

Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse(url));

startActivity(intent);

return true;

} else if (url.startsWith("whatsapp:")) {

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
sendIntent.setPackage("com.whatsapp");

startActivity(sendIntent);

return true;

}

return false;
}
});

Webview zoom option:


webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setLayoutAlgorithm(webView.getSettings().getLayoutAlgorithm());
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setEnableSmoothTransition(true);

Enable download option in webview:
Java:
webView.setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(final String url, final String userAgent, String contentDisposition, String mimetype, long contentLength) {
//Checking runtime permission for devices above Marshmallow.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (checkSelfPermission(android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
== PackageManager.PERMISSION_GRANTED) {
Log.v("WebBrowser", "Permission is granted");
downloadDialog(url, userAgent, contentDisposition, mimetype);

} else {

Log.v("WebBrowser", "Permission is revoked");
//requesting permissions.
ActivityCompat.requestPermissions(Web_browser.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);

}
} else {
//Code for devices below API 23 or Marshmallow
Log.v("WebBrowser", "Permission is granted");
downloadDialog(url, userAgent, contentDisposition, mimetype);

}
}
});

add more:


        String[] permissionsStorage = {Manifest.permission.READ_EXTERNAL_STORAGE};
        int requestExternalStorage = 1;
        int permission = ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);
        if (permission != PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(this, permissionsStorage, requestExternalStorage);
        }
        
        if(!isNetworkAvailable(Web_browser.this)){
            webView.setVisibility(View.GONE);
            layNonet.setVisibility(View.VISIBLE);
        }else{
            webView.setVisibility(View.VISIBLE);
            layNonet.setVisibility(View.GONE);
        }

Manifest: 
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="ANDROID.PERMISSION.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />










thumbnail

How to store Data Offline ( Shared Preferences)


Buy Now

 First 

Activity xml 

Make a layout that you want 

I take the linear layout


Then 

MainActivity.Java

EditText edname,edmail,ednum;
TextView tvdisplay;
Button bsave;
/////////
SharedPreferences sharedPreferences;
SharedPreferences.Editor editor;

///////



edname = findViewById(R.id.edname);
edmail = findViewById(R.id.edmail);
ednum = findViewById(R.id.ednum);
tvdisplay = findViewById(R.id.tvdisplay);
bsave = findViewById(R.id.bsave);

sharedPreferences = getSharedPreferences(""+getString(R.string.app_name),MODE_PRIVATE);
editor = sharedPreferences.edit();


bsave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String name = edname.getText().toString();
editor.putString("name",""+name+"\n");
String mail = edmail.getText().toString();
editor.putString("mail",""+mail+"\n");
String num = ednum.getText().toString();
editor.putString("num",""+num+"\n");

editor.apply();
}
});


tvdisplay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String name = sharedPreferences.getString("name","Defult value"+"\n");
String mail = sharedPreferences.getString("mail","Defult value"+"\n");
String num = sharedPreferences.getString("num","Defult value"+"\n");


tvdisplay.setText(name+mail+num);
}
});







thumbnail

How to use facebook audience network in android


Buy Now

fb ad implementation


    implementation 'com.facebook.android:audience-network-sdk:6.+'

gradle.properties

(เฆเฆ‡  เฆ•োเฆก เฆŸি gradle.properties เฆฌเฆธাเฆคে เฆนเฆฌে।)

android.enableJetifier=true


internet permition manifests

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

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

เฆญেเฆฐিเงŸেเฆฌเฆฒ

LinearLayout banner_container;

private AdView adView;

private InterstitialAd interstitialAd;

porecoy porbo

banner_container = findViewById(R.id.banner_container);

interstitialAd = new InterstitialAd(MainActivity.this,getString(R.string.fb_instid));

adView = new AdView(MainActivity.this,getString(R.string.fb_banrid), AdSize.BANNER_HEIGHT_50);


initialize

AudienceNetworkAds.initialize(MainActivity.this);


bnr load 

banner_container.addView(adView);

adView.loadAd();

xml code

(เฆเฆ‡  เฆ•োเฆก เฆŸি เฆฏেเฆ–াเฆจে เฆฌেเฆจাเฆฐ เฆเฆก เฆฆেเฆ–াเฆคে เฆšাเฆจ เฆธেเฆ‡ เฆ–াเฆจে เฆฌเฆธাเฆคে เฆนเฆฌে।)

<LinearLayout

android:id="@+id/banner_container"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_alignParentBottom="true"

android:orientation="vertical"

app:layout_constraintBottom_toBottomOf="parent"

>

</LinearLayout>

java code

(เฆเฆ‡  เฆ•োเฆก เฆŸি เฆธেเฆŸ เฆ•เฆจ্เฆŸেเฆจ เฆญিเฆ‰  เฆเฆฐ  เฆถেเฆทেเฆฐ เฆธেเฆ•েเฆจ্เฆก เฆฌ্เฆฐেเฆ•েเฆŸেเฆฐ เฆ‰เฆชเฆฐে เฆฌเฆธাเฆคে เฆนเฆฌে।)

private void showInterstitialAd() {

        InterstitialAdListener interstitialAdListener = new InterstitialAdListener() {

            @Override

            public void onInterstitialDisplayed(Ad ad) {


            }


            @Override

            public void onInterstitialDismissed(Ad ad) {


            }


            @Override

            public void onError(Ad ad, AdError adError) {


            }


            @Override

            public void onAdLoaded(Ad ad) {

                //interstitialAd.show();


            }


            @Override

            public void onAdClicked(Ad ad) {


            }


            @Override

            public void onLoggingImpression(Ad ad) {


            }

        };


        interstitialAd.loadAd(

                interstitialAd.buildLoadAdConfig()

                        .withAdListener(interstitialAdListener)

                        .build());

    }

thumbnail

Back Pressed Button to Exit Android studio


Buy Now
///====================================================

private static final int TIME_INTERVAL = 2000; // # milliseconds, desired
private long mBackPressed;

// When user click bakpress button this method is called

@Override
public void onBackPressed() {
// When user press back button

if (mBackPressed + TIME_INTERVAL > System.currentTimeMillis()) {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

} else {

Toast.makeText(getBaseContext(), "Press again to exit",
Toast.LENGTH_SHORT).show();
}

mBackPressed = System.currentTimeMillis();



} // end of onBackpressed method 


                  Another One




@Override
public void onBackPressed() {
//super.onBackPressed();

new AlertDialog.Builder(MainActivity.this)
.setTitle("Do you want to exit!")

.setNegativeButton("No Yaar!", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
})
.setPositiveButton("Yea Bro!", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
finish();
}
})

.show();




}



thumbnail

Android Navigation Drawer | Custom Navigation Drawer | Create Navigation Drawer Activity


Buy Now

 Xml Code

      
      <?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout 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"
    android:id="@+id/drawer_layout"
    tools:context=".MainActivity">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >
        <LinearLayout
            android:id="@+id/appBar"
            android:layout_width="match_parent"
            android:layout_height="?actionBarSize"
            android:background="?attr/colorPrimary"
            android:gravity="center_horizontal"
            android:orientation="horizontal"
            android:paddingStart="15dp"
            android:paddingEnd="15dp"
            android:visibility="visible">

            <ImageView
                android:id="@+id/imageMenu"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_gravity="center"
                android:src="@drawable/ic_menu"
                app:tint="#FFFFFF" />

            <TextView
                android:id="@+id/textTitle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginLeft="15dp"
                android:text="@string/app_name"
                android:textColor="@color/white"
                android:textSize="18sp"
                android:textStyle="bold" />

        </LinearLayout>
        
    </RelativeLayout>


    <com.google.android.material.navigation.NavigationView
        android:id="@+id/nav_View"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        app:headerLayout="@layout/drawar_head_layout"
        app:menu="@menu/navigation_menu" />

</androidx.drawerlayout.widget.DrawerLayout>
      
      

Now Create a Menu folder / Directroy And Also create menu Resorces

MENU
      
      <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

    <group
        android:id="@+id/group1"
        android:checkableBehavior="single">
        <item android:title="Task">
            <menu>

                <item
                    android:id="@+id/mHome"
                    android:icon="@drawable/ic_menu"
                    android:title="Home" />

                <item
                    android:id="@+id/mShare"
                    android:icon="@drawable/ic_menu"
                    android:title="Share" />

                <item
                    android:id="@+id/mDashboard"
                    android:icon="@drawable/ic_menu"
                    android:title="Dashboard" />

                <item
                    android:id="@+id/mRate"
                    android:icon="@drawable/ic_menu"
                    android:title="Rate Me" />

            </menu>

        </item>

    </group>

    <group
        android:id="@+id/group2"
        android:checkableBehavior="single">
        <item android:title="More App">

            <menu>
                <item
                    android:id="@+id/shareapp"
                    android:icon="@drawable/ic_menu"
                    android:title="Share App" />

                <item
                    android:id="@+id/Policy"
                    android:icon="@drawable/ic_menu"
                    android:title="Policy" />
            </menu>

        </item>

    </group>
    
</menu>
      
      
Header Layout
      
      <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto">


    <LinearLayout
        android:layout_marginBottom="15dp"
        android:layout_marginTop="25dp"
        android:id="@+id/drawarHeader"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        >

        <ImageView
            android:layout_marginLeft="10dp"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:src="@mipmap/ic_launcher"
            />

        <LinearLayout
            android:layout_gravity="center"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            >
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="?attr/colorPrimary"
                android:textStyle="bold"
                android:text="@string/app_name"
                android:layout_marginLeft="10dp"
                android:textSize="20sp"
                />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#AE000000"
                android:text="@string/app_name"
                android:layout_marginLeft="10dp"
                android:textSize="18sp"
                />

        </LinearLayout>

    </LinearLayout>

    <View
        android:elevation="5dp"
        android:layout_below="@id/drawarHeader"
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:background="#43000000"
        />

</RelativeLayout>
      
      

Follow the code and set this code in your Drawer Activity

Java
      
      public class MainActivity extends AppCompatActivity {

    DrawerLayout drawerLayout;
    NavigationView navigationView;
    ActionBarDrawerToggle toggle;

    ImageView imageMenu;


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

        // Navagation Drawar------------------------------
        drawerLayout = findViewById(R.id.drawer_layout);
        navigationView = findViewById(R.id.nav_View);
        imageMenu = findViewById(R.id.imageMenu);

        toggle = new ActionBarDrawerToggle(MainActivity.this, drawerLayout, R.string.open, R.string.close);
        drawerLayout.addDrawerListener(toggle);
        toggle.syncState();
        //getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        // Drawar click event
        // Drawer item Click event ------
        navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem item) {

                switch (item.getItemId()) {
                    case R.id.mHome:
                        Toast.makeText(MainActivity.this, "Clicked", Toast.LENGTH_SHORT).show();
                        drawerLayout.closeDrawers();
                        break;

                    case R.id.mShare:
                        Toast.makeText(MainActivity.this, "Facebook", Toast.LENGTH_SHORT).show();
                        drawerLayout.closeDrawers();
                        break;

                }

                return false;
            }
        });
        //------------------------------

        // ------------------------
        // App Bar Click Event
        imageMenu = findViewById(R.id.imageMenu);

        imageMenu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                // Code Here
                drawerLayout.openDrawer(GravityCompat.START);
            }
        });


        // ------------------------


    } // OnCreate Method Close here ==============

} // Public Class CLose Here =====================
      
      

PLace that is in  string:
<string name="open"></string>
<string name="close"></string>
Video Link: https://youtu.be/9vXLHqqSFC8
thumbnail

How to implement intersial and Banner ads in android studio


Buy Now



string........................add


<resources>

    <string name="app_name">My Application</string>



    <!-- Admob AD ON or OFF -->

    <string name="show_admob_ad">ON</string>


    <!-- Device ID  setTestDeviceIds (search on logcat for device id) -->

    <string name="device_id">ABCD</string>


    <!-- Admob APP ID HERE -->

    <string name="admob_APP_ID">ca-app-pub-3940256099942544~3347511713</string>

    <!-- Admob Ad Unit IDS Here -->

    <string name="admob_INTERSTITIAL_UNIT_ID">ca-app-pub-3940256099942544/1033173712</string>

    <string name="admob_BANNER_UNIT_ID">ca-app-pub-3940256099942544/6300978111</string>

</resources>


_____________________________________________________________________________________________


dependencies..................add



    //admob

    implementation 'com.google.android.gms:play-services-ads:20.5.0'



___________________________________________________________________________________________________


manifest............................add



  <meta-data

            android:name="com.google.android.gms.ads.APPLICATION_ID"

            android:value="@string/admob_APP_ID" />


____________________________________________________________________________



activity_main..........................add



   <Button

        android:id="@+id/bottom"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_centerHorizontal="true"

        android:layout_centerVertical="true"

        android:text="butttom" />


    <com.google.android.gms.ads.AdView

        xmlns:ads="http://schemas.android.com/apk/res-auto"

        android:id="@+id/adView"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_centerHorizontal="true"

        android:layout_alignParentBottom="true"

        ads:adSize="BANNER"

        ads:adUnitId="@string/admob_BANNER_UNIT_ID">

    </com.google.android.gms.ads.AdView>


_________________________________________________________________




MainActivity......................add


import androidx.annotation.NonNull;

import androidx.appcompat.app.AppCompatActivity;


import android.content.Intent;

import android.os.Bundle;

import android.view.View;

import android.widget.Button;


import com.google.android.gms.ads.AdListener;

import com.google.android.gms.ads.AdRequest;

import com.google.android.gms.ads.AdView;

import com.google.android.gms.ads.FullScreenContentCallback;

import com.google.android.gms.ads.LoadAdError;

import com.google.android.gms.ads.MobileAds;

import com.google.android.gms.ads.RequestConfiguration;

import com.google.android.gms.ads.initialization.InitializationStatus;

import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;

import com.google.android.gms.ads.interstitial.InterstitialAd;

import com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback;


import java.util.Arrays;

import java.util.List;



public class MainActivity extends AppCompatActivity {


    AdView mAdView;

    Button bottom;

    public static int CategoryClicked = -10;


    protected void onCreate(Bundle savedInstanceState) {


        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);


        mAdView = findViewById(R.id.adView);

        bottom = findViewById(R.id.bottom);

        mAdView.setVisibility(View.GONE);


        if (getString(R.string.show_admob_ad).contains("ON")){

            initAdmobAd();

            loadBannerAd();

            loadFullscreenAd();


        }


        bottom.setOnClickListener(new View.OnClickListener() {

            @Override

            public void onClick(View view) {


                Intent myinten = new Intent(MainActivity.this,MainActivity2.class);

                startActivity(myinten);

                //We are tracking the category postion. So that we can call the intent after ad loads



                if (mInterstitialAd==null){


                    startActivity(new Intent(MainActivity.this, MainActivity2.class));

                }else{

                    mInterstitialAd.show(MainActivity.this);

                }

            }

        });





    }



    int BANNER_AD_CLICK_COUNT =0;

    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    private void loadBannerAd(){

        AdRequest adRequest = new AdRequest.Builder().build();

        mAdView.loadAd(adRequest);

        mAdView.setAdListener(new AdListener() {

            @Override

            public void onAdLoaded() {

                // Code to be executed when an ad finishes loading.

                if (BANNER_AD_CLICK_COUNT >=3){

                    if(mAdView!=null) mAdView.setVisibility(View.GONE);

                }else{

                    if(mAdView!=null) mAdView.setVisibility(View.VISIBLE);

                }

            }


            @Override

            public void onAdFailedToLoad(LoadAdError adError) {

                // Code to be executed when an ad request fails.

            }


            @Override

            public void onAdOpened() {

                // Code to be executed when an ad opens an overlay that

                // covers the screen.

            }


            @Override

            public void onAdClicked() {

                // Code to be executed when the user clicks on an ad.

                BANNER_AD_CLICK_COUNT++;


                if (BANNER_AD_CLICK_COUNT >=3){

                    if(mAdView!=null) mAdView.setVisibility(View.GONE);

                }


            }


            @Override

            public void onAdClosed() {

                // Code to be executed when the user is about to return

                // to the app after tapping on an ad.

            }

        });


    }

    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>




    // loadFullscreenAd method starts here.....

    InterstitialAd mInterstitialAd;


    private void loadFullscreenAd(){


        //Requesting for a fullscreen Ad

        AdRequest adRequest = new AdRequest.Builder().build();

        InterstitialAd.load(this,getString(R.string.admob_INTERSTITIAL_UNIT_ID), adRequest, new InterstitialAdLoadCallback() {

            @Override

            public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {

                // The mInterstitialAd reference will be null until

                // an ad is loaded.

                mInterstitialAd = interstitialAd;


                //Fullscreen callback || Requesting again when an ad is shown already

                mInterstitialAd.setFullScreenContentCallback(new FullScreenContentCallback(){

                    @Override

                    public void onAdDismissedFullScreenContent() {

                        // Called when fullscreen content is dismissed.

                        //User dismissed the previous ad. So we are requesting a new ad here

                        loadFullscreenAd();


                        if (CategoryClicked>=0){

                            startActivity(new Intent(MainActivity.this, MainActivity2.class));

                        }


                    }


                }); // FullScreen Callback Ends here



            }

            @Override

            public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {

                // Handle the error

                mInterstitialAd = null;

            }


        });


    }

    // loadFullscreenAd method ENDS  here..... >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



    private void initAdmobAd(){


        if (getString(R.string.device_id).length()>12){

            //Adding your device id -- to avoid invalid activity from your device

            List<String> testDeviceIds = Arrays.asList(getString(R.string.device_id));

            RequestConfiguration configuration =

                    new RequestConfiguration.Builder().setTestDeviceIds(testDeviceIds).build();

            MobileAds.setRequestConfiguration(configuration);

        }





        //Init Admob Ads

        MobileAds.initialize(this, new OnInitializationCompleteListener() {

            @Override

            public void onInitializationComplete(InitializationStatus initializationStatus) {

            }

        });


    }


}





 

thumbnail

How to place Navigation Bar In android Studio Full Tutorials


Buy Now

Create Drawable in New to Resource File:

Name: item_selector:


<selector xmlns:android="http://schemas.android.com/apk/res/android">


<item android:state_pressed="true"
android:color="@color/white"
/>

<item android:state_checked="true"
android:color="@color/white"
/>

<item android:color="#08B2FF"/>

</selector>


And also take the Button Image in Drawable.


Create New Directory:

Click on Right Button:

rec-->New-->Directory-->menu

item_menu


<menu xmlns:android="http://schemas.android.com/apk/res/android">


<item android:id="@+id/home"
android:icon="@drawable/home"
android:title="Home"
/>

<item android:id="@+id/moreapps"
android:icon="@drawable/more_apps"
android:title="More Apps"
/>

<item android:id="@+id/share"
android:icon="@drawable/share"
android:title="Share"
/>

<item android:id="@+id/update"
android:icon="@drawable/update"
android:title="Update"
/>

<item android:id="@+id/subscribe"
android:icon="@drawable/subscribe"
android:title="Subscribe"
/>

</menu>


Place it in Main Activity: XML 


<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>


<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/golbutton"
app:itemIconTint="@drawable/item_selector"
app:itemRippleColor="@android:color/transparent"
app:labelVisibilityMode="labeled"
app:itemTextColor="@color/black"
app:menu="@menu/item_menu"
/>

</RelativeLayout> 


//-------------------------------

Make it identity: /
Porichoy Korte hobe:
BottomNavigationView bottomNavigationView;


bottomNavigationView = findViewById(R.id.bottomNavigationView);

bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {

switch (item.getItemId()){

case R.id.home:
Toast.makeText(MainActivity.this, "Home",Toast.LENGTH_SHORT).show();
break;

case R.id.moreapps:

try {
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("https://play.google.com/store/apps/developer?id=STROPURBO")));
}catch (ActivityNotFoundException e){
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("https://play.google.com/store/apps/details?id="+getPackageName())));
}
break;

case R.id.update:

try {
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id="+getPackageName())));
}catch (Exception e){

}
break;



case R.id.share:

try {

Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_SUBJECT, "SSC Board Questions");
i.putExtra(Intent.EXTRA_TEXT, "https://play.google.com/store/apps/details?id=" + getApplicationContext().getPackageName());
startActivity(Intent.createChooser(i, "Share"));

}catch (Exception e){

}
break;

case R.id.subscribe:

try {
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("https://www.youtube.com/c/STROpurbo/")));
}catch (Exception e){

}
break;




}


return true;
}
});




thumbnail

How to implement Rate Us in android/ Intent View any website


Buy Now

Type:

 i = new Intent(Intent.ACTION_VIEW , Uri.parse("market://details?id=com.bet.compny"));

startActivity(i);
break;

You can use shortcut:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + APP_PNAME)));


Link Rate us button:

rateus.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+getPackageName())));

}catch (ActivityNotFoundException e){
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("https://play.google.com/store/apps/details?id="+getPackageName())));
}

}
});


Free Tips:

Show others page view place it on :
Main Activity:


ban1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(bangla1st.this, pdfact1.class);

startActivity(intent);
}
});


Place In java Second Activity Class:


   PDFView pdfView;


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

pdfView = findViewById(R.id.pdfview);


Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://drive.google.com/file/d/16U1Xy3vhchzAhn8rzv9BP77JOckUNRGK/view"));
startActivity(browserIntent);

}

}