Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Filipe Schmidt FilipeLipan

💭
I may be slow to respond.
Block or report user

Report or block FilipeLipan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:7db08fbb28296847d842f6e74966f89e
package br.com.botpag.ui.payment
import android.Manifest
import android.content.Intent
import android.content.pm.PackageManager
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
View gist:6a2dde783ac33b5188ba5c653ec3f860
package br.com.avon.common.repository.remote.util;
import java.io.IOException;
import javax.annotation.Nullable;
import br.com.avon.common.BuildConfig;
import br.com.avon.common.entity.response.mobile_commerce.RenewTokenResponse;
import br.com.avon.common.infrastructure.MyApplication;
import br.com.avon.common.repository.remote.RestApi;
View gist:abc3b83afba17a715959a82d015c7541
https://www.netguru.com/codestories/3-ways-how-to-implement-certificate-pinning-on-android
View ddds brasileiros
[
11,
12,
13,
14,
15,
16,
17,
18,
19,
View gist:c3e77f2f786bd60c1f3f7f06d11c05a0
private inner class HttpInterceptor : Interceptor {
@Throws(IOException::class)
override fun intercept(chain: Interceptor.Chain): okhttp3.Response {
var request = chain.request()
val builder = request.newBuilder()
request = builder.build()
val response = chain.proceed(request)
View FirestoreLiveData
package com.cwb.androiddevbr.cidadaodebem.data
import android.util.Log
import androidx.lifecycle.LiveData
import com.google.firebase.firestore.*
class FirebaseQueryLiveData(val query: Query) : LiveData<QuerySnapshot>() {
private val LOG_TAG = "FirebaseQueryLiveData"
View gist:f86274b1ee6ff738076152c5580af3d6
private fun writeCloud(text: String): BitmapDrawable {
// Draw bitmap
val drawable = ContextCompat.getDrawable(context, R.drawable.ic_cloud)
val bitmap = Bitmap.createBitmap(drawable?.intrinsicWidth ?: 68f.toPx.toInt(),
drawable?.intrinsicHeight ?: 48f.toPx.toInt(), Bitmap.Config.ARGB_8888)
val textPaint = TextPaint().apply {
style = Paint.Style.FILL
color = Color.BLACK
flags = Paint.ANTI_ALIAS_FLAG
xfermode = PorterDuffXfermode(PorterDuff.Mode.XOR)
View gist:d0cf677546cfb7aeb4d5e9a6d587bf78
package com.xxmassdeveloper.mpchartexample;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Shader;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
You can’t perform that action at this time.