Notify v1.3版本的 MD5 值为:895e81227cabff93166e4db568124d5d
以下内容为反编译后的 AmountActivity.java 源代码,内容仅作参考
package com.notify.app;
import android.app.ProgressDialog;
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.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import com.notify.app.RequestNetwork;
import com.sketchify.util.connection;
import com.sketchify.util.paymentState;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Random;
public class AmountActivity extends AppCompatActivity {
private RequestNetwork.RequestListener _req_request_listener;
private EditText app_name;
private CardView cardview1;
private ProgressDialog coreprog;
private ImageView imageview1;
private LinearLayout linear1;
private LinearLayout linear16;
private LinearLayout linear2;
private LinearLayout linear3;
private LinearLayout linearButtion;
private LinearLayout linearOne;
private LinearLayout linearTWo;
private EditText packagename;
private RequestNetwork req;
private TextView textview5;
private TextView textview6;
private String api = "";
private String group = "";
private Calendar time = Calendar.getInstance();
private Intent i = new Intent();
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.amount);
initialize(bundle);
initializeLogic();
}
private void initialize(Bundle bundle) {
this.linear1 = (LinearLayout) findViewById(R.id.linear1);
this.linear2 = (LinearLayout) findViewById(R.id.linear2);
this.linear16 = (LinearLayout) findViewById(R.id.linear16);
this.linear3 = (LinearLayout) findViewById(R.id.linear3);
this.textview5 = (TextView) findViewById(R.id.textview5);
this.cardview1 = (CardView) findViewById(R.id.cardview1);
this.imageview1 = (ImageView) findViewById(R.id.imageview1);
this.linearOne = (LinearLayout) findViewById(R.id.linearOne);
this.linearTWo = (LinearLayout) findViewById(R.id.linearTWo);
this.linearButtion = (LinearLayout) findViewById(R.id.linearButtion);
this.app_name = (EditText) findViewById(R.id.app_name);
this.packagename = (EditText) findViewById(R.id.packagename);
this.textview6 = (TextView) findViewById(R.id.textview6);
this.req = new RequestNetwork(this);
this.textview5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
AmountActivity.this.i.setData(Uri.parse("https://t.me/contributors_notify"));
AmountActivity.this.i.setAction("android.intent.action.VIEW");
AmountActivity.this.startActivity(AmountActivity.this.i);
}
});
this.linearButtion.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!AmountActivity.this.app_name.getText().toString().equals("")) {
if (!AmountActivity.this.packagename.getText().toString().equals("")) {
connection.sketchifyPayment(AmountActivity.this, Double.parseDouble(AmountActivity.this.packagename.getText().toString()), "pub-sketchify-1853963285");
return;
} else {
SketchwareUtil.showMessage(AmountActivity.this.getApplicationContext(), "Amount ");
return;
}
}
SketchwareUtil.showMessage(AmountActivity.this.getApplicationContext(), "Your Name");
}
});
this._req_request_listener = new RequestNetwork.RequestListener() {
@Override
public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
AmountActivity.this._Custom_Loading(false);
}
@Override
public void onErrorResponse(String str, String str2) {
AmountActivity.this._Custom_Loading(false);
SketchwareUtil.showMessage(AmountActivity.this.getApplicationContext(), str2);
}
};
}
private void initializeLogic() {
this.api = "6462720459:AAFK-wiXsJ5US5uBjnJAjQz-_5Jmr5b5bI4";
this.group = " @contributors_notify";
}
@Override
public void onResume() {
super.onResume();
double d = connection.state;
if (paymentState.getState == 0.0d) {
SketchwareUtil.showMessage(getApplicationContext(), "Opps! Payment Failed. No Problem Thankyou For Thinking About This.");
paymentState.callBack();
} else if (paymentState.getState == 1.0d) {
_Custom_Loading(true);
this.req.startRequestNetwork("POST", "https://api.telegram.org/bot".concat(this.api.concat("/sendMessage?chat_id=".concat(this.group.trim().concat("&text=".concat("Thankyou For Your Contribution ( Supporting ) In Notify\n\n".concat("Thankyou \"".concat(this.app_name.getText().toString().concat("\"".concat("For Your Support With The Amount \"₹".concat(this.packagename.getText().toString().concat("\" \n\nOn the Date \"".concat(new SimpleDateFormat("hh:mm:ss, cccc, dd MMMM yyyy").format(this.time.getTime()).concat("\"\n\nThankyou,\nTeam Notify"))))))))))))), "Telegram", this._req_request_listener);
SketchwareUtil.showMessage(getApplicationContext(), "Thankyou For Your Support!");
paymentState.callBack();
} else if (paymentState.getState == 2.0d) {
paymentState.callBack();
SketchwareUtil.showMessage(getApplicationContext(), "Invalid Api");
}
}
public void _Custom_Loading(boolean z) {
if (z) {
if (this.coreprog == null) {
this.coreprog = new ProgressDialog(this);
this.coreprog.setCancelable(false);
this.coreprog.setCanceledOnTouchOutside(false);
this.coreprog.requestWindowFeature(1);
this.coreprog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
}
this.coreprog.setMessage(null);
this.coreprog.show();
View inflate = getLayoutInflater().inflate(R.layout.custom_dialog, (ViewGroup) null);
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setColor(Color.parseColor("#FFFFFF"));
gradientDrawable.setCornerRadius(100.0f);
((LinearLayout) inflate.findViewById(R.id.linear_base)).setBackground(gradientDrawable);
this.coreprog.setContentView(inflate);
} else if (this.coreprog != null) {
this.coreprog.dismiss();
}
}
@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;
}
}