build.gradle with custom repository
Fix missing dependencies from your gradle project (android, maven, etc) with this build.gradle.
insert into YOUR_PROJECT_GRADLE/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url "https://maven.google.com" }
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://dl.bintray.com/android/and ...
Install PHP for Android CLI or Web Server
Official php5-cli installation on android by L3n4r0x (php Running On Android Terminal) -> This Repost From My Another Blogs <- You can visit it on http://blog.snfr.cf or http://secretnetworkforces.blogspot.com
How to install php5-cli in android
Requirement:
Busybox For Programming Support ( Read And See Here)
Terminal Emulator ( Download Terminal Emulator)
Code BB For PHP Server ( Download Server For PHP APK )
Internal min ± 300 MB free
ROOT Explorer ( Download Root Explorer Pro ...
Tether VPN Android
How to tethering vpn on android
ROOT is required
Requirement
Terminal Emulator
Tutorial
Start your VPN until connected
Open terminal emulator and input below commands
su
ip link show
id
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -l FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
ip rule del from 192.168.43.0/24 lookup 61
ip route del default dev tun0 scope link table 61
ip route del 192.168.43.0/24 dev wlan0 scope link table 61
ip route b ...
Kill gradle daemon process
Windows
Using WMIC
kill gradle processes using WMIC
WMIC PROCESS where "Name like 'java%' AND CommandLine like '%GradleDaemon%'" Call Terminate
WMIC PROCESS where "Name like 'java%' AND CommandLine like '%kotlin%'" Call Terminate
WMIC PROCESS where "Name like 'java%' AND CommandLine like '%java%'" Call Terminate
in batch file remove percent symbol %
call wmic process where "name like 'java.exe&#x ...
android webview get content height
Basic methods
Basic methods of Various ways to get the height of a Webview on Android. Nothing really works on all cases
import android.view.ViewTreeObserver
import android.webkit.JavascriptInterface
import android.webkit.WebView
import android.webkit.WebViewClient
// Try 1
private fun getHeightFromDocumentBodyScrollHeight(webView: WebView, setHeight: (Int)->Unit) {
webView.webViewClient = object : WebViewClient() {
override fun onPageFinished(view: WebView?, url: Stri ...
Geckoview cangoback equivalent of android webview.canGoBack
How can i use canGoBack() on GeckoView?
below is sample default android webview canGoBack() implemention
public void onBackPressed() {
if (webView.canGoBack()) {
webView.goBack();
} else {
super.onBackPressed();
}
}
on geckoview
You need to set a navigation delegate on the gecko session and use a global boolean to keep track of whether it can go back or not.
Java
private boolean canGoBack = false;
public class MainActivity extends AppCo ...
List referrer of original traffic from android
list original traffic referrer from android (parsed with regex (android-app:[\w\/\.]+))
android-app://arun.com.chromer
android-app://com.andrewshu.android.reddit
android-app://com.andrewshu.android.redditdonation
android-app://com.android.chrome
android-app://com.google.android.apps.genie.geniewidget
android-app://com.google.android.apps.plus/https/plus.url.google.com/mobileapp
android-app://com.google.android.apps.social.spaces
android-app://com.google.android.googlequicksearchbox
android-app:/ ...
What does google-services.json really do?
What is this file really for
google-services.json contains developer credentials and configuration settings, which is needed to verify while connecting with GoogleApiClient. Though your service is working fine with your test device as it is detecting your developer account but after releasing your app in public, it will not work without the json file. So don’t delete it.
The Official Documentation says:
The application builds a GoogleApiClient, specifying which scopes and APIs the application wi ...
Gradle script to generate proguard dictionaries each build
Gradle task to generate proguard dictonary
Always overwrite existing generated dictionary
def dictDest = new File('build/builddict.txt')
tasks.register('genDict') {
outputs.file(dictDest)
doLast {
if (dictDest.exists()) return
def r = new Random()
println(r)
def begin = r.nextInt(1000) + 0x0100
def end = begin + 0x40000
println("end: " + end)
def chars = (begin..end)
.findAll ...
Android SDK API List
API 10 (Gingerbread) - 0.3%
API 15 (Ice Cream Sandwich) - 0.3%
API 16 (Jellybean) - 1.2%
API 17 (Jellybean) - 1.5%
API 18 (Jellybean) - 0.5%
API 19 (KitKat) - 6.9%
API 21 (Lollipop) - 3.0%
API 22 (Lollipop) - 11.5%
API 23 (Marshmallow) - 16.9%
API 24 (Nougat) - 11.4%
API 25 (Nougat) - 7.8%
API 26 (Oreo) - 12.9%
API 27 (Oreo) - 15.4%
API 28 (Pie) - 10.4%