This file contains 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
repositories { | |
maven { | |
url "https://maven.java.net/content/groups/public/" | |
} | |
} |
This file contains 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
dependencies { | |
implementation 'com.sun.mail:android-mail:1.5.5' | |
implementation 'com.sun.mail:android-activation:1.5.5' | |
} |
This file contains 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
class YapilandirmaVerileri { | |
// Mail adresimizi ve uygulama şifrelerinde oluşturduğumuz şifreyi yazıyoruz | |
static String MAIL = "mail_adresimiz@gmail.com"; | |
static String SIFRE = "qibtwyitsasapcga"; | |
} |
This file contains 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
import android.app.ProgressDialog; | |
import android.content.Context; | |
import android.os.AsyncTask; | |
import android.util.Log; | |
import android.widget.Toast; | |
import java.util.Properties; | |
import javax.mail.Message; | |
import javax.mail.MessagingException; |
This file contains 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
// MailGonderici nesnemizi oluşturduğumuz kısım | |
MailGonderici mg = new MailGonderici(MainActivity.this, "alici_mail_adresi@gmail.com", "Konu", "Bu bir denemedir!"); | |
// Mail Gönderme işlemini başlattığımız nokta | |
mg.execute(); |
This file contains 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
import android.app.ProgressDialog; | |
import android.content.Context; | |
import android.os.AsyncTask; | |
import android.os.Environment; | |
import android.util.Log; | |
import android.widget.Toast; | |
import java.io.File; | |
import java.util.Properties; |
This file contains 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
import java.util.concurrent.ThreadLocalRandom; | |
int minimum = 10; | |
int maksimum = 25; | |
int randomSayi = ThreadLocalRandom.current().nextInt(minimum, maksimum + 1); | |
/* Maksimuma 1 eklememizin sebebi nextInt() metodu maksimum değeri dahil | |
etmiyor bu nedenle 1 ekleyerek 25 dahil olacak şekilde sayı üretebiliriz. */ |
This file contains 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
import java.util.Random; | |
//Normal Random sınıfını ekliyoruz | |
Random random = new Random(); | |
int minimum = 10; | |
int maksimum = 25; | |
int randomSayi = random.nextInt((maksimum - minimum ) + 1) + minimum; |
This file contains 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
Random random = new Random(); | |
// Burada minimum sayı 10(dahil) - maksimum sayı 25(dahil değil) | |
// Yani 10 ile 24 arası sayılar üretilecektir | |
int randomSayi = random.nextInt(10) + 25; |
This file contains 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
import java.util.concurrent.ThreadLocalRandom; | |
int minimum = 10; | |
int maksimum = 25; | |
int randomSayi = ThreadLocalRandom.current().nextInt(minimum, maksimum); | |
// Alttaki şekilde kullanırsanız maksimum değeri de dahil edecektir. | |
randomSayi = ThreadLocalRandom.current().nextInt(minimum, maksimum + 1); |
OlderNewer