This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String[] emailContent = {"Hii Abhi!","Here is my new article","[email protected]"}; | |
Observable.just(emailContent) | |
.map(emailData -> { | |
GMailSender sender = new GMailSender("[email protected]", | |
"password"); | |
sender.sendMail(emailData[0], emailData[1], | |
"senderemailid",emailData[2]); | |
return "Email Successfully sent"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SendMailAsynchronously extends AsyncTask<String,String,String> | |
{ | |
private Context context; | |
public SendMailAsynchronously(Context context) | |
{ | |
this.context=context; | |
} | |
@Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//RxJava and RxAndroid | |
implementation 'io.reactivex.rxjava2:rxjava:2.0.7' | |
// Because RxAndroid releases are few and far between, it is recommended you also | |
// explicitly depend on RxJava's latest version for bug fixes and new features. | |
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println("r"); |