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.dhaval2404.log | |
import android.util.Log; | |
import android.os.Environment; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.text.SimpleDateFormat; |
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
Exclude Tag | |
^(?!(tag1|tag2|tag3)) | |
Include and Exclde Tag | |
(?=(IncludeTag1|IncludeTag2|IncludeTag3))(?!(ExcludeTag1)) | |
Samsung Device: | |
^(?!(ViewRootImpl|dalvikvm|Timeline|OpenGLRenderer|Adreno-EGL|DisplayManagerGlobal|ApplicationPackageManager|DisplayManager|AbsListView|Qmage|GC)) | |
Micromax Device: |
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 abstract class AppCompactBaseDialogFragment extends AppCompatDialogFragment{ | |
@Override | |
public void onCreate(@Nullable Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setStyle(STYLE_NO_TITLE, 0); | |
} | |
@Override | |
public void onResume() { |
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
//In Application Class | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
Stetho.InitializerBuilder initializerBuilder = | |
Stetho.newInitializerBuilder(this); | |
// Enable Chrome DevTools | |
initializerBuilder.enableWebKitInspector( |
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
#Run this script to copy android app private data to your desktop. Use below command | |
#./pull_private_data.sh app_package_name local_directory_path >> ./pull_private_data.sh com.niyantras.homifiandroid /home/dhaval/app_data | |
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
packageName=$1; | |
localDirectory=$2; | |
echo "Package Name=$packageName" |
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
apply plugin: 'com.android.application' | |
apply plugin: 'android-apt' | |
def setOutputAPKName(applicationVariants) { | |
applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
def SEPARATOR = "_" | |
def project = "AppName" | |
def buildType = variant.variantData.variantConfiguration.buildType.name | |
def versionName = "v" + variant.versionName |
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
[Desktop Entry] | |
Encoding=UTF-8 | |
Version=2.2.3 | |
Type=Application | |
Terminal=false | |
Icon=someicon | |
Exec=sh /path/to/android-studio-2.2.3/bin/studio.sh | |
Icon=/path/to/android-studio-2.2.3/bin/studio.png | |
Name=Android Studio 2.2.3 | |
Categories=Application;Development;Java;IDE;Android |
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.content.Intent; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; | |
import com.github.dhaval2404.imagepicker.ImagePicker; | |
import com.google.android.material.floatingactionbutton.FloatingActionButton; | |
import androidx.annotation.Nullable; | |
import androidx.appcompat.app.AppCompatActivity; |
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.github.dhaval2404.imagepicker.util | |
import android.content.Intent | |
import androidx.activity.result.ActivityResult | |
import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.fragment.app.Fragment | |
/** | |
* Inline Activity Result |
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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME} #end | |
import androidx.recyclerview.widget.RecyclerView | |
#parse("File Header.java") | |
class ${NAME} : BaseAdapter<${MODEL_CLASS}, {BINDING_CLASS}, ${NAME}.${VIEWHOLDER_CLASS}>() { | |
override fun getLayout() = R.layout.${LAYOUT_FILE_NAME} | |
override fun getViewHolder(binding: ${VIEWHOLDER_CLASS}) = |
OlderNewer