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
| private fun isEmulator(): Boolean { | |
| return (Build.FINGERPRINT.startsWith("generic") | |
| || Build.FINGERPRINT.startsWith("unknown") | |
| || Build.MODEL.contains("google_sdk") | |
| || Build.MODEL.contains("Emulator") | |
| || Build.MODEL.contains("Android SDK built for x86") | |
| || Build.MANUFACTURER.contains("Genymotion") | |
| || Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic") | |
| || "google_sdk" == Build.PRODUCT) | |
| } |
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
| implementation fileTree(dir: 'libs', include: ['*.jar']) | |
| implementation 'com.android.support:appcompat-v7:28.0.0' | |
| // implementation 'com.android.support:animated-vector-drawable:28.0.0' | |
| // implementation 'com.android.support:support-media-compat:28.0.0' | |
| implementation 'com.android.support.constraint:constraint-layout:1.1.3' | |
| implementation('com.google.firebase:firebase-auth:16.1.0') { | |
| exclude group: 'com.android.support' | |
| } | |
| testImplementation 'junit:junit:4.12' | |
| androidTestImplementation 'com.android.support.test:runner:1.0.2' |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <color name="red_50">#FFEBEE</color> | |
| <color name="red_100">#FFCDD2</color> | |
| <color name="red_200">#EF9A9A</color> | |
| <color name="red_300">#E57373</color> | |
| <color name="red_400">#EF5350</color> | |
| <color name="red_500">#F44336</color> | |
| <color name="red_600">#E53935</color> |
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
| package asyncsocket; | |
| import java.io.IOException; | |
| import java.io.UnsupportedEncodingException; | |
| import java.net.InetSocketAddress; | |
| import java.nio.ByteBuffer; | |
| import java.nio.channels.AsynchronousSocketChannel; | |
| import java.nio.channels.CompletionHandler; | |
| import java.util.concurrent.atomic.AtomicInteger; |
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
| class MainRepoImpl(private val api: ApiService) : IMainRepo { | |
| val TAG: String = javaClass.simpleName | |
| var isFirst = false | |
| var cache = Observable.empty<Message>() | |
| override | |
| fun loadData(): Observable<Message> { | |
| if (!isFirst) { | |
| cache = api.loadIp() | |
| .subscribeOn(Schedulers.io()) |
NewerOlder