Skip to content

Instantly share code, notes, and snippets.

@mzennis
mzennis / DcOpenFireService.java
Last active October 9, 2017 09:49
Connect to Openfire Server (Realtime Chatting) with Notification and Broadcast manager
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.IBinder;
import android.support.annotation.Nullable;
@mzennis
mzennis / ApiClient.java
Created October 9, 2017 09:47
Android Retrofit - Connect to Server with SSH (certificate file .crt) and Basic Auth
import android.content.Context;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@mzennis
mzennis / MyConnectivityManager.kt
Last active September 24, 2023 00:27
Observing network connection with Flow (Android)
import android.content.Context
import android.net.ConnectivityManager
import android.net.Network
import android.net.NetworkCapabilities
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.flow.stateIn
@mzennis
mzennis / main.kt
Created January 6, 2024 07:23
Unnecessary toUpperCase() and toLowerCase() functions with Kotlin
fun main() {
print("Enter your name: ")
val input = readLine()
if (input != null) {
println("Name: $input")
// print the result using our 'String.toUpperCase()' func
println("toUpperCase : ${input.toUpperCase()}")
@mzennis
mzennis / App.kt
Created July 14, 2024 07:05
Swipe views with tabs in Compose Multiplatform
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Scaffold
com.google.myandroid undangan 63c41c95acfb886bf4b0a0512149a09b207dff2502a0831e7ca6e2a6fe9181xx
com.google.androidsmstesT Undangan Pernikahan.apk 63c41c95acfb886bf4b0a0512149a09b207dff2502a0831e7ca6e2a6fe9181de
com.pay.jomopay Jomo Pay.apk 5091a5894fd1736908845223d16007dc24deb8f9ff0e155cae1cd267418fbd73
com.smamolot.mp4fix Download2 (1).apk fb316717892ce1a5236b1d22727e48d959a4e6f6264164e81ee60cd02ceb03c3
com.if831c2cf3041abe0 Virus - Screamer.apk e7df0632fe903c7fd9358315068ad1f166305fad956133c385a1246d5889d5e5
com.my.newproject10 موت 1.0.apk 121810666588793b6ffa833d00b650e89e576dfb761f2b30b5b947099b3fb4fa
com.ldeqd Hack Castle Clash_signed2.apk e504ff4501da2412758babadabb05a761ae6edacd043d68334e384d94fe4f4ac
com.appmicaixaappapk.app MiCaixa.apk fd20ec0d4e54a7511378b20042e3817c965ef392293f5f9d5015b5eb9d066b6f
xuzjgkd.sstlojddh am.apk ec1106a9735034ef21a1126717ac337d825844a1b60ab8bcf32e0c835fde60df
object.towns.cole.load lifesum.apk 6fdacea265cc6385b65c9c3fd35970342e2bf377fb1f361eb54cec0349e90ee2