正在查看: SpeedCash v6.5.1482 应用的 FragmentShareLink.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: SpeedCash v6.5.1482 应用的 FragmentShareLink.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bm.sc.bebasbayar.ui.fragment.account;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.handler.MessageComposer;
import com.bm.sc.bebasbayar.handler.MessageSender;
import com.bm.sc.bebasbayar.helper.Affinity;
import com.bm.sc.bebasbayar.iface.BBCallback;
import com.bm.sc.bebasbayar.iface.MessageProcess;
import com.bm.sc.bebasbayar.message.BaseMessage;
import com.bm.sc.bebasbayar.message.api.APIMessageWrapper;
import com.bm.sc.bebasbayar.message.qr.DataMessage;
import com.bm.sc.bebasbayar.service.BBDownloadManager;
import com.bm.sc.bebasbayar.setting.session.FirebaseSession;
import com.bm.sc.bebasbayar.ui.fragment.BaseDialogFragment;
import com.bm.sc.bebasbayar.ui.fragment.account.FragmentShareLink;
import com.bm.sc.util.format.Mapper;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;
import org.jetbrains.annotations.NotNull;
public class FragmentShareLink extends BaseDialogFragment {
public String v;
public String w;
public class a implements MessageProcess {
public final BBCallback a;
public a(BBCallback bBCallback) {
this.a = bBCallback;
}
@Override
public void afterProcess(BaseMessage baseMessage) {
APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper(baseMessage);
if (!aPIMessageWrapper.isOK() || !(aPIMessageWrapper.getItem("data") instanceof ArrayList)) {
Affinity.info(FragmentShareLink.this.getActivity(), false, "Gagal mengambil data komunitas Anda, silahkan ulangi beberapa saat lagi.");
FragmentShareLink.this.dismiss();
} else {
BBCallback bBCallback = this.a;
if (bBCallback != null) {
bBCallback.do_callback(0, aPIMessageWrapper);
}
}
}
@Override
public void backgroundProcess(long j, long j2, boolean z) {
}
@Override
public void preProcess() {
}
}
public void l(View view, Typeface typeface, int i, APIMessageWrapper aPIMessageWrapper) {
String str;
TextView textView = (TextView) view.findViewById(R.id.link_web);
textView.setTypeface(typeface, 1);
TextView textView2 = (TextView) view.findViewById(R.id.link_ps);
textView2.setTypeface(typeface, 1);
TextView textView3 = (TextView) view.findViewById(R.id.link_pss);
textView3.setTypeface(typeface, 1);
String str2 = "?b=" + ((String) ((ArrayList) aPIMessageWrapper.getItem("data")).get(0));
textView.setText(this.v + str2);
textView.setOnClickListener(this);
HashMap hashMap = new HashMap();
hashMap.put(FirebaseSession.PROPERTY_UTM_SOURCE, this.w);
hashMap.put(FirebaseSession.PROPERTY_UTM_MEDIUM, "android");
hashMap.put(FirebaseSession.PROPERTY_UTM_TERM, "upline");
hashMap.put(FirebaseSession.PROPERTY_UTM_CONTENT, "registrasi%20dengan%20upline%20" + this.w);
hashMap.put(FirebaseSession.PROPERTY_UTM_CAMPAIGN, "SPEEDCASH".toLowerCase(Locale.getDefault()));
try {
str = URLEncoder.encode(Mapper.mapToQueryString(hashMap), "UTF-8");
} catch (UnsupportedEncodingException unused) {
str = "";
}
textView2.setText("https://play.google.com/store/apps/details?id=" + requireActivity().getPackageName() + "&referrer=" + str);
textView2.setOnClickListener(this);
textView3.setText(this.v + "play-store/" + str2);
textView3.setOnClickListener(this);
view.findViewById(R.id.link_web_copy).setOnClickListener(this);
view.findViewById(R.id.link_web_share).setOnClickListener(this);
view.findViewById(R.id.link_ps_copy).setOnClickListener(this);
view.findViewById(R.id.link_ps_share).setOnClickListener(this);
view.findViewById(R.id.link_pss_copy).setOnClickListener(this);
view.findViewById(R.id.link_pss_share).setOnClickListener(this);
}
@Override
public String getFragmentName() {
return getClass().getSimpleName();
}
@Override
public int getLayoutResource() {
return R.layout.component_detail_affiliasi_filled;
}
public final void k(BBCallback<APIMessageWrapper> bBCallback) {
APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper();
aPIMessageWrapper.setItem("id", this.w);
MessageComposer messageComposer = new MessageComposer(2, "merchants/linkafiliasi");
messageComposer.setRequest_method(MessageComposer.GET);
messageComposer.setData_type(2);
messageComposer.setIs_credential(true);
messageComposer.setIs_cancelable(false);
messageComposer.setIs_encrypted(false);
messageComposer.setMessageProcess(new a(bBCallback));
MessageSender messageSender = new MessageSender(getActivity(), messageComposer);
messageSender.setRequestMessage(aPIMessageWrapper);
messageSender.execute();
}
@Override
public void onClick(View view) {
if (view.getId() == 2131364659) {
Affinity.copy(getActivity(), ((TextView) getRootView().findViewById(R.id.link_web)).getText().toString());
return;
}
if (view.getId() == 2131364660) {
Affinity.send_general(requireActivity(), ((TextView) getRootView().findViewById(R.id.link_web)).getText().toString(), getString(2132017323), "Pilih tujuan share");
return;
}
if (view.getId() == 2131364652) {
Affinity.copy(getActivity(), ((TextView) getRootView().findViewById(R.id.link_ps)).getText().toString());
return;
}
if (view.getId() == 2131364653) {
Affinity.send_general(requireActivity(), ((TextView) getRootView().findViewById(R.id.link_ps)).getText().toString(), getString(2132017323), "Pilih tujuan share");
return;
}
if (view.getId() == 2131364655) {
Affinity.copy(getActivity(), ((TextView) getRootView().findViewById(R.id.link_pss)).getText().toString());
} else if (view.getId() == 2131364656) {
Affinity.send_general(requireActivity(), ((TextView) getRootView().findViewById(R.id.link_pss)).getText().toString(), getString(2132017323), "Pilih tujuan share");
} else {
super.onClick(view);
}
}
@Override
public void onViewCreated(@NonNull @NotNull final View view, @Nullable Bundle bundle) {
super.onViewCreated(view, bundle);
this.v = requireArguments().getString("url_landing");
this.w = requireArguments().getString(DataMessage.ID_OUTLET);
final Typeface createFromAsset = Typeface.createFromAsset(requireActivity().getAssets(), getString(R.string.font_invoice));
k(new BBCallback() {
@Override
public final void do_callback(int i, Object obj) {
FragmentShareLink.this.l(view, createFromAsset, i, (APIMessageWrapper) obj);
}
});
}
@Override
public Bundle setupDefaultBundle(Object... objArr) {
Bundle bundle = new Bundle();
bundle.putString(BBDownloadManager.TITLE_TAG, "Info Komunitas");
bundle.putString(DataMessage.ID_OUTLET, (String) objArr[0]);
bundle.putString("url_landing", (String) objArr[1]);
return bundle;
}
}