public final class ContentObservable
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static rx.Observable<android.content.Intent> |
fromBroadcast(android.content.Context context,
android.content.IntentFilter filter)
Create Observable that wraps BroadcastReceiver and emits received intents.
|
static rx.Observable<android.content.Intent> |
fromBroadcast(android.content.Context context,
android.content.IntentFilter filter,
java.lang.String broadcastPermission,
android.os.Handler schedulerHandler)
Create Observable that wraps BroadcastReceiver and emits received intents.
|
static rx.Observable<android.database.Cursor> |
fromCursor(android.database.Cursor cursor)
Create Observable that emits the specified
Cursor for each available position
of the cursor moving to the next position before each call and closing the cursor whether the
Observable completes or an error occurs. |
static rx.Observable<android.content.Intent> |
fromLocalBroadcast(android.content.Context context,
android.content.IntentFilter filter)
Create Observable that wraps BroadcastReceiver and connects to LocalBroadcastManager
to emit received intents.
|
static rx.Observable<java.lang.String> |
fromSharedPreferencesChanges(android.content.SharedPreferences sharedPreferences)
Create Observable that emits String keys whenever it changes in provided SharedPreferences
Items will be observed on the main Android UI thread
|
public static rx.Observable<android.content.Intent> fromBroadcast(android.content.Context context, android.content.IntentFilter filter)
filter
- Selects the Intent broadcasts to be received.public static rx.Observable<android.content.Intent> fromBroadcast(android.content.Context context, android.content.IntentFilter filter, java.lang.String broadcastPermission, android.os.Handler schedulerHandler)
filter
- Selects the Intent broadcasts to be received.broadcastPermission
- String naming a permissions that a
broadcaster must hold in order to send an Intent to you. If null,
no permission is required.schedulerHandler
- Handler identifying the thread that will receive
the Intent. If null, the main thread of the process will be used.public static rx.Observable<android.content.Intent> fromLocalBroadcast(android.content.Context context, android.content.IntentFilter filter)
filter
- Selects the Intent broadcasts to be received.public static rx.Observable<java.lang.String> fromSharedPreferencesChanges(android.content.SharedPreferences sharedPreferences)
public static rx.Observable<android.database.Cursor> fromCursor(android.database.Cursor cursor)
Cursor
for each available position
of the cursor moving to the next position before each call and closing the cursor whether the
Observable completes or an error occurs.