diff --git a/app/build.gradle b/app/build.gradle
index 8e00074..18ab8f1 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -6,13 +6,13 @@ plugins {
 android {
     signingConfigs {
         debug {
-            storeFile file('D/:/linux/line2box_key.jks')
+            storeFile file('/mnt/ntfs2/linux/line2box_key.jks')
             storePassword 's2451998'
             keyPassword 's2451998'
             keyAlias 'key0'
         }
         release {
-            storeFile file('D/://linux/line2box_key.jks')
+            storeFile file('/mnt/ntfs2/linux/line2box_key.jks')
             keyAlias 'key0'
             keyPassword 's2451998'
             storePassword 's2451998'
@@ -24,8 +24,8 @@ android {
         applicationId "com.diu.yk_games.line2box"
         minSdk 27
         targetSdk 32
-        versionCode 7
-        versionName '0.6.9'
+        versionCode 8
+        versionName '0.8'
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
 
@@ -66,6 +66,8 @@ dependencies {
     implementation platform('com.google.firebase:firebase-bom:30.3.1')
     implementation 'com.google.firebase:firebase-auth'
     implementation 'com.google.android.gms:play-services-auth:20.2.0'
+    implementation 'com.google.code.gson:gson:2.9.1'
+    implementation 'org.jsoup:jsoup:1.13.1'
     implementation 'io.ak1:bubbletabbar:1.0.8'
     implementation 'com.mikhaellopez:circularimageview:4.3.0'
     testImplementation 'junit:junit:4.13.2'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 014b7fc..85d84f6 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -4,6 +4,7 @@
     package="com.diu.yk_games.line2box">
 
     <uses-feature android:name="android.hardware.screen.portrait" />
+
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
@@ -18,6 +19,7 @@
         android:screenOrientation="sensorPortrait"
         android:supportsRtl="true"
         android:theme="@style/Theme.Line2Box"
+        android:usesCleartextTraffic="true"
         tools:targetApi="31">
         <activity
             android:name=".GameActivity3"
diff --git a/app/src/main/java/com/diu/yk_games/line2box/ChatFragmentFriendly.java b/app/src/main/java/com/diu/yk_games/line2box/ChatFragmentFriendly.java
index 0061d44..668d07b 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/ChatFragmentFriendly.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/ChatFragmentFriendly.java
@@ -1,8 +1,13 @@
 package com.diu.yk_games.line2box;
 
+import android.annotation.SuppressLint;
 import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.ClipData;
+import android.content.ClipboardManager;
 import android.content.Context;
 import android.content.SharedPreferences;
+import android.graphics.drawable.ColorDrawable;
 import android.media.MediaPlayer;
 import android.os.Bundle;
 
@@ -17,16 +22,23 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.AdapterView;
 import android.widget.EditText;
 import android.widget.ImageButton;
+import android.widget.LinearLayout;
 import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
 
+import com.google.android.gms.tasks.OnSuccessListener;
 import com.google.firebase.database.ChildEventListener;
 import com.google.firebase.database.DataSnapshot;
 import com.google.firebase.database.DatabaseError;
 import com.google.firebase.database.DatabaseReference;
 import com.google.firebase.database.FirebaseDatabase;
 import com.google.firebase.database.ValueEventListener;
+import com.google.firebase.firestore.DocumentSnapshot;
+import com.google.firebase.firestore.FirebaseFirestore;
 
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -45,12 +57,15 @@ public class ChatFragmentFriendly extends Fragment {
     static String key=null;
     Context context;
     Activity activity;
+    String playerId;
+    SharedPreferences sharedPref;
 
-    public static ChatFragmentFriendly newInstance(String key)
+    public static ChatFragmentFriendly newInstance(String key, String playerId)
     {
         ChatFragmentFriendly fragment = new ChatFragmentFriendly();
         Bundle args = new Bundle();
         args.putString("key", key);
+        args.putString("playerId", playerId);
         fragment.setArguments(args);
         return fragment;
     }
@@ -65,6 +80,7 @@ public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         if (getArguments() != null) {
             key = getArguments().getString("key");
+            playerId = getArguments().getString("playerId");
         }
         myRef = database.getReference("MultiPlayer").child(key).child("friendlyChat");
 
@@ -81,7 +97,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
 
         context=requireContext();
         activity=requireActivity();
-        SharedPreferences sharedPref = context.getSharedPreferences(
+        sharedPref = context.getSharedPreferences(
                 getString(R.string.preference_file_key), Context.MODE_PRIVATE);
         GameProfile.setPreferences(sharedPref);
 
@@ -107,6 +123,87 @@ public void onChildAdded(@NonNull DataSnapshot dataSnapshot, String s)
                             MsgListAdapter adapter=new MsgListAdapter(getActivity(),msList);  //
                             ListView list = v.findViewById(R.id.showMsgList);
                             list.setAdapter(adapter);
+                            list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                                @Override
+                                public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                                    MsgStore msgData = (MsgStore) list.getItemAtPosition(position);
+                                    //prestationEco str = (prestationEco)o; //As you are using Default String Adapter
+
+                                    if(!sharedPref.getBoolean("muted", false))
+                                    {
+                                        MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.btn_click_ef);
+                                        mediaPlayer.start();
+                                        mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+                                    }
+                                    if(!msgData.playerId.equals(""))
+                                    {
+                                        Toast.makeText(context,"Long Press To Copy Text/ID",Toast.LENGTH_SHORT).show();
+                                        FirebaseFirestore db = FirebaseFirestore.getInstance();
+                                        db.collection("gamerProfile").document(msgData.playerId)
+                                                .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
+                                                    @SuppressLint("SetTextI18n")
+                                                    @Override
+                                                    public void onSuccess(DocumentSnapshot documentSnapshot) {
+                                                        if(documentSnapshot.exists())
+                                                        {
+                                                            GameProfile server2device = documentSnapshot.toObject(GameProfile.class);
+                                                            AlertDialog.Builder builder = new AlertDialog.Builder(context);
+                                                            View v = LayoutInflater.from(context).inflate(
+                                                                    R.layout.dialog_layout_profile, parent.findViewById(R.id.profileLayoutDialog)
+                                                            );
+                                                            builder.setView(v);
+                                                            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+                                                                    LinearLayout.LayoutParams.WRAP_CONTENT,
+                                                                    LinearLayout.LayoutParams.WRAP_CONTENT
+                                                            );
+                                                            params.setMargins(60, 150, 60, 0);
+                                                            v.findViewById(R.id.linearLayoutFrame).setLayoutParams(params);
+                                                            //v.findViewById(R.id.linearLayoutFrame).setPadding(20,0,20,0);
+                                                            assert server2device != null;
+                                                            ((TextView) v.findViewById(R.id.countryTxt)).setText(server2device.countryNm+" "+server2device.countryEmoji);
+                                                            ((TextView) v.findViewById(R.id.lvlTxt)).setText(""+server2device.lvl);
+                                                            ((TextView) v.findViewById(R.id.coinHave)).setText(""+server2device.coin);
+                                                            ((TextView) v.findViewById(R.id.matchPlayedTxt)).setText(""+server2device.matchPlayed);
+                                                            ((TextView) v.findViewById(R.id.matchWonTxt)).setText(""+server2device.matchWinMulti);
+                                                            EditText nmEditText = v.findViewById(R.id.nmTxt);
+                                                            nmEditText.setEnabled(false);
+                                                            nmEditText.setText(server2device.nm);
+                                                            //nmEditText.setVisibility(View.GONE);
+                                                            ((TextView) v.findViewById(R.id.profileTitle)).setTextSize(28);
+
+                                                            v.findViewById(R.id.profileShapeLayout).setVisibility(View.GONE);
+                                                            v.findViewById(R.id.nmEditBtn).setVisibility(View.GONE);
+                                                            v.findViewById(R.id.nmLTxt).setVisibility(View.GONE);
+                                                            v.findViewById(R.id.themeBox).setVisibility(View.GONE);
+                                                            v.findViewById(R.id.countryLTxt).setVisibility(View.GONE);
+                                                            v.findViewById(R.id.buttonSaveInfo).setVisibility(View.GONE);
+                                                            final AlertDialog alertDialog = builder.create();
+
+                                                            if (alertDialog.getWindow() != null) {
+                                                                alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
+                                                            }
+                                                            try {alertDialog.show();}
+                                                            catch (NullPointerException npe) {npe.printStackTrace();}
+                                                        }
+                                                    }
+                                                });
+                                    }
+                                    else
+                                        Toast.makeText(context,"Older messages don't have profile info.",Toast.LENGTH_SHORT).show();
+
+                                }
+                            });
+                            list.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
+                                @Override
+                                public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id)
+                                {
+                                    Toast.makeText(context, "Text/ID copied", Toast.LENGTH_SHORT).show();
+                                    ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
+                                    ClipData clip = ClipData.newPlainText("msgData", ms.msgData);
+                                    clipboard.setPrimaryClip(clip);
+                                    return true;
+                                }
+                            });
                             getActivity().findViewById(R.id.newMsgBoltu).setVisibility(View.VISIBLE);
                         }
                         catch (NullPointerException npe) {npe.printStackTrace();}
@@ -124,7 +221,7 @@ public void onChildAdded(@NonNull DataSnapshot dataSnapshot, String s)
         myRef.addValueEventListener(new ValueEventListener(){
             @Override
             public void onDataChange(@NonNull DataSnapshot snapshot) {
-                if(snapshot.exists()&&!sharedPref.getBoolean("muted", false))
+                if(snapshot.exists())
                 {
                     if(lastMsg.equals("🤣"))
                         emojiRunner(R.drawable.emoji_haha,R.raw.haha,v);
@@ -174,9 +271,12 @@ public void emojiRunner(int gif, int sound, View v)
         v.findViewById(R.id.sendKiss).setEnabled(false);
         v.findViewById(R.id.sendScream).setEnabled(false);
         v.findViewById(R.id.sendYawn).setEnabled(false);
-        MediaPlayer mediaPlayer = MediaPlayer.create(context, sound);
-        mediaPlayer.start();
-        mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+        if(!sharedPref.getBoolean("muted", false))
+        {
+            MediaPlayer mediaPlayer = MediaPlayer.create(context, sound);
+            mediaPlayer.start();
+            mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+        }
         ((GifImageView)activity.findViewById(R.id.emojiPlay)).setImageResource(gif);
         activity.findViewById(R.id.emojiPlay).setVisibility(View.VISIBLE);
         ((DrawerLayout)activity.findViewById(R.id.drawer_layout)).closeDrawer(GravityCompat.START);
@@ -197,6 +297,7 @@ public void sendThisMsg(String msg)
     {
         GameProfile gp=new GameProfile();
         MsgStore ms =new MsgStore();
+        ms.playerId=playerId;
         ms.nmData= gp.nm;
         ms.lvlData= gp.getLvlByCal().toString();
         DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd MMM, hh:mm a");
diff --git a/app/src/main/java/com/diu/yk_games/line2box/ChatFragmentGlobal.java b/app/src/main/java/com/diu/yk_games/line2box/ChatFragmentGlobal.java
index afb66b7..3c3cf68 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/ChatFragmentGlobal.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/ChatFragmentGlobal.java
@@ -1,23 +1,39 @@
 package com.diu.yk_games.line2box;
 
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.ClipData;
+import android.content.ClipboardManager;
 import android.content.Context;
 import android.content.SharedPreferences;
+import android.graphics.drawable.ColorDrawable;
 import android.media.MediaPlayer;
 import android.os.Bundle;
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
+
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.AdapterView;
 import android.widget.EditText;
 import android.widget.ImageButton;
+import android.widget.LinearLayout;
 import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.google.android.gms.tasks.OnSuccessListener;
 import com.google.firebase.database.ChildEventListener;
 import com.google.firebase.database.DataSnapshot;
 import com.google.firebase.database.DatabaseError;
 import com.google.firebase.database.DatabaseReference;
 import com.google.firebase.database.FirebaseDatabase;
+import com.google.firebase.firestore.DocumentSnapshot;
+import com.google.firebase.firestore.FirebaseFirestore;
+
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
@@ -34,14 +50,19 @@ public class ChatFragmentGlobal extends Fragment {
     FirebaseDatabase database = FirebaseDatabase.getInstance();
     DatabaseReference myRef = database.getReference("globalChat");
     EditText chatBoxGlobal;
+    String playerId;
+    Context context;
+    Activity activity;
 
-    // TODO: Rename parameter arguments, choose names that match
-    // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
-
-    // TODO: Rename and change types of parameters
-//    private String nmData;
-//    private String lvlData;
 
+    public static ChatFragmentGlobal newInstance(String playerId)
+    {
+        ChatFragmentGlobal fragment = new ChatFragmentGlobal();
+        Bundle args = new Bundle();
+        args.putString("playerId", playerId);
+        fragment.setArguments(args);
+        return fragment;
+    }
 
 
     public ChatFragmentGlobal() {
@@ -49,18 +70,14 @@ public ChatFragmentGlobal() {
     }
 
 
-//    public static ChatFragmentGlobal newInstance(String nmData, String lvlData) {
-//        ChatFragmentGlobal fragment = new ChatFragmentGlobal();
-//        Bundle args = new Bundle();
-//        args.putString("nmData", nmData);
-//        args.putString("lvlData", lvlData);
-//        fragment.setArguments(args);
-//        return fragment;
-//    }
-
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            playerId = getArguments().getString("playerId");
+        }
+        context=getContext();
+        activity=getActivity();
 
     }
 
@@ -93,6 +110,87 @@ public void onChildAdded(@NonNull DataSnapshot dataSnapshot, String s)
                         MsgListAdapter adapter=new MsgListAdapter(getActivity(),msList);  //
                         ListView list = v.findViewById(R.id.showMsgList);
                         list.setAdapter(adapter);
+                        list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                            @Override
+                            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                                MsgStore msgData = (MsgStore) list.getItemAtPosition(position);
+                                //prestationEco str = (prestationEco)o; //As you are using Default String Adapter
+
+                                if(!sharedPref.getBoolean("muted", false))
+                                {
+                                    MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.btn_click_ef);
+                                    mediaPlayer.start();
+                                    mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+                                }
+                                if(!msgData.playerId.equals(""))
+                                {
+                                    Toast.makeText(context,"Long Press To Copy Text/ID",Toast.LENGTH_SHORT).show();
+                                    FirebaseFirestore db = FirebaseFirestore.getInstance();
+                                    db.collection("gamerProfile").document(msgData.playerId)
+                                            .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
+                                                @SuppressLint("SetTextI18n")
+                                                @Override
+                                                public void onSuccess(DocumentSnapshot documentSnapshot) {
+                                                    if(documentSnapshot.exists())
+                                                    {
+                                                        GameProfile server2device = documentSnapshot.toObject(GameProfile.class);
+                                                        AlertDialog.Builder builder = new AlertDialog.Builder(context);
+                                                        View v = LayoutInflater.from(context).inflate(
+                                                                R.layout.dialog_layout_profile, parent.findViewById(R.id.profileLayoutDialog)
+                                                        );
+                                                        builder.setView(v);
+                                                        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+                                                                LinearLayout.LayoutParams.WRAP_CONTENT,
+                                                                LinearLayout.LayoutParams.WRAP_CONTENT
+                                                        );
+                                                        params.setMargins(60, 150, 60, 0);
+                                                        v.findViewById(R.id.linearLayoutFrame).setLayoutParams(params);
+                                                        //v.findViewById(R.id.linearLayoutFrame).setPadding(20,0,20,0);
+                                                        assert server2device != null;
+                                                        ((TextView) v.findViewById(R.id.countryTxt)).setText(server2device.countryNm+" "+server2device.countryEmoji);
+                                                        ((TextView) v.findViewById(R.id.lvlTxt)).setText(""+server2device.lvl);
+                                                        ((TextView) v.findViewById(R.id.coinHave)).setText(""+server2device.coin);
+                                                        ((TextView) v.findViewById(R.id.matchPlayedTxt)).setText(""+server2device.matchPlayed);
+                                                        ((TextView) v.findViewById(R.id.matchWonTxt)).setText(""+server2device.matchWinMulti);
+                                                        EditText nmEditText = v.findViewById(R.id.nmTxt);
+                                                        nmEditText.setEnabled(false);
+                                                        nmEditText.setText(server2device.nm);
+                                                        //nmEditText.setVisibility(View.GONE);
+                                                        ((TextView) v.findViewById(R.id.profileTitle)).setTextSize(28);
+
+                                                        v.findViewById(R.id.profileShapeLayout).setVisibility(View.GONE);
+                                                        v.findViewById(R.id.nmEditBtn).setVisibility(View.GONE);
+                                                        v.findViewById(R.id.nmLTxt).setVisibility(View.GONE);
+                                                        v.findViewById(R.id.themeBox).setVisibility(View.GONE);
+                                                        v.findViewById(R.id.countryLTxt).setVisibility(View.GONE);
+                                                        v.findViewById(R.id.buttonSaveInfo).setVisibility(View.GONE);
+                                                        final AlertDialog alertDialog = builder.create();
+
+                                                        if (alertDialog.getWindow() != null) {
+                                                            alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
+                                                        }
+                                                        try {alertDialog.show();}
+                                                        catch (NullPointerException npe) {npe.printStackTrace();}
+                                                    }
+                                                }
+                                            });
+                                }
+                                else
+                                    Toast.makeText(context,"Older messages don't have profile info.",Toast.LENGTH_SHORT).show();
+
+                            }
+                        });
+                        list.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
+                            @Override
+                            public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id)
+                            {
+                                Toast.makeText(context, "Text/ID copied", Toast.LENGTH_SHORT).show();
+                                ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
+                                ClipData clip = ClipData.newPlainText("msgData", ms.msgData);
+                                clipboard.setPrimaryClip(clip);
+                                return true;
+                            }
+                        });
                     }
                     catch (NullPointerException npe) {npe.printStackTrace();}
                 }
@@ -110,6 +208,7 @@ public void onChildAdded(@NonNull DataSnapshot dataSnapshot, String s)
             mp.setOnCompletionListener(MediaPlayer::release);
             GameProfile gp=new GameProfile();
             MsgStore ms =new MsgStore();
+            ms.playerId=playerId;
             ms.nmData= gp.nm;
             ms.lvlData= gp.getLvlByCal().toString();
             DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd MMM, hh:mm a");
diff --git a/app/src/main/java/com/diu/yk_games/line2box/DataStore.java b/app/src/main/java/com/diu/yk_games/line2box/DataStore.java
index 2b8a9c9..a3eb8e2 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/DataStore.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/DataStore.java
@@ -9,14 +9,22 @@ public class DataStore
     public String timeData="";
     public String redData="Red";
     public String blueData="Blue";
-    public String starData="★";
+    public String starData="";
+    public String plr1Id="";
+    public String plr2Id="";
+    public String plr1Cup="";
+    public String plr2Cup="";
     public DataStore(){}
 
-    public DataStore(String timeData, String redData, String blueData, String starData) {
+
+    public DataStore(String timeData, String redData, String blueData, String starData, String plr1Id, String plr2Id, String plr1Cup, String plr2Cup) {
         this.timeData = timeData;
         this.redData = redData;
         this.blueData = blueData;
         this.starData = starData;
+        this.plr1Id = plr1Id;
+        this.plr2Id = plr2Id;
+        this.plr1Cup = plr1Cup;
+        this.plr2Cup = plr2Cup;
     }
-
 }
diff --git a/app/src/main/java/com/diu/yk_games/line2box/DisplayFragment.java b/app/src/main/java/com/diu/yk_games/line2box/DisplayFragment.java
index 2fa7510..72bded9 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/DisplayFragment.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/DisplayFragment.java
@@ -1,16 +1,32 @@
 package com.diu.yk_games.line2box;
 
 import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.res.ColorStateList;
+import android.graphics.PorterDuff;
+import android.graphics.drawable.ColorDrawable;
+import android.media.MediaPlayer;
 import android.os.Bundle;
 import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
 import androidx.fragment.app.Fragment;
 import android.util.Log;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.EditText;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;
+import android.widget.Toast;
+
 import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.OnFailureListener;
+import com.google.android.gms.tasks.OnSuccessListener;
 import com.google.android.gms.tasks.Task;
 import com.google.firebase.firestore.DocumentSnapshot;
 import com.google.firebase.firestore.FirebaseFirestore;
@@ -27,12 +43,18 @@ public class DisplayFragment extends Fragment
     private final String TAG="Dis_frag";
     ArrayList<DataStore> dsList;
     String bestScore="\n\n\nNetwork Error";
+    Context context;
+    GameProfile p1Pro,p2Pro;
+    SharedPreferences sharedPref;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         // Initialize dataset, this data would usually come from a local content provider or
         // remote server.
+        context=getContext();
+        sharedPref = requireContext().getSharedPreferences(
+                getString(R.string.preference_file_key), Context.MODE_PRIVATE);
     }
 
 
@@ -113,9 +135,203 @@ public void onComplete(@NonNull Task<QuerySnapshot> task) {
                                 dsList.add(0,ds);
                             }
                             try {
+
                                 MyListAdapter adapter=new MyListAdapter(getContext(),dsList);  //
                                 ListView list = v.findViewById(R.id.showScoreList);
                                 list.setAdapter(adapter);
+                                list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                                    @Override
+                                    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                                        DataStore gamerPro = (DataStore) list.getItemAtPosition(position);
+
+                                        if(gamerPro.plr1Id.equals("offline"))
+                                            Toast.makeText(context, "Offline match doesn't have Profile Info.", Toast.LENGTH_SHORT).show();
+                                        else if(gamerPro.plr1Id.equals(""))
+                                            Toast.makeText(context, "Old match doesn't have Profile Info.", Toast.LENGTH_SHORT).show();
+                                        else
+                                        {
+                                            if(!sharedPref.getBoolean("muted", false))
+                                            {
+                                                MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.btn_click_ef);
+                                                mediaPlayer.start();
+                                                mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+                                            }
+                                            AlertDialog.Builder builder = new AlertDialog.Builder(context);
+                                            View v = LayoutInflater.from(context).inflate(
+                                                    R.layout.dialog_layout_scr_globe, parent.findViewById(R.id.scoreDetailsLayoutDialog)
+                                            );
+                                            builder.setView(v);
+
+                                            Log.d(TAG, position+ "onItemClick: 1id "+gamerPro.plr1Id);
+                                            Log.d(TAG, "onItemClick: 2id "+gamerPro.plr2Id);
+                                            db.collection("gamerProfile").document(gamerPro.plr1Id)
+                                                    .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
+                                                        @SuppressLint("SetTextI18n")
+                                                        @Override
+                                                        public void onSuccess(DocumentSnapshot documentSnapshot) {
+                                                            if(documentSnapshot.exists())
+                                                            {
+                                                                String[] scr=gamerPro.redData.split(" ");
+                                                                Log.d(TAG, "onSuccess: scr "+scr[scr.length-1]);
+                                                                ((TextView)v.findViewById(R.id.plr1Score)).setText(scr[scr.length-1]);
+                                                                ((TextView)v.findViewById(R.id.plr1Cup)).setText(gamerPro.plr1Cup);
+                                                                Log.d(TAG, "onSuccess: cup "+gamerPro.plr1Cup);
+                                                                p1Pro = Objects.requireNonNull(documentSnapshot.toObject(GameProfile.class));
+                                                                if(!p1Pro.countryEmoji.equals(""))
+                                                                    ((TextView)v.findViewById(R.id.plr1Flag)).setText(p1Pro.countryEmoji);
+                                                                ((TextView)v.findViewById(R.id.plr1Nm)).setText(p1Pro.nm);
+                                                                Log.d(TAG, "onSuccess: nm "+ p1Pro.nm);
+                                                                ((TextView)v.findViewById(R.id.plr1Lvl)).setText(""+p1Pro.lvl);
+
+                                                            }
+                                                        }
+                                                    });
+                                            db.collection("gamerProfile").document(gamerPro.plr2Id)
+                                                    .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
+                                                        @SuppressLint("SetTextI18n")
+                                                        @Override
+                                                        public void onSuccess(DocumentSnapshot documentSnapshot) {
+                                                            if(documentSnapshot.exists())
+                                                            {
+                                                                String[] scr=gamerPro.blueData.split(" ");
+                                                                ((TextView)v.findViewById(R.id.plr2Score)).setText(scr[scr.length-1]);
+                                                                ((TextView)v.findViewById(R.id.plr2Cup)).setText(gamerPro.plr2Cup);
+
+                                                                p2Pro = Objects.requireNonNull(documentSnapshot.toObject(GameProfile.class));
+                                                                if(!p2Pro.countryEmoji.equals(""))
+                                                                    ((TextView)v.findViewById(R.id.plr2Flag)).setText(p2Pro.countryEmoji);
+                                                                ((TextView)v.findViewById(R.id.plr2Nm)).setText(p2Pro.nm);
+                                                                ((TextView)v.findViewById(R.id.plr2Lvl)).setText(""+p2Pro.lvl);
+
+                                                            }
+                                                            final AlertDialog alertDialog = builder.create();
+
+                                                            if (alertDialog.getWindow() != null) {
+                                                                alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
+                                                            }
+                                                            try {alertDialog.show();}
+                                                            catch (Exception e) {e.printStackTrace();}
+                                                        }
+
+                                                    });
+
+
+                                            v.findViewById(R.id.linLayoutPlr1).setOnClickListener(new View.OnClickListener() {
+                                                @Override
+                                                public void onClick(View view) {
+                                                    if(!sharedPref.getBoolean("muted", false))
+                                                    {
+                                                        MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.btn_click_ef);
+                                                        mediaPlayer.start();
+                                                        mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+                                                    }
+                                                    AlertDialog.Builder builder = new AlertDialog.Builder(context);
+                                                    View v2 = LayoutInflater.from(context).inflate(
+                                                            R.layout.dialog_layout_profile, parent.findViewById(R.id.profileLayoutDialog)
+                                                    );
+                                                    builder.setView(v2);
+                                                    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+                                                            LinearLayout.LayoutParams.WRAP_CONTENT,
+                                                            LinearLayout.LayoutParams.WRAP_CONTENT
+                                                    );
+                                                    params.setMargins(60, 0, 60, 0);
+                                                    LinearLayout.LayoutParams params2 = new LinearLayout.LayoutParams(
+                                                            LinearLayout.LayoutParams.MATCH_PARENT,
+                                                            LinearLayout.LayoutParams.MATCH_PARENT
+                                                    );
+                                                    v2.findViewById(R.id.linearLayoutFrame).setLayoutParams(params);
+                                                    v2.findViewById(R.id.linearLayoutFrame).setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.cocX)));
+                                                    v2.findViewById(R.id.linearLayoutFrame).setBackgroundTintMode(PorterDuff.Mode.ADD);
+                                                    if(!p1Pro.countryNm.equals(""))
+                                                        ((TextView) v2.findViewById(R.id.countryTxt)).setText(p1Pro.countryNm+" "+p1Pro.countryEmoji);
+                                                    else
+                                                        v2.findViewById(R.id.countryLayout).setVisibility(View.GONE);
+                                                    ((TextView) v2.findViewById(R.id.lvlTxt)).setText(""+p1Pro.lvl);
+                                                    ((TextView) v2.findViewById(R.id.coinHave)).setText(""+p1Pro.coin);
+                                                    ((TextView) v2.findViewById(R.id.matchPlayedTxt)).setText(""+p1Pro.matchPlayed);
+                                                    ((TextView) v2.findViewById(R.id.matchWonTxt)).setText(""+p1Pro.matchWinMulti);
+                                                    EditText nmEditText = v2.findViewById(R.id.nmTxt);
+                                                    nmEditText.setEnabled(false);
+                                                    nmEditText.setText(p1Pro.nm);
+                                                    //nmEditText.setVisibility(View.GONE);
+                                                    ((TextView) v2.findViewById(R.id.profileTitle)).setTextSize(28);
+
+                                                    v2.findViewById(R.id.profileShapeLayout).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.nmEditBtn).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.nmLTxt).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.themeBox).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.countryLTxt).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.buttonSaveInfo).setVisibility(View.GONE);
+                                                    final AlertDialog alertDialog = builder.create();
+
+                                                    if (alertDialog.getWindow() != null) {
+                                                        alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
+                                                    }
+                                                    try {alertDialog.show();}
+                                                    catch (Exception e) {e.printStackTrace();}
+
+                                                }
+                                            });
+                                            v.findViewById(R.id.linLayoutPlr2).setOnClickListener(new View.OnClickListener() {
+                                                @Override
+                                                public void onClick(View view) {
+                                                    if(!sharedPref.getBoolean("muted", false))
+                                                    {
+                                                        MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.btn_click_ef);
+                                                        mediaPlayer.start();
+                                                        mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+                                                    }
+                                                    AlertDialog.Builder builder = new AlertDialog.Builder(context);
+                                                    View v2 = LayoutInflater.from(context).inflate(
+                                                            R.layout.dialog_layout_profile, parent.findViewById(R.id.profileLayoutDialog)
+                                                    );
+                                                    builder.setView(v2);
+                                                    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+                                                            LinearLayout.LayoutParams.WRAP_CONTENT,
+                                                            LinearLayout.LayoutParams.WRAP_CONTENT
+                                                    );
+                                                    params.setMargins(420, 0, 60, 0);
+                                                    v2.findViewById(R.id.linearLayoutFrame).setLayoutParams(params);
+                                                    v2.findViewById(R.id.linearLayoutFrame).setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.cocX)));
+                                                    v2.findViewById(R.id.linearLayoutFrame).setBackgroundTintMode(PorterDuff.Mode.ADD);
+
+                                                    if(!p2Pro.countryNm.equals(""))
+                                                        ((TextView) v2.findViewById(R.id.countryTxt)).setText(p2Pro.countryNm+" "+p2Pro.countryEmoji);
+                                                    else
+                                                        v2.findViewById(R.id.countryLayout).setVisibility(View.GONE);
+                                                    ((TextView) v2.findViewById(R.id.lvlTxt)).setText(""+p2Pro.lvl);
+                                                    ((TextView) v2.findViewById(R.id.coinHave)).setText(""+p2Pro.coin);
+                                                    ((TextView) v2.findViewById(R.id.matchPlayedTxt)).setText(""+p2Pro.matchPlayed);
+                                                    ((TextView) v2.findViewById(R.id.matchWonTxt)).setText(""+p2Pro.matchWinMulti);
+                                                    EditText nmEditText = v2.findViewById(R.id.nmTxt);
+                                                    nmEditText.setEnabled(false);
+                                                    nmEditText.setText(p2Pro.nm);
+                                                    //nmEditText.setVisibility(View.GONE);
+                                                    ((TextView) v2.findViewById(R.id.profileTitle)).setTextSize(28);
+
+                                                    v2.findViewById(R.id.profileShapeLayout).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.nmEditBtn).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.nmLTxt).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.themeBox).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.countryLTxt).setVisibility(View.GONE);
+                                                    v2.findViewById(R.id.buttonSaveInfo).setVisibility(View.GONE);
+                                                    final AlertDialog alertDialog = builder.create();
+
+                                                    if (alertDialog.getWindow() != null) {
+                                                        alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
+                                                    }
+                                                    try {alertDialog.show();}
+                                                    catch (Exception e) {e.printStackTrace();}
+
+                                                }
+                                            });
+
+
+
+
+                                        }
+                                    }
+                                });
                             }
                             catch (NullPointerException npe) {npe.printStackTrace();}
                         } else {Log.d(TAG, "Error getting documents: ", task.getException());}
diff --git a/app/src/main/java/com/diu/yk_games/line2box/GameActivity1.java b/app/src/main/java/com/diu/yk_games/line2box/GameActivity1.java
index 37c137a..5b5a39e 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/GameActivity1.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/GameActivity1.java
@@ -49,7 +49,7 @@ public class GameActivity1 extends AppCompatActivity
     //MediaPlayer lineClick, boxPlus, winSoundEf, btnClick;
     SharedPreferences sharedPref;
     SharedPreferences.Editor editor;
-    boolean isFirstRun=false;
+    boolean isFirstRun;
 
     @SuppressLint("SetTextI18n")
     public void onStopFragment()
@@ -98,7 +98,7 @@ protected void onCreate(Bundle savedInstanceState)
         super.onCreate(savedInstanceState);
         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
         setContentView(R.layout.activity_game1);
-        isFirstRun=StartActivity.isFirstRun;
+
         PACKAGE_NAME = getApplicationContext().getPackageName();
         scoreRedView = findViewById(R.id.scoreRed);
         scoreBlueView = findViewById(R.id.scoreBlue);
@@ -112,6 +112,7 @@ protected void onCreate(Bundle savedInstanceState)
                 getString(R.string.preference_file_key), Context.MODE_PRIVATE);
         editor = sharedPref.edit();
         ifMuted();
+        isFirstRun = sharedPref.getBoolean("firstRun", true);
         if(flag)
         {
             FragmentManager fm=getSupportFragmentManager();
@@ -794,7 +795,7 @@ public static boolean saveToFirebase()
         redData= nm1+": "+scoreRed;
         blueData= nm2+": "+scoreBlue;
 
-        DataStore ds = new DataStore(timeData,redData,blueData,starData);
+        DataStore ds = new DataStore(timeData,redData,blueData,starData,"offline","","","");
 
 //        FirebaseDatabase database = FirebaseDatabase.getInstance();
 //        DatabaseReference myRef = database.getReference("ScoreBoard");
@@ -892,6 +893,8 @@ public void ideaBtn(View view) {
     }
 
     public void infoShow() {
+        if(isFirstRun)
+            editor.putBoolean("firstRun", false).apply();
         AtomicInteger i= new AtomicInteger();
         int[] gifs={R.drawable.g0,
                 R.drawable.g1,
diff --git a/app/src/main/java/com/diu/yk_games/line2box/GameActivity2.java b/app/src/main/java/com/diu/yk_games/line2box/GameActivity2.java
index 4d7dd31..55aa424 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/GameActivity2.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/GameActivity2.java
@@ -42,7 +42,6 @@
 import com.google.firebase.database.DatabaseError;
 import com.google.firebase.database.DatabaseReference;
 import com.google.firebase.database.FirebaseDatabase;
-import com.google.firebase.database.ValueEventListener;
 import com.google.firebase.firestore.DocumentReference;
 import com.google.firebase.firestore.DocumentSnapshot;
 import com.google.firebase.firestore.FieldValue;
@@ -69,7 +68,7 @@ public class GameActivity2 extends AppCompatActivity {
     //MediaPlayer lineClick, boxPlus, winSoundEf, btnClick;
     SharedPreferences sharedPref;
     SharedPreferences.Editor editor;
-    static boolean isFirstRun=false, plyr1, plyrTurn;
+    static boolean isFirstRun, plyr1, plyrTurn;
     DrawerLayout mDrawerLayout;
     Integer lvl1,lvl2;
     String key, playerId;
@@ -110,14 +109,20 @@ protected void onCreate(Bundle savedInstanceState) {
         sharedPref = this.getSharedPreferences(
                 getString(R.string.preference_file_key), Context.MODE_PRIVATE);
         editor = sharedPref.edit();
+        ifMuted();
+        isFirstRun = sharedPref.getBoolean("firstRun", true);
         GameProfile.setPreferences(sharedPref);
 //        DrawerLayout drawer = binding.drawerLayout;
 //        NavigationView navigationView = binding.navView;
         // Passing each menu ID as a set of Ids because each
         // menu should be considered as top level destinations.
-        isFirstRun=StartActivity.isFirstRun;
+        Handler handler = new Handler();
+        handler.postDelayed(() ->
+        {
+            if(isFirstRun)
+                infoShow();
+        }, 200);
         PACKAGE_NAME = getApplicationContext().getPackageName();
-        ifMuted();
         bundleInfo= getIntent().getBundleExtra("bundleInfo");
         key= bundleInfo.getString("gameKey");
         nm1 = bundleInfo.getString("nm1");
@@ -165,7 +170,7 @@ protected void onCreate(Bundle savedInstanceState) {
         bubbleTabBar.setSelected(1,true);
         FragmentManager fm=getSupportFragmentManager();
         FragmentTransaction ft=fm.beginTransaction();
-        ft.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(key));
+        ft.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(key,playerId));
         ft.commit();
         bubbleTabBar.addBubbleListener(id ->
         {
@@ -173,12 +178,12 @@ protected void onCreate(Bundle savedInstanceState) {
             FragmentTransaction ft2=fm2.beginTransaction();
             if(id==R.id.globalChat)
             {
-                ft2.replace(R.id.chatFragment,new ChatFragmentGlobal());
+                ft2.replace(R.id.chatFragment,ChatFragmentGlobal.newInstance(playerId));
             }
             else
             {
                 if(key!=null)
-                    ft2.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(key));
+                    ft2.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(key,playerId));
                 else
                     ft2.replace(R.id.chatFragment,new BlankChatFragment());
             }
@@ -219,9 +224,9 @@ public void onChildAdded(@NonNull DataSnapshot dataSnapshot, String s)
             {
                 if(dataSnapshot.exists()&&plyr1)
                 {
-                    int viewFromServer = Objects.requireNonNull(dataSnapshot.getValue(Integer.class));
+                    String viewIdFromServer = Objects.requireNonNull(dataSnapshot.getValue(String.class));
                     plyrTurn=true;
-                    lineClick(findViewById(viewFromServer));
+                    lineClick(findViewById(getResources().getIdentifier(viewIdFromServer, "id", getPackageName())));
                     //Log.d(TAG, "onChildAdded (view): "+getResources().getResourceEntryName(viewFromServer)+" "+plyrTurn);
                 }
             }
@@ -239,9 +244,9 @@ public void onChildAdded(@NonNull DataSnapshot dataSnapshot, String s)
             {
                 if(dataSnapshot.exists()&&!plyr1)
                 {
-                    int viewFromServer = Objects.requireNonNull(dataSnapshot.getValue(Integer.class));
+                    String viewIdFromServer = Objects.requireNonNull(dataSnapshot.getValue(String.class));
                     plyrTurn=true;
-                    lineClick(findViewById(viewFromServer));
+                    lineClick(findViewById(getResources().getIdentifier(viewIdFromServer, "id", getPackageName())));
                     //Log.d(TAG, "onChildAdded (view): "+getResources().getResourceEntryName(viewFromServer)+" "+plyrTurn);
                 }
             }
@@ -392,13 +397,13 @@ public void lineClick(View view)
             {
                 String key = myRef.child("plyr1").push().getKey();
                 assert key != null;
-                myRef.child("plyr1").child(key).setValue(view.getId());
+                myRef.child("plyr1").child(key).setValue(view.getResources().getResourceEntryName(view.getId()));
             }
             else if(!plyr1&&clickCount % 2 == 0)
             {
                 String key = myRef.child("plyr2").push().getKey();
                 assert key != null;
-                myRef.child("plyr2").child(key).setValue(view.getId());
+                myRef.child("plyr2").child(key).setValue(view.getResources().getResourceEntryName(view.getId()));
             }
             if (clickCount % 2 == 1)
             {
@@ -644,7 +649,7 @@ else if(!plyr1&&clickCount % 2 == 0)
                 redTxt.setTextColor(getResources().getColor(R.color.white, getTheme()));
                 blueTxt.setTextSize(30);
                 blueTxt.setTextColor(getResources().getColor(R.color.white, getTheme()));
-                String winTxt, wCoin;
+                String winTxt, wCoin, plr1Cup="", plr2Cup="";
                 if (scoreRed > scoreBlue)
                 {
                     if(plyr1)
@@ -656,6 +661,19 @@ else if(!plyr1&&clickCount % 2 == 0)
                         doc.update("coin" , updatePro.coin);
                         winTxt= "You won the match.";
                         wCoin="+"+winCoin;
+                        plr1Cup=wCoin;
+                        MsgStore ms =new MsgStore();
+                        ms.playerId=playerId;
+                        ms.nmData= nm2;
+                        ms.lvlData= lvl2.toString();
+                        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd MMM, hh:mm a");
+                        LocalDateTime now = LocalDateTime.now();
+                        ms.timeData = dtf.format(now);
+                        ms.msgData="Won the match.";
+
+                        String key2 = myRef.child(key).child("friendlyChat").push().getKey();
+                        assert key2 != null;
+                        myRef.child(key).child("friendlyChat").child(key2).setValue(ms);
                     }
                     else
                     {
@@ -664,6 +682,7 @@ else if(!plyr1&&clickCount % 2 == 0)
                         doc.update("coin" , updatePro.coin);
                         winTxt= "You lost the match.";
                         wCoin="-"+lostCoin;
+                        plr2Cup=wCoin;
                     }
 
                 }
@@ -678,6 +697,19 @@ else if (scoreRed < scoreBlue)
                         doc.update("coin" , updatePro.coin);
                         winTxt= "You won the match.";
                         wCoin="+"+winCoin;
+                        plr2Cup=wCoin;
+                        MsgStore ms =new MsgStore();
+                        ms.playerId=playerId;
+                        ms.nmData= nm2;
+                        ms.lvlData= lvl2.toString();
+                        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd MMM, hh:mm a");
+                        LocalDateTime now = LocalDateTime.now();
+                        ms.timeData = dtf.format(now);
+                        ms.msgData="Won the match.";
+
+                        String key2 = myRef.child(key).child("friendlyChat").push().getKey();
+                        assert key2 != null;
+                        myRef.child(key).child("friendlyChat").child(key2).setValue(ms);
                     }
                     else
                     {
@@ -686,6 +718,7 @@ else if (scoreRed < scoreBlue)
                         doc.update("coin" , updatePro.coin);
                         winTxt= "You lost the match.";
                         wCoin="-"+lostCoin;
+                        plr1Cup=wCoin;
                     }
                 }
                 else
@@ -699,6 +732,7 @@ else if (scoreRed < scoreBlue)
                 doc.update("lvl" , updatePro.getLvlByCal());
                 handler.postDelayed(() -> onGameOver(winTxt,wCoin), 1200);
 
+                saveToFirebase(plr1Cup,plr2Cup);
             }
         }
     }
@@ -907,6 +941,18 @@ R.layout.dialog_layout_alert, findViewById(R.id.layoutDialog)
                 mediaPlayer.start();
                 mediaPlayer.setOnCompletionListener(MediaPlayer::release);
             }
+            MsgStore ms =new MsgStore();
+            ms.playerId=playerId;
+            ms.nmData= nm2;
+            ms.lvlData= lvl2.toString();
+            DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd MMM, hh:mm a");
+            LocalDateTime now = LocalDateTime.now();
+            ms.timeData = dtf.format(now);
+            ms.msgData="Left the match.";
+
+            String key2 = myRef.child(key).child("friendlyChat").push().getKey();
+            assert key2 != null;
+            myRef.child(key).child("friendlyChat").child(key2).setValue(ms);
             alertDialog.dismiss();
             database.getReference("MultiPlayer").child(key).removeValue();
             super.onBackPressed();
@@ -942,14 +988,12 @@ R.layout.dialog_layout_game_over, findViewById(R.id.layoutDialogGameOver)
         builder.setView(view);
         builder.setCancelable(false);
 
-        if(plyr1)
-            saveToFirebase();
 
 
         ((TextView) view.findViewById(R.id.textMessage)).setText("" + winMsg);
         ((TextView) view.findViewById(R.id.coinWin)).setText("" + winCoin);
         ((Button) view.findViewById(R.id.buttonNo)).setText("Exit");
-        ((Button) view.findViewById(R.id.buttonYes)).setText("Retry!");
+        ((Button) view.findViewById(R.id.buttonYes)).setText("Chat");
 
         final AlertDialog alertDialog = builder.create();
         view.findViewById(R.id.buttonYes).setOnClickListener(view1 ->
@@ -960,23 +1004,25 @@ R.layout.dialog_layout_game_over, findViewById(R.id.layoutDialogGameOver)
                 mediaPlayer.start();
                 mediaPlayer.setOnCompletionListener(MediaPlayer::release);
             }
-            database.getReference("MultiPlayer").child(key).child("playerCount").addValueEventListener(new ValueEventListener() {
-                @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
-                    if(dataSnapshot.exists())
-                    {
-                        alertDialog.dismiss();
-                        myRef.child("plyr2").removeValue();
-                        myRef.child("plyr1").removeValue();
-                        startActivity(new Intent(GameActivity2.this, GameActivity2.class).putExtra("bundleInfo",bundleInfo));
-                        finish();
-                    }
-                    else
-                        Toast.makeText(GameActivity2.this, "Your Friend Left.", Toast.LENGTH_SHORT).show();
-                }
-                @Override public void onCancelled(@NonNull DatabaseError error) {}
-            });
+//            database.getReference("MultiPlayer").child(key).addValueEventListener(new ValueEventListener() {
+//                @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
+//                    if(dataSnapshot.exists())
+//                    {
+//                        alertDialog.dismiss();
+//                        myRef.child("plyr2").removeValue();
+//                        myRef.child("plyr1").removeValue();
+//                        startActivity(new Intent(GameActivity2.this, GameActivity2.class).putExtra("bundleInfo",bundleInfo));
+//                        finish();
+//                    }
+//                    else
+//                        Toast.makeText(GameActivity2.this, "Your Friend Left.", Toast.LENGTH_SHORT).show();
+//                }
+//                @Override public void onCancelled(@NonNull DatabaseError error) {}
+//            });
 
             //recreate();
+            alertDialog.dismiss();
+            mDrawerLayout.openDrawer(GravityCompat.START);
 
         });
         view.findViewById(R.id.buttonNo).setOnClickListener(view2 ->
@@ -984,7 +1030,7 @@ R.layout.dialog_layout_game_over, findViewById(R.id.layoutDialogGameOver)
             if(!isMuted())
                 {
                 MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.btn_click_ef);
-                mediaPlayer.start();
+                mediaPlayer.start();    
                 mediaPlayer.setOnCompletionListener(MediaPlayer::release);
             }
             alertDialog.dismiss();
@@ -1001,7 +1047,7 @@ R.layout.dialog_layout_game_over, findViewById(R.id.layoutDialogGameOver)
                 catch (NullPointerException npe) {npe.printStackTrace();}
     }
 
-    public static void saveToFirebase()
+    public void saveToFirebase(String plr1Cup,String plr2Cup)
     {
         String redData, blueData, starData, timeData;
 
@@ -1013,8 +1059,6 @@ public static void saveToFirebase()
 
         redData= nm1+": "+scoreRed;
         blueData= nm2+": "+scoreBlue;
-
-        DataStore ds = new DataStore(timeData,redData,blueData,starData);
 //        FirebaseDatabase database = FirebaseDatabase.getInstance();
 //        DatabaseReference myRef = database.getReference("ScoreBoard");
 //        //single
@@ -1049,6 +1093,7 @@ public static void saveToFirebase()
 //        assert key != null;
 //        myRef.child(key).setValue(ds);
 
+        DataStore ds = new DataStore(timeData,redData,blueData,starData,playerId,"",plr1Cup,"");
         FirebaseFirestore db = FirebaseFirestore.getInstance();
         //Source source = Source.CACHE;
         db.collection("LastBestPlayer").document("LastBestPlayer")
@@ -1069,11 +1114,45 @@ else if(bestScore <= scoreBlue)
                     }
                 });
         //multiple
-
+        DatabaseReference plrInfo = FirebaseDatabase.getInstance().getReference("MultiPlayer").child(key).child("playerInfo");   //he he
         DatabaseReference myRef = FirebaseDatabase.getInstance().getReference("ScoreBoard").child("allScore");   //he he
-        String key = myRef.push().getKey();
-        assert key != null;
-        db.collection("ScoreBoard").document(key).set(ds);
+        String key2 = Objects.requireNonNull(myRef.push().getKey());
+        if(plyr1)
+        {
+            int[] c = {0};
+            plrInfo.addChildEventListener(new ChildEventListener() {
+                @Override
+                public void onChildAdded(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) {
+                    if(snapshot.exists())
+                    {
+                        if(Objects.equals(snapshot.getKey(), "plr2Id"))
+                        {
+                            ds.plr2Id=Objects.requireNonNull(snapshot.getValue(String.class));
+                            c[0]++;
+                        }
+                        else if(Objects.equals(snapshot.getKey(), "plr2Cup"))
+                        {
+                            ds.plr2Cup=Objects.requireNonNull(snapshot.getValue(String.class));
+                            c[0]++;
+                        }
+                        if(c[0] == 2)
+                            db.collection("ScoreBoard").document(key2).set(ds);
+
+                    }
+                }
+                @Override public void onChildChanged(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) {}
+                @Override public void onChildRemoved(@NonNull DataSnapshot snapshot) {}
+                @Override public void onChildMoved(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) {}
+                @Override public void onCancelled(@NonNull DatabaseError error) {}
+            });
+        }
+        else
+        {
+            plrInfo.child("plr2Id").setValue(playerId);
+            plrInfo.child("plr2Cup").setValue(plr2Cup);
+            //db.collection("ScoreBoard").document(key).update("plr2Id",playerId);
+            //db.collection("ScoreBoard").document(key).update("plr2Cup",plr2Cup);
+        }
     }
 
     public void volButton(View view)
@@ -1109,6 +1188,8 @@ public void ideaBtn(View view) {
     }
 
     public void infoShow() {
+        if(isFirstRun)
+            editor.putBoolean("firstRun", false).apply();
         AtomicInteger i= new AtomicInteger();
         int[] gifs={R.drawable.g0,
                 R.drawable.g1,
diff --git a/app/src/main/java/com/diu/yk_games/line2box/GameActivity3.java b/app/src/main/java/com/diu/yk_games/line2box/GameActivity3.java
index e6fb273..0c351f7 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/GameActivity3.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/GameActivity3.java
@@ -42,13 +42,12 @@ public class GameActivity3 extends AppCompatActivity {
             Arrays.asList("r1c1T", "r1c1L", "r1c2T", "r1c2L", "r1c3T", "r1c3L", "r1c4T", "r1c4L", "r1c5T", "r1c5L", "r1c6T", "r1c6L", "r1c7L", "r2c1T", "r2c1L", "r2c2T", "r2c2L", "r2c3T", "r2c3L", "r2c4T", "r2c4L", "r2c5T", "r2c5L", "r2c6T", "r2c6L", "r2c7L", "r3c1T", "r3c1L", "r3c2T", "r3c2L", "r3c3T", "r3c3L", "r3c4T", "r3c4L", "r3c5T", "r3c5L", "r3c6T", "r3c6L", "r3c7L", "r4c1T", "r4c1L", "r4c2T", "r4c2L", "r4c3T", "r4c3L", "r4c4T", "r4c4L", "r4c5T", "r4c5L", "r4c6T", "r4c6L", "r4c7L", "r5c1T", "r5c1L", "r5c2T", "r5c2L", "r5c3T", "r5c3L", "r5c4T", "r5c4L", "r5c5T", "r5c5L", "r5c6T", "r5c6L", "r5c7L", "r7c1T", "r6c1T", "r6c1L", "r7c6T", "r6c2T", "r6c2L", "r7c2T", "r6c3T", "r6c3L", "r7c3T", "r6c4T", "r6c4L", "r7c4T", "r6c5T", "r6c5L", "r7c5T", "r6c6T", "r6c6L", "r6c7L"));
     Random random = new Random();
 
-    public static String PACKAGE_NAME;
     TextView scoreRedView, scoreBlueView,redTxt, blueTxt;
     public static boolean one = true, flag = true;
     //MediaPlayer lineClick, boxPlus, winSoundEf, btnClick;
     SharedPreferences sharedPref;
     SharedPreferences.Editor editor;
-    boolean isFirstRun = false, recursion =false, clickEnabled=false;
+    boolean isFirstRun, recursion =false, clickEnabled=false;
     int tmpLineId;
 
 
@@ -72,8 +71,7 @@ protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
         setContentView(R.layout.activity_game3);
-        isFirstRun = StartActivity.isFirstRun;
-        PACKAGE_NAME = getApplicationContext().getPackageName();
+
         scoreRedView = findViewById(R.id.scoreRed);
         scoreBlueView = findViewById(R.id.scoreBlue);
         redTxt = findViewById(R.id.red);
@@ -86,6 +84,7 @@ protected void onCreate(Bundle savedInstanceState) {
                 getString(R.string.preference_file_key), Context.MODE_PRIVATE);
         editor = sharedPref.edit();
         ifMuted();
+        isFirstRun = sharedPref.getBoolean("firstRun", true);
 
         StringBuilder index = new StringBuilder();
         for (int i = 1; i <= 6; i++) {
@@ -190,8 +189,12 @@ protected void onCreate(Bundle savedInstanceState) {
 
         int indx = random.nextInt(84);
         int randLineId=this.getResources().getIdentifier(lineIDs.get(indx), "id", this.getPackageName());
-        Handler handler = new Handler();
-        handler.postDelayed(() ->
+        new Handler().postDelayed(() ->
+        {
+            if(isFirstRun)
+                infoShow();
+        }, 200);
+        new Handler().postDelayed(() ->
         {
             clickEnabled=true;
             lineClick(findViewById(randLineId));
@@ -911,6 +914,8 @@ public void ideaBtn(View view) {
     }
 
     public void infoShow() {
+        if(isFirstRun)
+            editor.putBoolean("firstRun", false).apply();
         AtomicInteger i = new AtomicInteger();
         int[] gifs = {R.drawable.g0,
                 R.drawable.g1,
diff --git a/app/src/main/java/com/diu/yk_games/line2box/GameProfile.java b/app/src/main/java/com/diu/yk_games/line2box/GameProfile.java
index e3cfd9e..f1b8148 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/GameProfile.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/GameProfile.java
@@ -1,21 +1,24 @@
 package com.diu.yk_games.line2box;
 
-import android.content.Context;
 import android.content.SharedPreferences;
 
-import java.util.Random;
 
 public class GameProfile
 {
     public static SharedPreferences preferences;
     public static SharedPreferences.Editor preferencesEditor;
     public String nm=preferences.getString("nm", "Noob"+(int)Math.floor(Math.random()*(900)+100));
+
+    public String cityNm=preferences.getString("cityNm","");
+    public String query=preferences.getString("query","");
     public Integer matchPlayed=preferences.getInt("matchPlayed",0);
     public Integer matchWinMulti=preferences.getInt("matchWinMulti",0);
     public Integer coin=preferences.getInt("coins",100);
     public Integer lvl=preferences.getInt("lvl",getLvlByCal());
 
-    public String playerId;
+    public String playerId="";
+    public String countryEmoji="";
+    public String countryNm="";
     //preferences.getBoolean("needProfile",true)
     public static void setPreferences(SharedPreferences x)
     {
@@ -25,20 +28,18 @@ public static void setPreferences(SharedPreferences x)
 
     public GameProfile() {}
 
-    public GameProfile(String nm, Integer coin, Integer matchPlayed, Integer matchWinMulti) {
-        this.nm = nm;
-        this.coin = coin;
-        this.matchPlayed = matchPlayed;
-        this.matchWinMulti = matchWinMulti;
-    }
     public void apply()
     {
         preferencesEditor.putString("nm",this.nm).apply();
+        preferencesEditor.putString("cityNm",this.cityNm).apply();
+        preferencesEditor.putString("query",this.query).apply();
         preferencesEditor.putInt("coins",this.coin).apply();
         preferencesEditor.putInt("matchPlayed",this.matchPlayed).apply();
         preferencesEditor.putInt("matchWinMulti",this.matchWinMulti).apply();
 
     }
+
+
     public void setNm(String nm) {
         this.nm = nm;
         //preferencesEditor.putString("nm",this.nm).apply();
diff --git a/app/src/main/java/com/diu/yk_games/line2box/LeaderBoardFragment.java b/app/src/main/java/com/diu/yk_games/line2box/LeaderBoardFragment.java
index 82deb57..c0019c4 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/LeaderBoardFragment.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/LeaderBoardFragment.java
@@ -1,25 +1,37 @@
 package com.diu.yk_games.line2box;
 
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.graphics.drawable.ColorDrawable;
+import android.media.MediaPlayer;
 import android.os.Bundle;
 
 import androidx.annotation.NonNull;
 import androidx.fragment.app.Fragment;
-
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.EditText;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.OnSuccessListener;
 import com.google.android.gms.tasks.Task;
+import com.google.firebase.firestore.DocumentSnapshot;
 import com.google.firebase.firestore.FirebaseFirestore;
 import com.google.firebase.firestore.QueryDocumentSnapshot;
 import com.google.firebase.firestore.QuerySnapshot;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
+import java.util.Objects;
 
 
 public class LeaderBoardFragment extends Fragment {
@@ -27,6 +39,9 @@ public class LeaderBoardFragment extends Fragment {
     private final String TAG="LeadBoard_frag";
     ArrayList<GameProfile> rankList;
     String lastBest, playerId;
+    SharedPreferences sharedPref;
+    Context context;
+
 
     public static LeaderBoardFragment newInstance(String playerId)
     {
@@ -47,6 +62,10 @@ public void onCreate(Bundle savedInstanceState) {
         if (getArguments() != null) {
             playerId = getArguments().getString("playerId");
         }
+        sharedPref = requireContext().getSharedPreferences(
+                getString(R.string.preference_file_key), Context.MODE_PRIVATE);
+        GameProfile.setPreferences(sharedPref);
+        context=getContext();
     }
 
     @Override
@@ -65,21 +84,97 @@ public void onComplete(@NonNull Task<QuerySnapshot> task) {
                         if (task.isSuccessful()) {
                             for (QueryDocumentSnapshot document : task.getResult())
                             {
-                                Log.d(TAG, document.getId() );
+                                //Log.d(TAG, document.getId() );
                                 GameProfile xx=document.toObject(GameProfile.class);
-                                //xx.playerId=document.getId();
                                 rankList.add(xx);
                             }
                             rankList.sort(Comparator.comparing(a -> a.coin));
                             Collections.reverse(rankList);
+                            int pos=findIndex(rankList,playerId);
                             try {
                                 RankListAdapter adapter=new RankListAdapter(getContext(),rankList,playerId);
                                 ListView list = v.findViewById(R.id.showRankList);
                                 list.setAdapter(adapter);
-                                //list.smoothScrollToPosition(RankListAdapter.myPosition);
-                                int pos=RankListAdapter.myPosition;
+                                list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                                    @Override
+                                    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                                        GameProfile gamerPro = (GameProfile) list.getItemAtPosition(position);
+                                        if(position!=pos)
+                                        {
+                                            if(!sharedPref.getBoolean("muted", false))
+                                            {
+                                                MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.btn_click_ef);
+                                                mediaPlayer.start();
+                                                mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+                                            }
+                                            if(!gamerPro.playerId.equals(""))
+                                            {
+                                                FirebaseFirestore db = FirebaseFirestore.getInstance();
+                                                db.collection("gamerProfile").document(gamerPro.playerId)
+                                                        .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
+                                                            @SuppressLint("SetTextI18n")
+                                                            @Override
+                                                            public void onSuccess(DocumentSnapshot documentSnapshot) {
+                                                                if(documentSnapshot.exists())
+                                                                {
+                                                                    GameProfile server2device = Objects.requireNonNull(documentSnapshot.toObject(GameProfile.class));
+                                                                    AlertDialog.Builder builder = new AlertDialog.Builder(context);
+                                                                    View v = LayoutInflater.from(context).inflate(
+                                                                            R.layout.dialog_layout_profile, parent.findViewById(R.id.profileLayoutDialog)
+                                                                    );
+                                                                    builder.setView(v);
+                                                                    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+                                                                            LinearLayout.LayoutParams.WRAP_CONTENT,
+                                                                            LinearLayout.LayoutParams.WRAP_CONTENT
+                                                                    );
+                                                                    params.setMargins(60, 150, 60, 0);
+                                                                    v.findViewById(R.id.linearLayoutFrame).setLayoutParams(params);
+                                                                    //v.findViewById(R.id.linearLayoutFrame).setPadding(20,0,20,0);
+                                                                    if(!server2device.countryNm.equals(""))
+                                                                        ((TextView) v.findViewById(R.id.countryTxt)).setText(server2device.countryNm+" "+server2device.countryEmoji);
+                                                                    else
+                                                                        v.findViewById(R.id.countryLayout).setVisibility(View.GONE);
+                                                                    ((TextView) v.findViewById(R.id.lvlTxt)).setText(""+server2device.lvl);
+                                                                    ((TextView) v.findViewById(R.id.coinHave)).setText(""+server2device.coin);
+                                                                    ((TextView) v.findViewById(R.id.matchPlayedTxt)).setText(""+server2device.matchPlayed);
+                                                                    ((TextView) v.findViewById(R.id.matchWonTxt)).setText(""+server2device.matchWinMulti);
+                                                                    EditText nmEditText = v.findViewById(R.id.nmTxt);
+                                                                    nmEditText.setEnabled(false);
+                                                                    nmEditText.setText(server2device.nm);
+                                                                    //nmEditText.setVisibility(View.GONE);
+                                                                    ((TextView) v.findViewById(R.id.profileTitle)).setTextSize(28);
+
+                                                                    v.findViewById(R.id.profileShapeLayout).setVisibility(View.GONE);
+                                                                    v.findViewById(R.id.nmEditBtn).setVisibility(View.GONE);
+                                                                    v.findViewById(R.id.nmLTxt).setVisibility(View.GONE);
+                                                                    v.findViewById(R.id.themeBox).setVisibility(View.GONE);
+                                                                    v.findViewById(R.id.countryLTxt).setVisibility(View.GONE);
+                                                                    v.findViewById(R.id.buttonSaveInfo).setVisibility(View.GONE);
+                                                                    final AlertDialog alertDialog = builder.create();
+
+                                                                    if (alertDialog.getWindow() != null) {
+                                                                        alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
+                                                                    }
+                                                                    try {alertDialog.show();}
+                                                                    catch (NullPointerException npe) {npe.printStackTrace();}
+                                                                }
+                                                            }
+                                                        });
+                                            }
+                                            else
+                                                Toast.makeText(context,"Older messages don't have profile info.",Toast.LENGTH_SHORT).show();
+
+                                        }
+
+                                    }
+                                });
+
+
+                                        // rankList.indexOf(user);
+                                //Log.d(TAG, "onComplete(pos): "+pos+" ser- "+rankList.get(pos).playerId+" "+playerId);
                                 if(pos>5)
-                                    list.post(() -> list.smoothScrollToPosition(pos-2));
+                                    list.setSelection(pos-1);
+                                    //list.post(() -> list.smoothScrollToPosition(pos));
                             }
                             catch (NullPointerException npe) {npe.printStackTrace();}
                         } else {
@@ -90,4 +185,15 @@ public void onComplete(@NonNull Task<QuerySnapshot> task) {
         // Inflate the layout for this fragment
         return v;
     }
+    public int findIndex(ArrayList<GameProfile> list, String id)
+    {
+        int index=0;
+        for(GameProfile o : list)
+        {
+            if (o.playerId.equals(id))
+                return index;
+            index++;
+        }
+        return -1;
+    }
 }
\ No newline at end of file
diff --git a/app/src/main/java/com/diu/yk_games/line2box/MsgListAdapter.java b/app/src/main/java/com/diu/yk_games/line2box/MsgListAdapter.java
index e099e3f..9d2a4f0 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/MsgListAdapter.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/MsgListAdapter.java
@@ -32,7 +32,8 @@ public View getView(int position,View convertView,ViewGroup parent) {
             convertView = LayoutInflater.from(context).inflate(R.layout.custom_msg_list_view, parent, false);
         }
 
-        TextView timeData = convertView.findViewById(R.id.timeshowId);
+
+        TextView timeData = convertView.findViewById(R.id.timeShowId);
         TextView nmData = convertView.findViewById(R.id.nmId);
         TextView msgData = convertView.findViewById(R.id.msgId);
         TextView lvlData = convertView.findViewById(R.id.lvlId);
@@ -41,7 +42,7 @@ public View getView(int position,View convertView,ViewGroup parent) {
         DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd MMM");
         LocalDateTime now = LocalDateTime.now();
         String timeNow = dtf.format(now);
-        if(timeNow.equals(timeServer[0]))
+        if(timeNow.contains(timeServer[0])||timeServer[0].contains(timeNow))
             timeData.setText(timeServer[1]);
         else
             timeData.setText(ms.get(position).timeData);
@@ -50,8 +51,10 @@ public View getView(int position,View convertView,ViewGroup parent) {
         lvlData.setText(ms.get(position).lvlData);
         String data=ms.get(position).msgData;
         msgData.setText(data);
-        if(data.equals("Created the match.")||data.equals("Joined the match."))
+        if(data.equals("Created the match.")||data.equals("Joined the match.")||data.equals("Won the match."))
             msgData.setTextColor(0xFF60c235);
+        else if(data.equals("Left the match."))
+            msgData.setTextColor(0xFFDE2D45);
         else
             msgData.setTextColor(0xFFD9D9D9);
         return convertView;
diff --git a/app/src/main/java/com/diu/yk_games/line2box/MsgStore.java b/app/src/main/java/com/diu/yk_games/line2box/MsgStore.java
index a9601c2..9362ca5 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/MsgStore.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/MsgStore.java
@@ -2,18 +2,18 @@
 
 public class MsgStore
 {
+    public String playerId="";
     public String timeData="";
     public String nmData="";
     public String msgData="Blue";
     public String lvlData="1";
     public MsgStore(){}
 
-    public MsgStore(String timeData, String nmData, String msgData, String lvlData) {
+    public MsgStore(String playerId, String timeData, String nmData, String msgData, String lvlData) {
+        this.playerId = playerId;
         this.timeData = timeData;
         this.nmData = nmData;
         this.msgData = msgData;
         this.lvlData = lvlData;
     }
-
-
 }
diff --git a/app/src/main/java/com/diu/yk_games/line2box/MultiplayerActivity.java b/app/src/main/java/com/diu/yk_games/line2box/MultiplayerActivity.java
index e4683e3..efab39c 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/MultiplayerActivity.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/MultiplayerActivity.java
@@ -136,6 +136,7 @@ protected void onCreate(Bundle savedInstanceState)
         copyPastBtn=findViewById(R.id.copyPastBtn);
         startMatchBtn=findViewById(R.id.startMatchBtnId);
         playerId=getIntent().getExtras().getString("playerId");
+        ChatFragmentGlobal.newInstance(playerId);
         lvlUpgrade();
         mBundle.putString("playerId",playerId);
         copyPastBtn.setImageResource(R.drawable.icon_paste);
@@ -195,6 +196,7 @@ public void onDataChange(@NonNull DataSnapshot dataSnapshot)
                                     myRef.child(getKey()).child("playerInfo").child("lvl2").setValue(new GameProfile().getLvlByCal());
 
                                     MsgStore ms =new MsgStore();
+                                    ms.playerId=playerId;
                                     ms.nmData= nm2;
                                     ms.lvlData= lvl2.toString();
                                     DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd MMM, hh:mm a");
@@ -209,7 +211,7 @@ public void onDataChange(@NonNull DataSnapshot dataSnapshot)
                                     bubbleTabBar.setSelected(1,true);
                                     FragmentManager fm=getSupportFragmentManager();
                                     FragmentTransaction ft=fm.beginTransaction();
-                                    ft.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(getKey()));
+                                    ft.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(getKey(),playerId));
                                     ft.commit();
 
                                     myRef.child(getKey()).child("playerInfo").addValueEventListener(new ValueEventListener() {
@@ -269,7 +271,7 @@ public void onCancelled(@NonNull DatabaseError error) {
                 bubbleTabBar.setSelected(0,true);
                 FragmentManager fm=getSupportFragmentManager();
                 FragmentTransaction ft=fm.beginTransaction();
-                ft.replace(R.id.chatFragment,new ChatFragmentGlobal());
+                ft.replace(R.id.chatFragment,ChatFragmentGlobal.newInstance(playerId));
                 ft.commit();
                 findViewById(R.id.newMsgBoltu).setVisibility(View.GONE);
 
@@ -311,6 +313,7 @@ public void onCancelled(@NonNull DatabaseError error) {
                 myRef.child(key).child("playerInfo").child("lvl2").setValue(0);
 
                 MsgStore ms =new MsgStore();
+                ms.playerId=playerId;
                 ms.nmData= nm1;
                 ms.lvlData= lvl1.toString();
                 DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd MMM, hh:mm a");
@@ -325,7 +328,7 @@ public void onCancelled(@NonNull DatabaseError error) {
                 bubbleTabBar.setSelected(1,true);
                 FragmentManager fm=getSupportFragmentManager();
                 FragmentTransaction ft=fm.beginTransaction();
-                ft.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(key));
+                ft.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(key,playerId));
                 ft.commit();
 
 
@@ -460,12 +463,12 @@ public void onGlobalLayout() {
             FragmentTransaction ft=fm.beginTransaction();
             if(id==R.id.globalChat)
             {
-                ft.replace(R.id.chatFragment,new ChatFragmentGlobal());
+                ft.replace(R.id.chatFragment,ChatFragmentGlobal.newInstance(playerId));
             }
             else
             {
                 if(key!=null)
-                    ft.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(key));
+                    ft.replace(R.id.chatFragment,ChatFragmentFriendly.newInstance(key,playerId));
                 else
                     ft.replace(R.id.chatFragment,new BlankChatFragment());
 
@@ -633,6 +636,7 @@ R.layout.dialog_layout_alert, findViewById(R.id.layoutDialog)
                 MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.btn_click_ef);
                 mediaPlayer.start();
                 mediaPlayer.setOnCompletionListener(MediaPlayer::release);}
+
                 alertDialog.dismiss();
                 super.onBackPressed();
                 startActivity(new Intent(this,StartActivity.class));
@@ -769,9 +773,10 @@ public void profileBtn(View view)
     {
         if(!isMuted())
         {
-                MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.btn_click_ef);
-                mediaPlayer.start();
-                mediaPlayer.setOnCompletionListener(MediaPlayer::release);}
+            MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.btn_click_ef);
+            mediaPlayer.start();
+            mediaPlayer.setOnCompletionListener(MediaPlayer::release);
+        }
 
         AlertDialog.Builder builder = new AlertDialog.Builder(MultiplayerActivity.this);
         v = LayoutInflater.from(MultiplayerActivity.this).inflate(
@@ -780,9 +785,14 @@ R.layout.dialog_layout_profile, findViewById(R.id.profileLayoutDialog)
         builder.setView(v);
         //builder.setCancelable(false);
         GameProfile.setPreferences(sharedPref);
-        ((TextView) v.findViewById(R.id.lvlTxt)).setText(""+new GameProfile().getLvlByCal());
-        ((TextView) v.findViewById(R.id.matchPlayedTxt)).setText(""+new GameProfile().matchPlayed);
-        ((TextView) v.findViewById(R.id.matchWonTxt)).setText(""+new GameProfile().matchWinMulti);
+        GameProfile x=new GameProfile();
+        x.countryEmoji=sharedPref.getString("countryEmoji","");
+        x.countryNm=sharedPref.getString("countryNm","");
+        ((TextView) v.findViewById(R.id.countryTxt)).setText(x.countryNm+" "+x.countryEmoji);
+        ((TextView) v.findViewById(R.id.lvlTxt)).setText(""+x.getLvlByCal());
+        ((TextView) v.findViewById(R.id.matchPlayedTxt)).setText(""+x.matchPlayed);
+        ((TextView) v.findViewById(R.id.matchWonTxt)).setText(""+x.matchWinMulti);
+        v.findViewById(R.id.coinShow).setVisibility(View.GONE);
         EditText nmEditText = v.findViewById(R.id.nmTxt);
         //CircleImageView civ= v.findViewById(R.id.profile_image);
         ImageView civ= v.findViewById(R.id.profile_image);
diff --git a/app/src/main/java/com/diu/yk_games/line2box/RankListAdapter.java b/app/src/main/java/com/diu/yk_games/line2box/RankListAdapter.java
index 3ced8a7..46e2b3c 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/RankListAdapter.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/RankListAdapter.java
@@ -48,7 +48,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
         }
         else
         {
-            convertView.findViewById(R.id.rankListItemBg).setBackgroundResource(R.drawable.box_chat);
+            convertView.findViewById(R.id.rankListItemBg).setBackgroundResource(R.drawable.btn_rank_bg);
 
         }
 
diff --git a/app/src/main/java/com/diu/yk_games/line2box/StartActivity.java b/app/src/main/java/com/diu/yk_games/line2box/StartActivity.java
index 2a5d340..60d4fe7 100755
--- a/app/src/main/java/com/diu/yk_games/line2box/StartActivity.java
+++ b/app/src/main/java/com/diu/yk_games/line2box/StartActivity.java
@@ -1,4 +1,6 @@
 package com.diu.yk_games.line2box;
+
+
 import androidx.annotation.NonNull;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.fragment.app.FragmentManager;
@@ -13,8 +15,8 @@
 import android.net.ConnectivityManager;
 import android.net.Uri;
 import android.os.Bundle;
-
 import android.os.Handler;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.WindowManager;
@@ -23,7 +25,6 @@
 import android.widget.ImageView;
 import android.widget.TextView;
 import android.widget.Toast;
-
 import com.google.android.gms.games.GamesSignInClient;
 import com.google.android.gms.games.PlayGames;
 import com.google.android.gms.games.PlayGamesSdk;
@@ -45,20 +46,34 @@
 import com.google.firebase.firestore.FirebaseFirestore;
 import com.google.firebase.firestore.QueryDocumentSnapshot;
 import com.google.firebase.firestore.QuerySnapshot;
-
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Objects;
 import java.util.Random;
 import java.util.concurrent.atomic.AtomicInteger;
+
 import pl.droidsonroids.gif.GifImageView;
 
-public class StartActivity extends AppCompatActivity
-{
+public class StartActivity extends AppCompatActivity {
     private static final String TAG = "TAG: StartActivity";
-    public static boolean scrBrdVisible =false, isFirstRun;
-    static int errorCnt=0;
+    boolean scrBrdVisible = false, isFirstRun=false;
+    static int errorCnt = 0;
     SharedPreferences preferences;
     SharedPreferences.Editor preferencesEditor;
-    String onlineVersionName=null;
+    //String onlineVersionCode = null;
+    ArrayList<String> countryEmojis = new ArrayList<>(
+            Arrays.asList("🇦🇫", "🇦🇱", "🇩🇿", "🇦🇩", "🇦🇴", "🇦🇬", "🇦🇷", "🇦🇲", "🇦🇺", "🇦🇹", "🇦🇿", "🇧🇸", "🇧🇭", "🇧🇩", "🇧🇧", "🇧🇾", "🇧🇪", "🇧🇿", "🇧🇯", "🇧🇹", "🇧🇴", "🇧🇦", "🇧🇼", "🇧🇷", "🇧🇳", "🇧🇬", "🇧🇫", "🇧🇮", "🇨🇻", "🇰🇭", "🇨🇲", "🇨🇦", "🇨🇫", "🇹🇩", "🇨🇱", "🇨🇳", "🇨🇴", "🇰🇲", "🇨🇩", "🇨🇷", "🇭🇷", "🇨🇺", "🇨🇾", "🇨🇿", "🇨🇮", "🇩🇰", "🇩🇯", "🇩🇲", "🇩🇴", "🇨🇩", "🇪🇨", "🇪🇬", "🇸🇻", "🏴󠁧󠁢󠁥󠁮󠁧󠁿", "🇬🇶", "🇪🇷", "🇪🇪", "🇸🇿", "🇪🇹", "🇫🇯", "🇫🇮", "🇫🇷", "🇬🇦", "🇬🇲", "🇬🇪", "🇩🇪", "🇬🇭", "🇬🇷", "🇬🇩", "🇬🇹", "🇬🇳", "🇬🇼", "🇬🇾", "🇭🇹", "🇭🇳", "🇭🇰", "🇭🇺", "🇮🇸", "🇮🇳", "🇮🇩", "🇮🇷", "🇮🇶", "🇮🇪", "🇮🇱", "🇮🇹", "🇯🇲", "🇯🇵", "🇯🇴", "🇰🇿", "🇰🇪", "🇰🇮", "🇰🇼", "🇰🇬", "🇱🇦", "🇱🇻", "🇱🇧", "🇱🇸", "🇱🇷", "🇱🇾", "🇱🇮", "🇱🇹", "🇱🇺", "🇲🇬", "🇲🇼", "🇲🇾", "🇲🇻", "🇲🇱", "🇲🇹", "🇲🇭", "🇲🇶", "🇲🇺", "🇲🇽", "🇫🇲", "🇲🇩", "🇲🇨", "🇲🇳", "🇲🇪", "🇲🇦", "🇲🇿", "🇲🇲", "🇳🇦", "🇳🇷", "🇳🇵", "🇳🇱", "🇳🇿", "🇳🇮", "🇳🇪", "🇳🇬", "🇰🇵", "🇲🇰", "🇳🇴", "🇴🇲", "🇵🇰", "🇵🇼", "🇵🇸", "🇵🇦", "🇵🇬", "🇵🇾", "🇵🇪", "🇵🇭", "🇵🇱", "🇵🇹", "🇶🇦", "🇷🇴", "🇷🇺", "🇷🇼", "🇰🇳", "🇱🇨", "🇻🇨", "🇼🇸", "🇸🇲", "🇸🇹", "🇸🇦", "🏴󠁧󠁢󠁳󠁣󠁴󠁿", "🇸🇳", "🇷🇸", "🇸🇨", "🇸🇱", "🇸🇬", "🇸🇰", "🇸🇮", "🇸🇧", "🇸🇴", "🇿🇦", "🇰🇷", "🇸🇸", "🇪🇸", "🇱🇰", "🇸🇩", "🇸🇷", "🇸🇪", "🇨🇭", "🇸🇾", "🇹🇼", "🇹🇯", "🇹🇿", "🇹🇭", "🇹🇱", "🇹🇬", "🇹🇴", "🇹🇹", "🇹🇳", "🇹🇷", "🇹🇲", "🇹🇻", "🇺🇬", "🇺🇦", "🇦🇪", "🇬🇧", "🇺🇸", "🇺🇾", "🇺🇿", "🇻🇺", "🇻🇪", "🇻🇳", "🇾🇪", "🇿🇲", "🇿🇼"));
+    ArrayList<String> countryNm = new ArrayList<>(
+            Arrays.asList("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cabo Verde", "Cambodia", "Cameroon", "Canada", "Central African Republic", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czechia", "Côte d'Ivoire", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "DR Congo", "Ecuador", "Egypt", "El Salvador", "England", "Equatorial Guinea", "Eritrea", "Estonia", "Eswatini (Swaziland)", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Montenegro", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "North Korea", "North Macedonia", "Norway", "Oman", "Pakistan", "Palau", "Palestine", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "São Tomé and Príncipe", "Saudi Arabia", "Scotland", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Korea", "South Sudan", "Spain", "Sri Lanka", "Sudan", "Suriname", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Timor-Leste", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe"));
+
     FirebaseAuth mAuth;
     Context context;
     public static String playerId;
@@ -78,17 +93,16 @@ public class StartActivity extends AppCompatActivity
 //    }
 
     @Override
-    protected void onCreate(Bundle savedInstanceState)
-    {
+    protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         mAuth = FirebaseAuth.getInstance();
         PlayGamesSdk.initialize(this);
-        context=this;
+        context = this;
         setContentView(R.layout.activity_start);
-        mode1=findViewById(R.id.mode1);
-        mode2=findViewById(R.id.mode2);
-        mode3=findViewById(R.id.mode3);
-        loadingUI= new LoadingUI();
+        mode1 = findViewById(R.id.mode1);
+        mode2 = findViewById(R.id.mode2);
+        mode3 = findViewById(R.id.mode3);
+        loadingUI = new LoadingUI();
         loadingUI.start();
         FirebaseFirestore db = FirebaseFirestore.getInstance();
         preferences = this.getSharedPreferences(
@@ -96,7 +110,10 @@ protected void onCreate(Bundle savedInstanceState)
         //SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(ApplicationConstants.PREFERENCES, Context.MODE_PRIVATE);
         preferencesEditor = preferences.edit();
         GameProfile.setPreferences(preferences);
-        isFirstRun= preferences.getBoolean("firstRun", true);
+        //if (!isFirstRun)
+            isFirstRun = preferences.getBoolean("firstRun", true);
+
+
         //if(isFirstRun)
 
 //        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
@@ -105,10 +122,9 @@ protected void onCreate(Bundle savedInstanceState)
         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
         findViewById(R.id.globalScoreFrag).setVisibility(View.GONE);
 
-        if(showHadith&&!isFirstRun)
-        {
+        if (showHadith && !isFirstRun) {
             showAHadith();
-            showHadith=false;
+            showHadith = false;
         }
 
 
@@ -120,9 +136,8 @@ protected void onCreate(Bundle savedInstanceState)
                     isAuthenticatedTask.getResult().isAuthenticated());
             gamesSignInClient.requestServerSideAccess(getString(R.string.default_web_client_id),
                             /*forceRefreshToken=*/ false)
-                    .addOnCompleteListener( task -> {
-                        if (task.isSuccessful())
-                        {
+                    .addOnCompleteListener(task -> {
+                        if (task.isSuccessful()) {
                             isUpdateAvailable();
 
                             String serverAuthToken = task.getResult();
@@ -133,26 +148,22 @@ protected void onCreate(Bundle savedInstanceState)
                                     .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                                         @Override
                                         public void onComplete(@NonNull Task<AuthResult> task) {
-                                            if (task.isSuccessful())
-                                            {
+                                            if (task.isSuccessful()) {
                                                 // Sign in success, update UI with the signed-in user's information
 
                                                 //Log.d(TAG, "signInWithCredential: success");
-                                                if(showHadith&&isFirstRun)
-                                                {
+                                                if (showHadith && isFirstRun) {
                                                     showAHadith();
-                                                    showHadith=false;
+                                                    showHadith = false;
                                                 }
                                                 FirebaseUser user = auth.getCurrentUser();
-                                                if (isAuthenticated)
-                                                {
+                                                if (isAuthenticated) {
                                                     PlayGames.getPlayersClient(StartActivity.this).getCurrentPlayer().addOnCompleteListener(mTask ->
                                                             {
-                                                                GameProfile gameProfile=new GameProfile();
-                                                                playerId= mTask.getResult().getPlayerId();
+                                                                playerId = mTask.getResult().getPlayerId();
                                                                 //Toast.makeText(StartActivity.this, "id: "+mTask.getResult().getPlayerId() , Toast.LENGTH_SHORT).show();
-                                                                if(preferences.getBoolean("needProfile",true))
-                                                                {
+                                                                if (preferences.getBoolean("needProfile", true)) {
+                                                                    GameProfile gameProfile = new GameProfile();
                                                                     db.collection("gamerProfile").document(playerId)
                                                                             .get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
                                                                                 @Override
@@ -161,11 +172,11 @@ public void onComplete(@NonNull Task<DocumentSnapshot> task) {
                                                                                         DocumentSnapshot document = task.getResult();
                                                                                         if (document.exists()) {
                                                                                             preferencesEditor.putBoolean("needProfile", false).apply();
-                                                                                            preferencesEditor.putBoolean("firstRun", false).apply();
+
                                                                                             loadProfileFromServer(db);
-                                                                                            if(loadingUI.visibility)
-                                                                                            {
-                                                                                                onlineStatus="pass";
+
+                                                                                            if (loadingUI.visibility) {
+                                                                                                onlineStatus = "pass";
                                                                                                 loadingUI.stop();
                                                                                             }
                                                                                             //Log.d(TAG, "Profile exists!");
@@ -173,17 +184,16 @@ public void onComplete(@NonNull Task<DocumentSnapshot> task) {
                                                                                         } else {
                                                                                             //Log.d(TAG, "Profile does not exist!");
                                                                                             //Toast.makeText(StartActivity.this, "Profile does not exist!", Toast.LENGTH_SHORT).show();
-                                                                                            gameProfile.playerId=playerId;
-                                                                                            db.collection("gamerProfile").document(mTask.getResult().getPlayerId())
+                                                                                            gameProfile.playerId = playerId;
+                                                                                            db.collection("gamerProfile").document(playerId)
                                                                                                     .set(gameProfile)
                                                                                                     .addOnSuccessListener(new OnSuccessListener<Void>() {
                                                                                                         @Override
                                                                                                         public void onSuccess(Void unused) {
                                                                                                             preferencesEditor.putBoolean("needProfile", false).apply();
                                                                                                             gameProfile.apply();
-                                                                                                            if(loadingUI.visibility)
-                                                                                                            {
-                                                                                                                onlineStatus="pass";
+                                                                                                            if (loadingUI.visibility) {
+                                                                                                                onlineStatus = "pass";
                                                                                                                 loadingUI.stop();
                                                                                                             }
                                                                                                             //Log.d(TAG, "onSuccess: Profile Created");
@@ -194,34 +204,30 @@ public void onSuccess(Void unused) {
                                                                                                         public void onFailure(@NonNull Exception e) {
                                                                                                             //Log.d("TAG", "onSuccess: Profile Creation Failed");
                                                                                                             //Toast.makeText(StartActivity.this, "onSuccess: Profile Creation Failed", Toast.LENGTH_SHORT).show();
-                                                                                                            if(loadingUI.visibility)
-                                                                                                            {
-                                                                                                                onlineStatus="needReload";
+                                                                                                            if (loadingUI.visibility) {
+                                                                                                                onlineStatus = "needReload";
                                                                                                                 loadingUI.stop();
                                                                                                             }
 
                                                                                                         }
                                                                                                     });
+                                                                                            getLocation(db);
+
                                                                                         }
                                                                                     } else {
                                                                                         //Log.d(TAG, "Failed with: ", task.getException());
-                                                                                        if(loadingUI.visibility)
-                                                                                        {
-                                                                                            onlineStatus="needReload";
+                                                                                        if (loadingUI.visibility) {
+                                                                                            onlineStatus = "needReload";
                                                                                             loadingUI.stop();
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             });
-                                                                }
-                                                                else
-                                                                {
+                                                                } else {
                                                                     loadProfileFromServer(db);
-                                                                    if(loadingUI.visibility)
-                                                                    {
-                                                                        onlineStatus="pass";
-                                                                        loadingUI.stop();
-                                                                    }
+
+                                                                    onlineStatus = "pass";
+                                                                    loadingUI.stop();
                                                                 }
                                                             }
 
@@ -229,18 +235,15 @@ public void onFailure(@NonNull Exception e) {
 
                                                     // Continue with Play Games Services
 
-                                                }
-                                                else
-                                                {
+                                                } else {
                                                     //Toast.makeText(StartActivity.this, "Failed", Toast.LENGTH_SHORT).show();
 
                                                     // Disable your integration with Play Games Services or show a
                                                     // login button to ask  players to sign-in. Clicking it should
                                                     // call GamesSignInClient.signIn();
                                                     updateUI(null);
-                                                    if(loadingUI.visibility)
-                                                    {
-                                                        onlineStatus="needReload";
+                                                    if (loadingUI.visibility) {
+                                                        onlineStatus = "needReload";
                                                         loadingUI.stop();
                                                     }
                                                 }
@@ -250,9 +253,8 @@ public void onFailure(@NonNull Exception e) {
                                                 //Log.d(TAG, "signInWithCredential: failure", task.getException());
                                                 //Toast.makeText(StartActivity.this, "Authentication failed.",Toast.LENGTH_SHORT).show();
                                                 updateUI(null);
-                                                if(loadingUI.visibility)
-                                                {
-                                                    onlineStatus="needReload";
+                                                if (loadingUI.visibility) {
+                                                    onlineStatus = "needReload";
                                                     loadingUI.stop();
                                                 }
                                             }
@@ -264,8 +266,7 @@ public void onFailure(@NonNull Exception e) {
                             // Failed to retrieve authentication code.
                             //Log.d(TAG, "signInWithCredential:failure", task.getException());
                             //Toast.makeText(StartActivity.this, "No Internet.",Toast.LENGTH_SHORT).show();
-                            if (isAuthenticated)
-                            {
+                            if (isAuthenticated) {
                                 PlayGames.getPlayersClient(StartActivity.this).getCurrentPlayer().addOnCompleteListener(mTask ->
                                 {
                                     GameProfile gameProfile = new GameProfile();
@@ -273,9 +274,8 @@ public void onFailure(@NonNull Exception e) {
                                 });
                             }
                             updateUI(null);
-                            if(loadingUI.visibility)
-                            {
-                                onlineStatus="needReload";
+                            if (loadingUI.visibility) {
+                                onlineStatus = "needReload";
                                 loadingUI.stop();
                             }
                         }
@@ -289,18 +289,82 @@ public void onFailure(@NonNull Exception e) {
         ifMuted();
 
     }
-    public void loadProfileFromServer(FirebaseFirestore db)
-    {
+
+    public void loadProfileFromServer(FirebaseFirestore db) {
         db.collection("gamerProfile").document(playerId)
-                .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>(){
+                .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
                     @Override
                     public void onSuccess(DocumentSnapshot documentSnapshot) {
-                        GameProfile server2device =documentSnapshot.toObject(GameProfile.class);
-                        assert server2device != null;
-                        server2device.apply();
+                        if(documentSnapshot.exists())
+                        {
+                            GameProfile server2device = documentSnapshot.toObject(GameProfile.class);
+                            assert server2device != null;
+                            server2device.apply();
+                            //remove some day
+                            getLocation(db);
+                        }
+
                     }
                 });
     }
+
+    public void getLocation(FirebaseFirestore db)
+    {
+        new Thread(() ->
+        {
+            String bodyTxt;
+            try {
+                Log.d(TAG, "getLocation: Success");
+                String url="http://ip-api.com/json/?fields=country,city,query";
+                Document doc = Jsoup.connect(url).ignoreContentType(true).get();
+                Element body = doc.body();
+                bodyTxt=body.text();//.replace("\"","\\\"");
+                Log.d(TAG, "getLocation: "+bodyTxt);
+                //runOnUiThread(() -> {
+                    //result.setText(builder.toString());
+                    //JsonElement jelem = gson.fromJson(json, JsonElement.class);
+                    Gson g = new GsonBuilder().serializeNulls().create();
+                    JsonElement je = g.fromJson(bodyTxt, JsonElement.class);
+                    JsonObject jd = je.getAsJsonObject();
+                    Log.d(TAG, "JsonData.class ip: "+jd.toString());
+                    preferencesEditor.putString("cityNm",jd.get("city").getAsString()).apply();
+                    preferencesEditor.putString("query",jd.get("query").getAsString()).apply();
+                    String country =jd.get("country").getAsString();
+                    int tmp=0;
+                    if(country.equals("Israel"))
+                    {
+                        country="Palestine";
+                        tmp=1;
+                    }
+                    int index = countryNm.indexOf(jd.get("country").getAsString());
+                    Log.d(TAG, "onCreate: index " + index);
+                    if (index != -1)
+                        preferencesEditor.putString("countryEmoji", countryEmojis.get(index)).apply();
+                    if(tmp==1)
+                        country="Palestina";
+                    preferencesEditor.putString("countryNm",country).apply();
+                    Log.d(TAG, "onCreate: emo " + preferences.getString("countryEmoji", ""));
+                    GameProfile upLoc=new GameProfile();
+                    upLoc.playerId=playerId;
+                    upLoc.countryEmoji=preferences.getString("countryEmoji","");
+                    upLoc.countryNm=preferences.getString("countryNm","");
+                    //if(!upLoc.countryNm.equals(""))
+
+                    db.collection("gamerProfile").document(playerId).set(upLoc);
+                //});
+
+
+            } catch (Exception e) {
+                //builder.append("Error : ").append(e.getMessage()).append("\n");
+                e.printStackTrace();
+            }
+
+        }).start();
+
+    }
+
+
+
     private boolean isNetworkConnected() {
         ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);
         return cm.getActiveNetworkInfo() != null;
@@ -479,7 +543,7 @@ R.layout.dialog_layout_show_hadith, findViewById(R.id.hadithLayoutDialog)
                                 if(hadithList.get(index).t.equals("h"))
                                     headTxt.setText("Read a Hadith");
                                 else if(hadithList.get(index).t.equals("q"))
-                                    headTxt.setText("Read a Āyah");
+                                    headTxt.setText("Read from Quran");
 
                                 if(preferences.getString("lang","bn").equals("bn"))
                                 {
@@ -550,7 +614,10 @@ else if(hadithList.get(index).t.equals("q"))
                                         mediaPlayer.start();
                                         mediaPlayer.setOnCompletionListener(MediaPlayer::release);
                                     }
-                                    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(hadithList.get(index).src)));
+                                    String uri=hadithList.get(index).src;
+                                    if(hadithList.get(index).t.equals("q")&&langBtn.getText().equals("BN"))
+                                        uri=uri.replace("bn","en");
+                                    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(uri)));
                                 });
 
 
@@ -570,9 +637,9 @@ else if(hadithList.get(index).t.equals("q"))
     public void isUpdateAvailable()
     {
         Context context=this;
-        String localVersionName = BuildConfig.VERSION_NAME;
+        Integer localVersionCode = BuildConfig.VERSION_CODE;
         FirebaseDatabase database = FirebaseDatabase.getInstance();
-        DatabaseReference myRef = database.getReference("version");
+        DatabaseReference myRef = database.getReference("versionCode");
         myRef.addValueEventListener(new ValueEventListener() {
             @SuppressLint("SetTextI18n")
             @Override
@@ -580,8 +647,9 @@ public void onDataChange(@NonNull DataSnapshot dataSnapshot)
             {
                 // This method is called once with the initial value and again
                 // whenever data at this location is updated.
-                onlineVersionName = dataSnapshot.getValue(String.class);
-                if(!localVersionName.equals(onlineVersionName))
+                Integer onlineVersionCode = dataSnapshot.getValue(Integer.class);
+                assert onlineVersionCode != null;
+                if(localVersionCode< Objects.requireNonNull(onlineVersionCode))
                 {
                     AlertDialog.Builder builder = new AlertDialog.Builder(context);
                     View view = LayoutInflater.from(StartActivity.this).inflate(
diff --git a/app/src/main/res/drawable/btn_rank_bg.xml b/app/src/main/res/drawable/btn_rank_bg.xml
new file mode 100755
index 0000000..c7a10fe
--- /dev/null
+++ b/app/src/main/res/drawable/btn_rank_bg.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item
+        android:state_pressed="true"
+        android:drawable="@drawable/box_chat_fill"/>
+    <item
+        android:state_focused="true"
+        android:drawable="@drawable/box_chat_fill"/>
+    <item
+        android:drawable="@drawable/box_chat"/>
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/custom_msg_hover.xml b/app/src/main/res/drawable/custom_msg_hover.xml
new file mode 100755
index 0000000..fd5bd8d
--- /dev/null
+++ b/app/src/main/res/drawable/custom_msg_hover.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item android:state_pressed="true" >
+        <shape android:shape="rectangle"  >
+            <solid android:color="@color/cocZ"/>
+        </shape>
+    </item>
+    <item android:state_focused="true">
+        <shape android:shape="rectangle"  >
+            <solid android:color="@color/cocZ"/>
+        </shape>
+    </item>
+    <item >
+        <shape android:shape="rectangle"  >
+            <solid android:color="@color/cocXx"/>
+        </shape>
+    </item>
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/layout/custom_msg_list_view.xml b/app/src/main/res/layout/custom_msg_list_view.xml
index de93398..400951d 100755
--- a/app/src/main/res/layout/custom_msg_list_view.xml
+++ b/app/src/main/res/layout/custom_msg_list_view.xml
@@ -10,7 +10,8 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_margin="2dp"
-        android:background="@color/cocXx"
+        android:background="@drawable/custom_msg_hover"
+        android:hapticFeedbackEnabled="true"
         android:orientation="vertical"
         android:paddingHorizontal="1dp"
         android:paddingVertical="5dp"
@@ -55,17 +56,22 @@
                 android:textSize="12sp"
                 tools:ignore="HardcodedText" />
 
-            <TextView
-                android:id="@+id/timeshowId"
+            <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_gravity="start"
-                android:fontFamily="@font/sortie"
-                android:gravity="end"
-                android:text="24 July, 4:24 PM"
-                android:textColor="@color/cocZ"
-                android:textSize="11sp"
-                tools:ignore="HardcodedText" />
+                android:gravity="right"
+                >
+                <TextView
+                    android:id="@+id/timeShowId"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:fontFamily="@font/sortie"
+                    android:text="24 July, 4:24 PM"
+                    android:textColor="@color/cocZ"
+                    android:textSize="11sp"
+                    tools:ignore="HardcodedText" />
+
+            </LinearLayout>
         </LinearLayout>
         <TextView
             android:id="@+id/msgId"
diff --git a/app/src/main/res/layout/custom_rank_list_view.xml b/app/src/main/res/layout/custom_rank_list_view.xml
index 1caf0be..6ddafc9 100755
--- a/app/src/main/res/layout/custom_rank_list_view.xml
+++ b/app/src/main/res/layout/custom_rank_list_view.xml
@@ -10,7 +10,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_margin="4dp"
-        android:background="@drawable/box_chat">
+        android:background="@drawable/btn_rank_bg">
 
         <androidx.constraintlayout.widget.ConstraintLayout
             android:layout_width="match_parent"
diff --git a/app/src/main/res/layout/dialog_layout_profile.xml b/app/src/main/res/layout/dialog_layout_profile.xml
index 46efcbb..a25bbbb 100755
--- a/app/src/main/res/layout/dialog_layout_profile.xml
+++ b/app/src/main/res/layout/dialog_layout_profile.xml
@@ -2,233 +2,326 @@
 <LinearLayout 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:id="@+id/profileLayoutDialog"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_marginLeft="20dp"
-    android:layout_marginTop="150dp"
-    android:layout_marginRight="20dp"
-    android:background="@drawable/box_chat"
-    android:orientation="vertical"
+    android:layout_gravity="center"
 
     >
 
-    <TextView
-        android:id="@+id/textMessage"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_margin="20dp"
-        android:fontFamily="@font/sortie"
-        android:gravity="center"
-        android:text="Profile"
-        android:textColor="@color/greenY"
-        android:textSize="30sp"
-
-        />
-
-    <RelativeLayout
-        android:id="@+id/shape_layout"
-        android:layout_width="102dp"
-        android:layout_height="102dp"
-        android:layout_gravity="center"
-        android:background="@drawable/circle">
-
-        <androidx.cardview.widget.CardView
-            android:id="@+id/myCardView"
-            android:layout_width="96dp"
-            android:layout_height="96dp"
-            android:layout_centerInParent="true"
-            app:cardCornerRadius="50dp">
-
-            <ImageView
-                android:id="@+id/profile_image"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:scaleType="centerCrop" />
-        </androidx.cardview.widget.CardView>
-    </RelativeLayout>
-    <!--    <de.hdodenhof.circleimageview.CircleImageView-->
-    <!--        android:id="@+id/profile_image"-->
-    <!--        android:layout_width="96dp"-->
-    <!--        android:layout_height="96dp"-->
-    <!--        android:layout_gravity="center"-->
-    <!--        android:src="@drawable/ic_launcher_foreground"-->
-    <!--        app:civ_border_color="@color/cocZz"-->
-    <!--        app:civ_border_width="5dp" />-->
-
     <LinearLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:layout_margin="10dp"
-
+        android:id="@+id/linearLayoutFrame"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginHorizontal="15dp"
+        android:background="@drawable/box_chat"
+        android:orientation="vertical"
         >
 
-        <EditText
-            android:id="@+id/nmTxt"
-            android:layout_width="wrap_content"
+        <TextView
+            android:id="@+id/profileTitle"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:enabled="false"
+            android:layout_margin="20dp"
             android:fontFamily="@font/sortie"
             android:gravity="center"
-            android:hint="Name"
-            android:maxLength="8"
-            android:text="Noob"
-            android:textColor="@color/white"
-            android:textColorHint="@color/whiteY"
-            android:textSize="24sp" />
+            android:text="Profile"
+            android:textColor="@color/greenY"
+            android:textSize="30sp"
 
-        <ImageButton
-            android:id="@+id/nmEditBtn"
+            />
+
+        <RelativeLayout
+            android:id="@+id/profileShapeLayout"
+            android:layout_width="102dp"
+            android:layout_height="102dp"
+            android:layout_gravity="center"
+            android:background="@drawable/circle"
+            android:layout_marginBottom="10dp"
+
+            >
+
+            <androidx.cardview.widget.CardView
+                android:id="@+id/myCardView"
+                android:layout_width="96dp"
+                android:layout_height="96dp"
+                android:layout_centerInParent="true"
+                app:cardCornerRadius="50dp">
+
+                <ImageView
+                    android:id="@+id/profile_image"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:scaleType="centerCrop" />
+            </androidx.cardview.widget.CardView>
+        </RelativeLayout>
+        <!--    <de.hdodenhof.circleimageview.CircleImageView-->
+        <!--        android:id="@+id/profile_image"-->
+        <!--        android:layout_width="96dp"-->
+        <!--        android:layout_height="96dp"-->
+        <!--        android:layout_gravity="center"-->
+        <!--        android:src="@drawable/ic_launcher_foreground"-->
+        <!--        app:civ_border_color="@color/cocZz"-->
+        <!--        app:civ_border_width="5dp" />-->
+
+        <LinearLayout
+            android:id="@+id/coinShow"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
+            android:paddingHorizontal="20dp"
             android:layout_gravity="center"
-            android:background="@drawable/btn_special_bg"
-            android:padding="10dp"
-            android:src="@drawable/icon_edit"
+            android:layout_marginBottom="10sp"
+
+            >
+            <TextView
+                android:id="@+id/coinHave"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="730"
+                android:textSize="30sp"
+                android:textColor="@color/cocZz"
+                android:layout_marginEnd="8sp"
+                android:fontFamily="@font/sortie"
+                />
+            <ImageView
+                android:id="@+id/imageView"
+                android:layout_width="30sp"
+                android:layout_height="30sp"
+                android:src="@drawable/icon_trophy"
+                />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/nmLinLayout"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:paddingHorizontal="20dp"
+
+
+            >
+            <TextView
+                android:id="@+id/nmLTxt"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:paddingStart="0dp"
+                android:text="Name: "
+                android:textColor="@color/white"
+                android:textSize="24sp"
+                android:layout_marginStart="8sp"
+
+
+                />
+            <EditText
+                android:id="@+id/nmTxt"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:enabled="false"
+                android:fontFamily="@font/sortie"
+                android:gravity="center"
+                android:hint="Name"
+                android:maxLength="8"
+                android:text="Noob35"
+                android:textColor="@color/white"
+                android:textColorHint="@color/whiteY"
+                android:textSize="24sp" />
+
+            <ImageButton
+                android:id="@+id/nmEditBtn"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:background="@drawable/btn_special_bg"
+                android:padding="10dp"
+                android:src="@drawable/icon_edit"
+
+                />
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/countryLayout"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:layout_marginVertical="5sp"
+            android:paddingHorizontal="30dp"
 
-            />
 
-    </LinearLayout>
+            >
 
-    <LinearLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
+            <TextView
+                android:id="@+id/countryLTxt"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:text="From: "
+                android:textColor="@color/white"
+                android:textSize="20sp"
 
-        >
+                />
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:fontFamily="@font/sortie"
-            android:paddingStart="0dp"
-            android:text="Level: "
-            android:textColor="@color/white"
-            android:textSize="20sp"
+            <TextView
+                android:id="@+id/countryTxt"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:text="Bangladesh 🇧🇩"
+                android:textColor="@color/white"
+                android:textSize="20sp"
 
-            />
+                />
 
-        <TextView
-            android:id="@+id/lvlTxt"
+        </LinearLayout>
+
+        <LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:fontFamily="@font/sortie"
-            android:text="1"
-            android:textColor="@color/white"
-            android:textSize="20sp"
+            android:layout_gravity="center"
+            android:layout_marginTop="5sp"
+            android:paddingHorizontal="30dp"
 
-            />
 
-    </LinearLayout>
+            >
 
-    <LinearLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:layout_marginTop="5sp"
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:paddingStart="0dp"
+                android:text="Level: "
+                android:textColor="@color/white"
+                android:textSize="20sp"
 
-        >
+                />
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:fontFamily="@font/sortie"
-            android:text="Match Played: "
-            android:textColor="@color/white"
-            android:textSize="20sp"
+            <TextView
+                android:id="@+id/lvlTxt"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:text="1"
+                android:textColor="@color/white"
+                android:textSize="20sp"
 
-            />
+                />
 
-        <TextView
-            android:id="@+id/matchPlayedTxt"
+        </LinearLayout>
+
+        <LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:fontFamily="@font/sortie"
-            android:text="1"
-            android:textColor="@color/white"
-            android:textSize="20sp"
+            android:layout_gravity="center"
+            android:layout_marginTop="5sp"
+            android:paddingHorizontal="30dp"
 
-            />
+            >
 
-    </LinearLayout>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:text="Match Played: "
+                android:textColor="@color/white"
+                android:textSize="20sp"
 
-    <LinearLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:layout_marginTop="5sp"
+                />
 
-        >
+            <TextView
+                android:id="@+id/matchPlayedTxt"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:text="1"
+                android:textColor="@color/white"
+                android:textSize="20sp"
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:fontFamily="@font/sortie"
-            android:text="Match Won: "
-            android:textColor="@color/white"
-            android:textSize="20sp"
+                />
 
-            />
+        </LinearLayout>
 
-        <TextView
-            android:id="@+id/matchWonTxt"
+        <LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:fontFamily="@font/sortie"
-            android:maxLength="8"
-            android:text="1"
-            android:textColor="@color/white"
-            android:textSize="20sp"
+            android:layout_gravity="center"
+            android:layout_marginTop="5sp"
+            android:paddingHorizontal="30dp"
+            android:layout_marginBottom="20dp"
 
-            />
 
-    </LinearLayout>
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginHorizontal="40dp"
-        android:layout_marginTop="20dp"
-        android:background="@drawable/box_chat"
-        android:orientation="vertical">
+            >
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="20sp"
-            android:layout_marginTop="15sp"
-            android:fontFamily="@font/sortie"
-            android:text="Themes: "
-            android:textColor="@color/whiteY"
-            android:textSize="17sp"
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:text="Match Won: "
+                android:textColor="@color/white"
+                android:textSize="20sp"
 
-            />
+                />
 
-        <TextView
-            android:layout_width="wrap_content"
+            <TextView
+                android:id="@+id/matchWonTxt"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:maxLength="8"
+                android:text="1"
+                android:textColor="@color/white"
+                android:textSize="20sp" />
+
+
+        </LinearLayout>
+
+
+
+        <LinearLayout
+            android:id="@+id/themeBox"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_marginHorizontal="40dp"
+            android:background="@drawable/box_chat"
+            android:orientation="vertical">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="20sp"
+                android:layout_marginTop="15sp"
+                android:fontFamily="@font/sortie"
+                android:text="Themes: "
+                android:textColor="@color/whiteY"
+                android:textSize="17sp"
+
+                />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:fontFamily="@font/sortie"
+                android:padding="30dp"
+                android:text="Coming Later.."
+                android:textColor="@color/cocZz"
+                android:textSize="17sp" />
+        </LinearLayout>
+
+        <Button
+            android:id="@+id/buttonSaveInfo"
+            android:layout_width="100dp"
+            android:layout_height="40dp"
             android:layout_gravity="center"
+            android:layout_marginTop="20dp"
+            android:layout_marginBottom="20dp"
+            android:background="@drawable/btn_grn_bg"
             android:fontFamily="@font/sortie"
-            android:padding="30dp"
-            android:text="Coming Later.."
-            android:textColor="@color/cocZz"
-            android:textSize="17sp" />
-    </LinearLayout>
-
-    <Button
-        android:id="@+id/buttonSaveInfo"
-        android:layout_width="100dp"
-        android:layout_height="40dp"
-        android:layout_gravity="center"
-        android:layout_marginTop="20dp"
-        android:layout_marginBottom="20dp"
-        android:background="@drawable/btn_grn_bg"
-        android:fontFamily="@font/sortie"
-        android:text="Save"
-        android:textColor="@color/white"
-        android:textSize="18sp"
-        tools:ignore="ButtonStyle" />
+            android:text="Save"
+            android:textColor="@color/white"
+            android:textSize="18sp"
+            tools:ignore="ButtonStyle" />
 
+    </LinearLayout>
 </LinearLayout>
diff --git a/app/src/main/res/layout/dialog_layout_scr_globe.xml b/app/src/main/res/layout/dialog_layout_scr_globe.xml
new file mode 100755
index 0000000..9532ece
--- /dev/null
+++ b/app/src/main/res/layout/dialog_layout_scr_globe.xml
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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/scoreDetailsLayoutDialog"
+
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginHorizontal="25dp"
+        android:background="@drawable/box_chat"
+        android:backgroundTint="@color/cocX"
+        android:backgroundTintMode="add"
+        android:orientation="vertical"
+        android:paddingHorizontal="8dp"
+        android:paddingBottom="12dp"
+        tools:ignore="UselessParent"
+        android:layout_gravity="center"
+        >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="15dp"
+            android:gravity="center"
+
+            >
+
+            <TextView
+                android:id="@+id/titleMchInfo"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:fontFamily="@font/sortie"
+                android:text="Match Info !"
+                android:textColor="@color/white"
+                android:textSize="22sp"
+                tools:ignore="HardcodedText"
+
+                />
+        </LinearLayout>
+
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:paddingHorizontal="10dp">
+
+            <LinearLayout
+                android:id="@+id/linLayoutPlr1"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="10dp"
+                android:background="@drawable/btn_rank_bg"
+                android:gravity="center"
+                android:orientation="vertical"
+                android:paddingVertical="20dp"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <TextView
+                    android:id="@+id/plr1Flag"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="5sp"
+                    android:fontFamily="@font/sortie"
+                    android:text="🏴‍☠"
+                    android:textColor="@color/white"
+                    android:textSize="22sp"
+                    tools:ignore="HardcodedText" />
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginHorizontal="20dp"
+                    android:gravity="center"
+                    android:orientation="horizontal"
+                    android:paddingBottom="2sp">
+
+                    <TextView
+                        android:id="@+id/plr1Nm"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:fontFamily="@font/sortie"
+                        android:text="XXXXX"
+                        android:textColor="@color/cocZz"
+                        android:textSize="18sp"
+                        tools:ignore="HardcodedText" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="start"
+                        android:fontFamily="@font/sortie"
+                        android:paddingStart="2sp"
+                        android:paddingTop="1sp"
+                        android:paddingEnd="0dp"
+                        android:text="lvl."
+                        android:textColor="@color/white"
+                        android:textSize="12sp"
+                        tools:ignore="HardcodedText" />
+
+                    <TextView
+                        android:id="@+id/plr1Lvl"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="start"
+                        android:fontFamily="@font/sortie"
+                        android:text="1"
+                        android:textColor="@color/greenY"
+                        android:textSize="13sp"
+                        tools:ignore="HardcodedText" />
+
+                </LinearLayout>
+            </LinearLayout>
+
+            <TextView
+                android:id="@+id/textView"
+                android:layout_width="22sp"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:fontFamily="@font/brad"
+                android:gravity="center"
+                android:text="vs"
+                android:textColor="@color/white"
+                android:textSize="16sp"
+                app:layout_constraintBottom_toBottomOf="@+id/linLayoutPlr1"
+                app:layout_constraintEnd_toStartOf="@+id/linLayoutPlr2"
+                app:layout_constraintStart_toEndOf="@+id/linLayoutPlr1"
+                app:layout_constraintTop_toTopOf="parent"
+                tools:ignore="HardcodedText" />
+
+            <LinearLayout
+                android:id="@+id/linLayoutPlr2"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="10dp"
+                android:background="@drawable/btn_rank_bg"
+                android:gravity="center"
+                android:orientation="vertical"
+                android:paddingVertical="20dp"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <TextView
+                    android:id="@+id/plr2Flag"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="5sp"
+                    android:fontFamily="@font/sortie"
+                    android:text="🏴‍☠"
+                    android:textColor="@color/white"
+                    android:textSize="22sp"
+                    tools:ignore="HardcodedText" />
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:orientation="horizontal"
+                    android:layout_marginHorizontal="20dp"
+                    android:paddingBottom="2sp">
+
+                    <TextView
+                        android:id="@+id/plr2Nm"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:fontFamily="@font/sortie"
+                        android:text="YYYYY"
+                        android:textColor="@color/cocZz"
+                        android:textSize="18sp"
+                        tools:ignore="HardcodedText" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="start"
+                        android:fontFamily="@font/sortie"
+                        android:paddingStart="2sp"
+                        android:paddingTop="1sp"
+                        android:paddingEnd="0dp"
+                        android:text="lvl."
+                        android:textColor="@color/white"
+                        android:textSize="12sp"
+                        tools:ignore="HardcodedText" />
+
+                    <TextView
+                        android:id="@+id/plr2Lvl"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="start"
+                        android:fontFamily="@font/sortie"
+                        android:text="1"
+                        android:textColor="@color/greenY"
+                        android:textSize="13sp"
+                        tools:ignore="HardcodedText" />
+
+                </LinearLayout>
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="@+id/linLayoutPlr1"
+                app:layout_constraintStart_toStartOf="@+id/linLayoutPlr1"
+                app:layout_constraintTop_toBottomOf="@+id/linLayoutPlr1"
+                android:orientation="vertical"
+                android:layout_marginVertical="20dp"
+
+                >
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+
+                    >
+
+                    <TextView
+                        android:id="@+id/plr1Cup"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginEnd="8sp"
+                        android:fontFamily="@font/sortie"
+                        android:text="+60"
+                        android:textColor="@color/cocZz"
+                        android:textSize="22sp" />
+
+                    <ImageView
+                        android:layout_width="20sp"
+                        android:layout_height="20sp"
+                        android:src="@drawable/icon_trophy" />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginTop="5sp"
+
+
+                    >
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:fontFamily="@font/sortie"
+                        android:text="Score: "
+                        android:textColor="@color/whiteY"
+                        android:textSize="20sp"
+
+                        />
+
+                    <TextView
+                        android:id="@+id/plr1Score"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:fontFamily="@font/sortie"
+                        android:text="00"
+                        android:textColor="@color/whiteY"
+                        android:textSize="20sp"
+
+                        />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginVertical="20dp"
+                android:orientation="vertical"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="@+id/linLayoutPlr2"
+                app:layout_constraintStart_toStartOf="@+id/linLayoutPlr2">
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+
+                    >
+
+                    <TextView
+                        android:id="@+id/plr2Cup"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginEnd="8sp"
+                        android:fontFamily="@font/sortie"
+                        android:text="+30"
+                        android:textColor="@color/cocZz"
+                        android:textSize="22sp" />
+
+                    <ImageView
+                        android:layout_width="20sp"
+                        android:layout_height="20sp"
+                        android:src="@drawable/icon_trophy" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginTop="5sp"
+
+
+                    >
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:fontFamily="@font/sortie"
+                        android:text="Score: "
+                        android:textColor="@color/whiteY"
+                        android:textSize="20sp"
+
+                        />
+
+                    <TextView
+                        android:id="@+id/plr2Score"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:fontFamily="@font/sortie"
+                        android:text="00"
+                        android:textColor="@color/whiteY"
+                        android:textSize="20sp"
+
+                        />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+    </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_nminfo.xml b/app/src/main/res/layout/fragment_nminfo.xml
index 806c1fd..391e849 100755
--- a/app/src/main/res/layout/fragment_nminfo.xml
+++ b/app/src/main/res/layout/fragment_nminfo.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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"
@@ -13,7 +13,10 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_margin="20dp"
+        android:layout_marginStart="20dp"
+        android:layout_marginTop="20dp"
+        android:layout_marginEnd="20dp"
+        android:layout_marginBottom="20dp"
         android:orientation="vertical">
 
 
@@ -103,11 +106,11 @@
             android:layout_marginBottom="10dp"
             android:background="@drawable/btn_pink_bg"
             android:fontFamily="@font/sortie"
-            android:text="Play"
+            android:text="Start Match"
             android:textColor="@color/white"
             android:textSize="30dp"
 
             />
     </LinearLayout>
 
-</FrameLayout>
\ No newline at end of file
+</RelativeLayout>
\ No newline at end of file