Пример #1
0
 @Override
 public void onMailClicked() {
   Intent i = new Intent(Intent.ACTION_SEND);
   i.setType("text/plain");
   i.putExtra(Intent.EXTRA_EMAIL, new String[] {"*****@*****.**"});
   i.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.problem_report));
   String usersPhone =
       Build.MANUFACTURER
           + " "
           + Build.MODEL
           + " (Android "
           + Build.VERSION.RELEASE
           + ") "
           + "v"
           + PackageUtils.getAppVersion(getContext())
           + "-"
           + Locale.getDefault();
   i.putExtra(Intent.EXTRA_TEXT, getString(R.string.problem_report_body, usersPhone));
   startActivity(i);
 }
Пример #2
0
 @Override
 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
   super.onViewCreated(view, savedInstanceState);
   mViewModel.version.set(PackageUtils.getAppVersion(getContext()));
   mViewModel.showThankYou.set(mBilling.isFullVersion());
 }