TickAdsLite v3.1版本的 MD5 值为:7ff5236e2d7beb37efeddcb8fe8d4660

以下内容为反编译后的 MainActivity.java 源代码,内容仅作参考


package com.nishantsharma.tickadslite;

import android.app.AlertDialog;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.GradientDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.util.SparseBooleanArray;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.FirebaseApp;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
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.GenericTypeIndicator;
import com.unity3d.ads.metadata.MediationMetaData;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
public class MainActivity extends AppCompatActivity {
    private TextView ContactDeveloper;
    private LinearLayout TutorialGamid;
    private OnCompleteListener<AuthResult> _auth_create_user_listener;
    private OnCompleteListener<Void> _auth_reset_password_listener;
    private OnCompleteListener<AuthResult> _auth_sign_in_listener;
    private ChildEventListener _database_child_listener;
    private ChildEventListener _usertasks_child_listener;
    private FirebaseAuth auth;
    private OnCompleteListener<Void> auth_deleteUserListener;
    private OnCompleteListener<Void> auth_emailVerificationSentListener;
    private OnCompleteListener<AuthResult> auth_googleSignInListener;
    private OnCompleteListener<AuthResult> auth_phoneAuthListener;
    private OnCompleteListener<Void> auth_updateEmailListener;
    private OnCompleteListener<Void> auth_updatePasswordListener;
    private OnCompleteListener<Void> auth_updateProfileListener;
    private Button button1;
    private Button button2;
    private AlertDialog c;
    private CheckBox checkbox1;
    private EditText emailedtxt;
    private ImageView imageview1;
    private ImageView imageview2;
    private ImageView imageview3;
    private ImageView imageview4;
    private ImageView imageview6;
    private ImageView imageview7;
    private ImageView imageview8;
    private LinearLayout linear10;
    private LinearLayout linear11;
    private LinearLayout linear15;
    private LinearLayout linear16;
    private LinearLayout linear3;
    private LinearLayout linear4;
    private LinearLayout linear6;
    private LinearLayout linear8;
    private LinearLayout linear9;
    private EditText passwordedtxt;
    private TextView textview1;
    private TimerTask trm;
    private EditText unityid_edittext;
    private EditText username;
    private ScrollView vscroll1;
    private Timer _timer = new Timer();
    private FirebaseDatabase _firebase = FirebaseDatabase.getInstance();
    private boolean ischeck = false;
    private HashMap<String, Object> Users = new HashMap<>();
    private Intent i = new Intent();
    private DatabaseReference database = this._firebase.getReference("user");
    private DatabaseReference usertasks = this._firebase.getReference("usertasks");
    private Calendar d = Calendar.getInstance();

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.main);
        initialize(bundle);
        FirebaseApp.initializeApp(this);
        initializeLogic();
    }

    private void initialize(Bundle bundle) {
        this.linear6 = (LinearLayout) findViewById(R.id.linear6);
        this.linear3 = (LinearLayout) findViewById(R.id.linear3);
        this.imageview6 = (ImageView) findViewById(R.id.imageview6);
        this.imageview7 = (ImageView) findViewById(R.id.imageview7);
        this.vscroll1 = (ScrollView) findViewById(R.id.vscroll1);
        this.ContactDeveloper = (TextView) findViewById(R.id.ContactDeveloper);
        this.linear16 = (LinearLayout) findViewById(R.id.linear16);
        this.linear8 = (LinearLayout) findViewById(R.id.linear8);
        this.linear9 = (LinearLayout) findViewById(R.id.linear9);
        this.linear10 = (LinearLayout) findViewById(R.id.linear10);
        this.linear11 = (LinearLayout) findViewById(R.id.linear11);
        this.checkbox1 = (CheckBox) findViewById(R.id.checkbox1);
        this.linear4 = (LinearLayout) findViewById(R.id.linear4);
        this.imageview3 = (ImageView) findViewById(R.id.imageview3);
        this.username = (EditText) findViewById(R.id.username);
        this.imageview2 = (ImageView) findViewById(R.id.imageview2);
        this.emailedtxt = (EditText) findViewById(R.id.emailedtxt);
        this.imageview1 = (ImageView) findViewById(R.id.imageview1);
        this.unityid_edittext = (EditText) findViewById(R.id.unityid_edittext);
        this.TutorialGamid = (LinearLayout) findViewById(R.id.TutorialGamid);
        this.textview1 = (TextView) findViewById(R.id.textview1);
        this.linear15 = (LinearLayout) findViewById(R.id.linear15);
        this.imageview8 = (ImageView) findViewById(R.id.imageview8);
        this.imageview4 = (ImageView) findViewById(R.id.imageview4);
        this.passwordedtxt = (EditText) findViewById(R.id.passwordedtxt);
        this.button1 = (Button) findViewById(R.id.button1);
        this.button2 = (Button) findViewById(R.id.button2);
        this.auth = FirebaseAuth.getInstance();
        this.ContactDeveloper.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                MainActivity.this.i.setAction("android.intent.action.VIEW");
                MainActivity.this.i.setData(Uri.parse("https://telegram.me/NishantSharmaOP"));
                MainActivity.this.startActivity(MainActivity.this.i);
            }
        });
        this.checkbox1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                MainActivity.this.ischeck = z;
            }
        });
        this.TutorialGamid.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                MainActivity.this.i.setAction("android.intent.action.VIEW");
                MainActivity.this.i.setData(Uri.parse("https://youtu.be/G9ZNVqD7kp0"));
                MainActivity.this.startActivity(MainActivity.this.i);
            }
        });
        this.button1.setOnClickListener(new AnonymousClass4());
        this.button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                MainActivity.this.i.setClass(MainActivity.this.getApplicationContext(), LoginActivity.class);
                MainActivity.this.startActivity(MainActivity.this.i);
                MainActivity.this.finish();
            }
        });
        this._database_child_listener = new ChildEventListener() {
            @Override
            public void onChildAdded(DataSnapshot dataSnapshot, String str) {
                GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
                };
                dataSnapshot.getKey();
                HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
            }

            @Override
            public void onChildChanged(DataSnapshot dataSnapshot, String str) {
                GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
                };
                dataSnapshot.getKey();
                HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
            }

            @Override
            public void onChildMoved(DataSnapshot dataSnapshot, String str) {
            }

            @Override
            public void onChildRemoved(DataSnapshot dataSnapshot) {
                GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
                };
                dataSnapshot.getKey();
                HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
            }

            @Override
            public void onCancelled(DatabaseError databaseError) {
                databaseError.getCode();
                databaseError.getMessage();
            }
        };
        this.database.addChildEventListener(this._database_child_listener);
        this._usertasks_child_listener = new ChildEventListener() {
            @Override
            public void onChildAdded(DataSnapshot dataSnapshot, String str) {
                GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
                };
                dataSnapshot.getKey();
                HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
            }

            @Override
            public void onChildChanged(DataSnapshot dataSnapshot, String str) {
                GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
                };
                dataSnapshot.getKey();
                HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
            }

            @Override
            public void onChildMoved(DataSnapshot dataSnapshot, String str) {
            }

            @Override
            public void onChildRemoved(DataSnapshot dataSnapshot) {
                GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
                };
                dataSnapshot.getKey();
                HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
            }

            @Override
            public void onCancelled(DatabaseError databaseError) {
                databaseError.getCode();
                databaseError.getMessage();
            }
        };
        this.usertasks.addChildEventListener(this._usertasks_child_listener);
        this.auth_updateEmailListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.auth_updatePasswordListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.auth_emailVerificationSentListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.auth_deleteUserListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.auth_phoneAuthListener = new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(Task<AuthResult> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.auth_updateProfileListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.auth_googleSignInListener = new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(Task<AuthResult> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this._auth_create_user_listener = new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(Task<AuthResult> task) {
                boolean isSuccessful = task.isSuccessful();
                String message = task.getException() != null ? task.getException().getMessage() : "";
                if (isSuccessful) {
                    MainActivity.this.Users = new HashMap();
                    MainActivity.this.Users.put(MediationMetaData.KEY_NAME, MainActivity.this.username.getText().toString());
                    MainActivity.this.Users.put("user_gmail", FirebaseAuth.getInstance().getCurrentUser().getEmail());
                    MainActivity.this.Users.put("user_unity", MainActivity.this.unityid_edittext.getText().toString());
                    MainActivity.this.Users.put("apply", "false");
                    MainActivity.this.Users.put("adwatch", "0");
                    MainActivity.this.Users.put("uid", FirebaseAuth.getInstance().getCurrentUser().getUid());
                    MainActivity.this.Users.put("isonline", "");
                    MainActivity.this.Users.put("totaladwatch", "0");
                    MainActivity.this.Users.put("answer", "");
                    MainActivity.this.Users.put("Rwatch", "3");
                    MainActivity.this.Users.put("Iwatch", "10");
                    MainActivity.this.Users.put("Ban", "false");
                    MainActivity.this.d = Calendar.getInstance();
                    MainActivity.this.Users.put("todaydate", new SimpleDateFormat("dd-MM-yyyy").format(MainActivity.this.d.getTime()));
                    MainActivity.this.database.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).updateChildren(MainActivity.this.Users);
                    MainActivity.this.Users.clear();
                    MainActivity.this.i.setClass(MainActivity.this.getApplicationContext(), DashboardActivity.class);
                    MainActivity.this.c.dismiss();
                    MainActivity.this.startActivity(MainActivity.this.i);
                    SketchwareUtil.showMessage(MainActivity.this.getApplicationContext(), "Account Successfully Create ✅");
                    MainActivity.this.finish();
                    return;
                }
                MainActivity.this.c.dismiss();
                SketchwareUtil.showMessage(MainActivity.this.getApplicationContext(), message);
            }
        };
        this._auth_sign_in_listener = new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(Task<AuthResult> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this._auth_reset_password_listener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
            }
        };
    }

    public class AnonymousClass4 implements View.OnClickListener {
        AnonymousClass4() {
        }

        @Override
        public void onClick(View view) {
            if (MainActivity.this.username.getText().toString().length() > 3) {
                if (!MainActivity.this.passwordedtxt.getText().toString().equals("") || !MainActivity.this.emailedtxt.getText().toString().equals("")) {
                    if (MainActivity.this.passwordedtxt.getText().toString().length() > 5) {
                        if (MainActivity.this.unityid_edittext.getText().toString().length() == 7) {
                            if (MainActivity.this.ischeck) {
                                MainActivity.this.c = new AlertDialog.Builder(MainActivity.this).create();
                                View inflate = MainActivity.this.getLayoutInflater().inflate(R.layout.probar, (ViewGroup) null);
                                MainActivity.this.c.setView(inflate);
                                MainActivity.this.c.getWindow().setBackgroundDrawable(new ColorDrawable(0));
                                MainActivity.this.c.setCancelable(false);
                                ((LinearLayout) inflate.findViewById(R.id.background)).setBackground(new GradientDrawable() {
                                    public GradientDrawable getIns(int i, int i2) {
                                        setCornerRadius(i);
                                        setColor(i2);
                                        return this;
                                    }
                                }.getIns(40, -14273992));
                                TextView textView = (TextView) inflate.findViewById(R.id.message);
                                textView.setText("Creating account please wait.");
                                MainActivity.this.trm = new AnonymousClass2(textView);
                                MainActivity.this._timer.scheduleAtFixedRate(MainActivity.this.trm, 500L, 500L);
                                MainActivity.this.c.show();
                                MainActivity.this.auth.createUserWithEmailAndPassword(MainActivity.this.emailedtxt.getText().toString().trim(), MainActivity.this.passwordedtxt.getText().toString().trim()).addOnCompleteListener(MainActivity.this, MainActivity.this._auth_create_user_listener);
                                return;
                            }
                            SketchwareUtil.showMessage(MainActivity.this.getApplicationContext(), "Pls Check the Box 🚫");
                            return;
                        }
                        SketchwareUtil.showMessage(MainActivity.this.getApplicationContext(), "Pls enter Correct GameID❌");
                        return;
                    }
                    SketchwareUtil.showMessage(MainActivity.this.getApplicationContext(), "Password Must be of Minimum 5 digit ❌");
                    return;
                }
                SketchwareUtil.showMessage(MainActivity.this.getApplicationContext(), "Please Enter Correct Email and Password ❌");
                return;
            }
            SketchwareUtil.showMessage(MainActivity.this.getApplicationContext(), "Pls Enter Full Name ❌");
        }

        class AnonymousClass2 extends TimerTask {
            private final TextView val$cmessage;

            AnonymousClass2(TextView textView) {
                this.val$cmessage = textView;
            }

            @Override
            public void run() {
                MainActivity mainActivity = MainActivity.this;
                final TextView textView = this.val$cmessage;
                mainActivity.runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        MainActivity mainActivity2 = MainActivity.this;
                        final TextView textView2 = textView;
                        mainActivity2.trm = new TimerTask() {
                            @Override
                            public void run() {
                                MainActivity mainActivity3 = MainActivity.this;
                                final TextView textView3 = textView2;
                                mainActivity3.runOnUiThread(new Runnable() {
                                    @Override
                                    public void run() {
                                        textView3.setText("Creating account please wait..");
                                    }
                                });
                            }
                        };
                        MainActivity.this._timer.schedule(MainActivity.this.trm, 250L);
                        MainActivity mainActivity3 = MainActivity.this;
                        final TextView textView3 = textView;
                        mainActivity3.trm = new TimerTask() {
                            @Override
                            public void run() {
                                MainActivity mainActivity4 = MainActivity.this;
                                final TextView textView4 = textView3;
                                mainActivity4.runOnUiThread(new Runnable() {
                                    @Override
                                    public void run() {
                                        textView4.setText("Creating account please wait....");
                                    }
                                });
                            }
                        };
                        MainActivity.this._timer.schedule(MainActivity.this.trm, 500L);
                    }
                });
            }
        }
    }

    private void initializeLogic() {
        Window window = getWindow();
        window.clearFlags(67108864);
        window.addFlags(Integer.MIN_VALUE);
        window.setStatusBarColor(Color.parseColor("#263238"));
        _setcorner(this.username, 30.0d, 30.0d, "#E0E0E0");
        _setcorner(this.emailedtxt, 30.0d, 30.0d, "#E0E0E0");
        _setcorner(this.unityid_edittext, 30.0d, 30.0d, "#E0E0E0");
        _setcorner(this.ContactDeveloper, 9.0d, 9.0d, "#ffcdd2");
        _setcorner(this.passwordedtxt, 30.0d, 30.0d, "#E0E0E0");
        _setcorner(this.TutorialGamid, 30.0d, 30.0d, "#f44336");
        _setcorner(this.linear3, 40.0d, 30.0d, "#263238");
    }

    public void _setcorner(View view, double d, double d2, String str) {
        GradientDrawable gradientDrawable = new GradientDrawable();
        gradientDrawable.setColor(Color.parseColor(str));
        gradientDrawable.setCornerRadius((float) d);
        view.setElevation((float) d2);
        view.setBackground(gradientDrawable);
    }

    @Deprecated
    public void showMessage(String str) {
        Toast.makeText(getApplicationContext(), str, 0).show();
    }

    @Deprecated
    public int getLocationX(View view) {
        int[] iArr = new int[2];
        view.getLocationInWindow(iArr);
        return iArr[0];
    }

    @Deprecated
    public int getLocationY(View view) {
        int[] iArr = new int[2];
        view.getLocationInWindow(iArr);
        return iArr[1];
    }

    @Deprecated
    public int getRandom(int i, int i2) {
        return new Random().nextInt((i2 - i) + 1) + i;
    }

    @Deprecated
    public ArrayList<Double> getCheckedItemPositionsToArray(ListView listView) {
        ArrayList<Double> arrayList = new ArrayList<>();
        SparseBooleanArray checkedItemPositions = listView.getCheckedItemPositions();
        for (int i = 0; i < checkedItemPositions.size(); i++) {
            if (checkedItemPositions.valueAt(i)) {
                arrayList.add(Double.valueOf(checkedItemPositions.keyAt(i)));
            }
        }
        return arrayList;
    }

    @Deprecated
    public float getDip(int i) {
        return TypedValue.applyDimension(1, i, getResources().getDisplayMetrics());
    }

    @Deprecated
    public int getDisplayWidthPixels() {
        return getResources().getDisplayMetrics().widthPixels;
    }

    @Deprecated
    public int getDisplayHeightPixels() {
        return getResources().getDisplayMetrics().heightPixels;
    }
}