SHARE
TWEET

Untitled

a guest Jun 15th, 2017 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Intent i = new Intent(Intent.ACTION_SEND);
  2.         i.putExtra(Intent.EXTRA_EMAIL, new String[]{addUserETEmail.getText().toString()});
  3.         i.setType("text/html");
  4.         i.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.email_subject));
  5.         i.putExtra(Intent.EXTRA_TEXT   , Html.fromHtml(generateTextEmail(token)));
  6.  startActivity(Intent.createChooser(i, "Share With"));
  7.  
  8. ______________________
  9.  
  10.  private String generateTextEmail(String token) {
  11.         emailText="Hi! "+addUserETKeyHolderName.getText().toString()+" "+addUserETKeyHolderLastName.getText().toString();
  12.         emailText+="<br>";
  13.         emailText+="Thanks for using Smart Lock.";
  14.         emailText+="<br>";
  15.         emailText+="<br>";
  16.         emailText+="Someone has created a key for you, you could now set your password: <a href=\"https://www.cloud.cigno-systems.com/changepwd?du="+UUID+"&auth="+addUserETEmail.getText().toString()+"&token="+token+"\">Click here</a>";
  17.         emailText+="<br>";
  18.         emailText+="* your password won't be created until you access the link above and define a new one.";
  19.         emailText+="<br>";
  20.         emailText+="<br>";
  21.         emailText+="Or you could operate this device directly from this link: <a href=\"https://cloud.cigno-systems.com/lock?lock="+UUID+"&auth="+addUserETEmail.getText().toString()+"&token="+token+"\">Click here</a>";
  22.         emailText+="<br>";
  23.         emailText+="<br>";
  24.         emailText+="Please click below link on your Mobile Device to open SmartLock and check keys.";
  25.         emailText+="iOS/Android: <a href=\"cigno://?token="+token+"&firstName="+addUserETKeyHolderName.getText().toString()+"&lastName="+addUserETKeyHolderLastName.getText().toString()+"&userName="+addUserETKeyHolderName.getText().toString()+" "+addUserETKeyHolderLastName.getText().toString()+"&email="+addUserETEmail.getText().toString()+"&httpAddress=&accessRestrictions="+currentaccessRestrictionsString+"&dateFrom=&dateTo=&keyType="+addUserETRole.getSelectedItem().toString()+"&lock="+UUID+"\">Click here</a>";
  26.         emailText+="<br>";
  27.         emailText+="<br>";
  28.         emailText+="If the SmartLock app is not already installed on your mobile device:";
  29.         emailText+="<br>";
  30.         emailText+="iOS: <a href=\""+iosURL+"\">Apple iTunes</a>";
  31.         emailText+="<br>";
  32.         emailText+="Android: <a href=\""+androidURL+"\">Google Play Market</a>";
  33.         emailText+="<br>";
  34.         emailText+="<br>";
  35.         emailText+="If you didn't request this, please ignore this email.";
  36.         emailText+="<br>";
  37.         emailText+="<br>";
  38.         emailText+="Sent from my Android";
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top