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
{ | |
"seed": "#6750A4", | |
"description": "TYPE: CUSTOM", | |
"coreColors": { | |
"primary": "#6750A4", | |
"neutralVariant": "#938F99" | |
}, | |
"schemes": { | |
"light": { | |
"primary": "#6750A4", |
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
// Could create in separate file | |
annotation class SomeAnnotation | |
// This annotation should be placed to your Retrofit Api method | |
@GET("api/v1/data/{id}") | |
@SomeAnnotation | |
suspend fun fetchData(@Path("id") id: Int): SomeData | |
class ConverterFactoryWrapper( | |
standardMoshi: Moshi, |
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.os.Build | |
import okhttp3.ConnectionSpec | |
import okhttp3.OkHttpClient | |
import okhttp3.TlsVersion | |
import java.io.IOException | |
import java.net.InetAddress | |
import java.net.Socket | |
import java.net.UnknownHostException | |
import java.security.KeyStore | |
import javax.net.ssl.SSLContext |
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
{ | |
"code":2000, | |
"plans":[ | |
{ | |
"id":"22", | |
"unique_id":"usd_normal_annual", | |
"user_type":"normal", | |
"billing_type":"annual", | |
"name":"Normal Annual", | |
"description":"Annual Bellicon Home subscription ($83.88).", |
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
fun getIceCandidate(): Flowable<IceCandidate> { | |
return Flowable.create({ emitter -> | |
socket.on("videoChat_iceCandidate_p2p", { | |
val adapter = moshi.adapter<IceCandidate>(IceCandidate::class.java) | |
try { | |
val result = adapter.fromJson(it.joinToString()) | |
emitter.onNext(result!!) | |
} catch (e: JsonDataException) { | |
e.printStackTrace() | |
} |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
if(savedInstanceState == null){ | |
openFragment(MainFragment.newInstance(),false); | |
} | |
getSupportFragmentManager().addOnBackStackChangedListener(new FragmentManager.OnBackStackChangedListener() { |
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.vitaliybv.threadingexercise; | |
import android.os.Handler; | |
import android.os.HandlerThread; | |
import android.os.Message; | |
import java.util.ArrayList; | |
public class CounterTask extends HandlerThread { |