<activity android:name=".PackageInstallerActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content" />
<data android:scheme="file" />
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
// | |
// ContentView.swift | |
// Airdrop Demo | |
// | |
// Created by Daniel Kuntz on 7/30/23. | |
// | |
import SwiftUI | |
struct ContentView: View { |
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.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.view.Gravity; | |
import android.widget.TextView; | |
/** | |
* Simple version used in the article: |
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.pascalwelsch.extensions | |
import android.app.Activity | |
import android.content.Context | |
import android.content.Intent | |
import android.os.Build | |
import android.os.Bundle | |
/** | |
* Extensions for simpler launching of Activities |
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
/** | |
* https://stackoverflow.com/questions/28217436/how-to-show-an-empty-view-with-a-recyclerview | |
* | |
* Custom implementation of AdapterDataObserver to show empty layouts | |
* for RecyclerView when there's no data | |
* | |
* Usage: | |
* | |
* adapter.registerAdapterDataObserver(new RVEmptyObserver(recyclerView, emptyView)); | |
*/ |
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.pascalwelsch.extensions | |
import android.app.Activity | |
import android.content.Context | |
import android.content.Intent | |
import android.os.Build | |
import android.os.Bundle | |
/** | |
* Extensions for simpler launching of Activities |
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 kotlinx.coroutines.* | |
import kotlin.coroutines.CoroutineContext | |
abstract class UseCase<T, Params : Any> { | |
private lateinit var parentJob: Job | |
private lateinit var params: Params | |
private var isAttachedToLifecycle = false | |
private val backgroundContext: CoroutineContext = Dispatchers.IO | |
private val foregroundContext: CoroutineContext = Dispatchers.Main |
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.webserveis.httpredirectiontrace.utils; | |
import android.net.Uri; | |
import android.util.Log; | |
import android.util.Patterns; | |
import android.webkit.URLUtil; | |
import java.io.UnsupportedEncodingException; | |
import java.net.IDN; | |
import java.net.MalformedURLException; |
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 java.io.IOException; | |
import java.io.OutputStream; | |
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
public class AnimatedGifEncoder { | |
protected int width; // image size |
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
public class MyApplication extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
// we cannot call setDefaultValues for multiple fragment based XML preference | |
// files with readAgain flag set to false, so always check KEY_HAS_SET_DEFAULT_VALUES | |
if (!PreferenceManager.getDefaultSharedPreferences(getApplicationContext()) | |
.getBoolean(PreferenceManager.KEY_HAS_SET_DEFAULT_VALUES, false)) { |
NewerOlder