public class SmsRepository extends Object
| Constructor and Description |
|---|
SmsRepository(Context context)
A constructor for this Sms Repository
|
| Modifier and Type | Method and Description |
|---|---|
Single<Contact> |
getContactInfo(Uri contentUri)
A method to get a Contact and the associated information
|
Single<List<Message>> |
getMessages() |
Completable |
sendMessage(String phoneNumber,
String text)
Uses an smsManager object to send a text, running on a background thread.
|
public SmsRepository(Context context)
context - , a context objectpublic Single<Contact> getContactInfo(Uri contentUri)
contentUri - , takes in a contentUri object, which is a reference to the specific contactpublic Single<List<Message>> getMessages()
public Completable sendMessage(String phoneNumber, String text)
phoneNumber - , string of the phone number that the message will be sent totext - the body of the message