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 / 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 / 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 / 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 / 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);
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 / 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)
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 / 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.
@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 / Kt
Last active May 22, 2020 19:03
Important Questions
#Lazy Loading Design Pattern
Lazy loading is a concept where we delay the loading of object until the point where we need it.
Lazy loading is just a fancy name given to the process of initializing a class when it’s actually needed.
In simple words, Lazy loading is a software design pattern where the initialization of an object occurs only
when it is actually needed and not before to preserve simplicity of usage and improve performance.
Lazy loading is essential when the cost of object creation is very high and the use of the object is very rare.
So this is the scenario where it’s worth implementing lazy loading.
The fundamental idea of lazy loading is to load object/data when needed.