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
class MaskingGenerator extends AsyncTask<ActivityCameraBinding, Void, BitmapDrawable> { | |
@Override | |
protected BitmapDrawable doInBackground(ActivityCameraBinding... bindings) { | |
try { | |
ActivityCameraBinding b = bindings[0]; | |
int maxDispayW = b.camera.getWidth(); | |
int maxDispayH = b.camera.getHeight(); | |
if (maxDispayH <= 0 || maxDispayW <= 0) return null; |
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.auzen.app | |
import android.app.Activity | |
import android.app.Application | |
import android.content.Intent | |
import android.os.Handler | |
import android.os.Looper | |
import androidx.appcompat.app.AlertDialog | |
import timber.log.Timber | |
import java.util.concurrent.atomic.AtomicReference |
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
<androidx.constraintlayout.widget.ConstraintLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center" | |
android:orientation="horizontal"> | |
<androidx.constraintlayout.helper.widget.Flow | |
android:layout_width="match_parent" | |
android:layout_height="@dimen/padding_20" |
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 ***; | |
import android.Manifest; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.content.pm.ResolveInfo; | |
import android.os.Build; | |
import androidx.core.content.ContextCompat; |
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
/*Request | |
1. Date Format RFC1123 (Sun, 06 Nov 1994 08:49:37 UTC) | |
2. Request Line (POST /v1/account/check HTTP/1.1) | |
Signature | |
signing_string = ‘date: Sun, 06 Nov 1994 08:49:37 UTC\nPOST /v1/account/check HTTP/1.1’ | |
digest=HMAC-SHA256(signing_string) | |
signature=BASE64(digest) | |
Body | |
{ |
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 ***; | |
import android.net.Uri; | |
import android.webkit.JavascriptInterface; | |
import android.webkit.WebView; | |
import android.widget.Toast; | |
import androidx.annotation.NonNull; | |
import java.util.HashMap; |
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 ***; | |
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2017 David Medenjak | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
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
#Installing CA Cert to android system | |
1. get cert file | |
cd ~/.mitmproxy | |
2. get cert hash | |
// convert cer to pem | |
openssl x509 -inform der -in certificate.cer -out certificate.pem |