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
package com.example.mat.rxutil; | |
import android.content.ContentResolver; | |
import android.database.ContentObserver; | |
import android.net.Uri; | |
import android.os.Build; | |
import android.os.Handler; | |
import android.os.HandlerThread; | |
import java.lang.ref.WeakReference; |
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
package com.example.mat.rxutil; | |
import android.content.ContentResolver; | |
import android.database.ContentObserver; | |
import android.net.Uri; | |
import android.os.Build; | |
import android.os.Handler; | |
import android.os.HandlerThread; | |
import java.lang.ref.WeakReference; |
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
/** | |
* RxJava based broadcast reciever that registers its local BroadcastReceiver until end of subscription. | |
* Listens for update and passes Intent to the Stream (Subscriber). | |
* | |
* Copyright 2016 Mateusz Perlak - http://www.apache.org/licenses/LICENSE-2.0 | |
* Created on 11/18/16. | |
*/ | |
public class RxBroadcastReceiver implements ObservableOnSubscribe<Intent> { | |
protected final WeakReference<Context> contextWeakReference; |
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
package com.example.mat.rxutil; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.ServiceConnection; | |
import android.os.IBinder; | |
import java.lang.ref.WeakReference; |
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
package com.example.mat.rxjavaplayground.rxutil; | |
import android.content.Context; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import java.util.Collections; | |
import java.util.List; | |
import io.reactivex.functions.Function; |
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
// copied from Reactive X functions - have your own if no need for full Rx in your project. | |
package io.reactivex.functions; | |
/** | |
* A functional interface that takes a value and returns another value, possibly with a | |
* different type and allows throwing a checked exception. | |
* | |
* @param <T> the input value type | |
* @param <R> the output value type | |
*/ |
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
package com.example.playground; | |
import android.arch.lifecycle.Lifecycle; | |
import android.arch.lifecycle.LifecycleObserver; | |
import android.arch.lifecycle.OnLifecycleEvent; | |
import android.support.annotation.NonNull; | |
import android.util.Log; | |
import java.lang.ref.WeakReference; | |
import java.util.Map; |
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
package com.example.playground; | |
import android.os.HandlerThread | |
import android.os.Process | |
/** | |
* Looper based BackgroundThread handler for REalm executions. | |
*/ | |
class BackgroundThread : HandlerThread("Scheduler-Realm-BackgroundThread", Process.THREAD_PRIORITY_BACKGROUND) |
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
08-21 06:39:54.332 1535-4176/? D/MediaSessionService: Sending KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_PLAY_PAUSE, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to the last known PendingIntent PendingIntent{5b76839: PendingIntentRecord{7925b0e com.medium.reader broadcastIntent}} | |
08-21 06:39:54.333 1535-4176/? D/MediaSessionService: Sending KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_PLAY_PAUSE, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to the last known PendingIntent PendingIntent{5b76839: PendingIntentRecord{7925b0e com.medium.reader broadcastIntent}} | |
08-21 06:39:54.335 1535-1550/? D/StorageManagerService: getExternalStorageMountMode : 1 | |
getExternalStorageMountMode : 3 | |
getExternalStorageMountMode : final mountMode=1, uid : 10324, packageName : com.medium.reader | |
08-21 06:39:54.335 1535-1550/? I/ApplicationPolicy: isApplicationExternalStorageWh |
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 'package:fimber/fimber.dart'; | |
// initialization in main.dart | |
Fimber.addTree(DebugTree()); | |
// usage: | |
Fimber.d("Test debug $value"); | |
Fimber.de(exIo, "Error reading file: $path"); |
OlderNewer