Skip to content

Instantly share code, notes, and snippets.

View iniyanmurugavel's full-sized avatar
🎯
Focusing

Iniyan Murugavel iniyanmurugavel

🎯
Focusing
View GitHub Profile
@iniyanmurugavel
iniyanmurugavel / Kotlin DSL
Last active June 11, 2020 14:58
Kotlin DSL
Kotlin DSL scripts - Domain Specific Language
Just like the Groovy-based equivalent, the Kotlin DSL is implemented on top of Gradle’s Java API.
Everything you can read in a Kotlin DSL script is Kotlin code compiled and executed by Gradle.
Many of the objects, functions and properties you use in your build scripts come from the Gradle API and the APIs of the applied plugins.
Note :-
1. Groovy DSL script files use the .gradle file name extension.
@iniyanmurugavel
iniyanmurugavel / Kapt
Last active June 12, 2020 12:20
Kotlin Kapt incremental and Java enableSeperateAnnoatingProcessing
Gradle.properties to improve incremental in kapt annoation processing
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
onCreate ()
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
For all xml views in which you are setting a vector drawable replace
android:src
@iniyanmurugavel
iniyanmurugavel / UAT Test
Last active June 12, 2020 13:06
Understanding About Testing UAT Test
User acceptance testing (UAT) is the last phase of the software testing process.
During UAT, actual software users test the software to make sure
it can handle required tasks in real-world scenarios, according to specifications.
Phases :
1. Unit Testing
2. System Testing
3. Integration Testing
4. Acceptance Testing (UAT) (User Acceptance Testing)
var stream :FileOutputStream?=null
val drawable =holder.media_image.drawable
val bitmap = drawable.toBitmap()
val filepath=File(Common.temporary_image_loc.absolutePath)
val dir= File(filepath.absolutePath)
dir.mkdir()
val data="${System.currentTimeMillis()}+.jpg"
val file=File(dir,data)
try {
@iniyanmurugavel
iniyanmurugavel / redirect intent
Created June 25, 2020 05:00
Intent playstore redirect
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.example.android"));
intent.setPackage("com.android.vending");
startActivity(intent);
@iniyanmurugavel
iniyanmurugavel / wifi device connect
Created June 29, 2020 08:01
Connect wifi device for debugging
https://android.jlelse.eu/wireless-debugging-through-adb-in-android-using-wifi-965f7edd163a
platform tools connect
adb kill-server
adb tcpip 5555
adb devices
adb connect 100.68.163.246:5555
@iniyanmurugavel
iniyanmurugavel / Android Debug Bridge (adb)
Created June 29, 2020 08:03
Android Debug Bridge (adb) Useful things
Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device. It is a client-server program that includes three components:
adb is included in the Android SDK Platform-Tools package. You can download this package with the SDK Manager, which installs it at android_sdk/platform-tools/
apkanalyzer -h apk file-size myapk.apk --human-readable
apkanalyzer is included in the Android SDK Tools package and located at android_sdk/tools/bin/apkanalyzer.
dmtracedump
@iniyanmurugavel
iniyanmurugavel / ABI
Created June 29, 2020 08:04
Android ABI Understanding
MIPS uses a single syscall instruction for all access to operating system services. The setup for a syscall instruction puts a syscall code into a register. ... They allocate and keep track of the addresses and allow a programmer to use labels instead of addresses in assembly language code.
MIPS (Microprocessor without Interlocked Pipelined Stages) is a reduced instruction set computer (RISC) instruction set architecture (ISA)
A reduced instruction set computer, or RISC (/rɪsk/),
For example, if we are having mips, x86, armeabi, armeabi-v7a, armeabi-v8a, then the .so file will be generated for all the five architectures. So, if the size of one .so file is 5MB then the application size should be 5MB but in reality, it will be of 5*5 = 25MB.
Arm, previously Advanced RISC Machine, originally Acorn RISC Machine, is a family of reduced instruction set computing (RISC) architectures for computer processors, configured for various environments.
@iniyanmurugavel
iniyanmurugavel / proguard
Created June 29, 2020 08:04
DEXGUARD VS Proguard
ProGuard is a generic optimizer for Java bytecode.
DexGuard is a specialized tool for the protection of Android applications.
ProGuard is a versatile optimizer for Java bytecode. It enables you to shrink, optimize and obfuscate desktop applications, embedded applications and mobile applications (Android)
DexGuard, on the other hand, is specifically designed to protect and optimize Android applications. The multilayered protection DexGuard provides is adapted to the distributed and quickly evolving environment in which mobile applications are used. In addition, DexGuard offers functionality that helps you to make optimal use of the Android platform. It comes with a tuned configuration for the Android runtime and for common libraries (Google Play Services, Dagger, Realm, SQLCipher etc.) and automatically splits DEX files that exceed the size limits imposed by the format (MultiDex).