Skip to content

Instantly share code, notes, and snippets.

@dbh4ck
dbh4ck / Giphy Pal Bot Approval for 10 Groups
Last active October 25, 2019 05:45
Giphy Pal Bot Approval for 10 Groups
Pal bot approval for 10 Palringo Groups.
@dbh4ck
dbh4ck / SingletonKotlin.kt
Created January 17, 2018 08:07
Singleton class For Kotlin Android SmackXMPP Connection Sample
package com.db.chatpluskotlin.xmpp
import org.jivesoftware.smack.AbstractXMPPConnection
/**
* Created by DB on 23-12-2017.
*/
public object XMPPLogic {
var connection: AbstractXMPPConnection? = null
package com.db.smsotpautofillkotlin.interfaces
/**
* Created by DB on 03-01-2018.
*/
interface SmsListener {
fun messageReceived(messageText: String)
}
package com.db.smsotpautofillkotlin.interfaces
/**
* Created by DB on 03-01-2018.
*/
interface EditCodeWatcher {
fun onCodeChanged(code: String)
}
package com.db.smsotpautofillkotlin.interfaces
/**
* Created by DB on 03-01-2018.
*/
interface EditCodeListener {
fun onCodeReady(code: String)
}
package com.db.smsotpautofillkotlin
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.db.smsotpautofillkotlin.interfaces.EditCodeWatcher
import com.db.smsotpautofillkotlin.interfaces.EditCodeListener
import android.view.WindowManager
import com.db.smsotpautofillkotlin.editable.EditCodeView
import com.db.smsotpautofillkotlin.interfaces.SmsListener
package com.db.smsotpautofillkotlin.receivers
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.support.v4.app.NotificationCompat.getExtras
import android.os.Bundle
import android.R.attr.data
import android.telephony.SmsMessage
import java.util.regex.Pattern
package com.db.smsotpautofillkotlin.editable
import android.view.View
import android.view.inputmethod.BaseInputConnection
import android.text.Editable
import android.view.KeyEvent
/**
* Created by DB on 03-01-2018.
*/
package com.db.smsotpautofillkotlin.editable
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Rect
import android.graphics.Typeface
import android.support.annotation.ColorInt
import android.support.v4.content.ContextCompat
package com.db.listviewbaseadapterkotlin
import android.content.Context
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.view.LayoutInflater
import android.widget.ImageView
import android.widget.TextView