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
Work Manager | |
WorkManager is an API that makes it easy to schedule deferrable, asynchronous tasks that are expected to run even if the app exits or the device restarts. The WorkManager API is a suitable and recommended replacement for all previous Android background scheduling APIs | |
Device support from 14 -22 it will work on alarm manager with broadcast to process scheduling and GCM NetworkManager | |
Device above 23 + all uses JobSchedular | |
usecases : | |
Dynamic Feature modules and clean architecture | |
Backup chat like whatsapp after a hours or 1 in a day | |
update news in any news app - phone in charge or connect with constraint and executes the task and impl |
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
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. |
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
push the code | |
git branch | |
git checkout branchname | |
git status | |
git log -n1 | |
git add class name | |
git commit | |
git push origin HEAD:refs/for/q-common | |
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
Intent intent = getIntent(); | |
if (Intent.ACTION_VIEW.equals(intent.getAction())) { | |
Uri uri = intent.getData(); | |
String valueOne = uri.getQueryParameter("keyOne"); | |
String valueTwo = uri.getQueryParameter("keyTwo"); | |
<data android:host="www.clicky.pk" android:scheme="http"/> |
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
Git Tag | |
There are two tag | |
1.Lightweight Tag | |
2.Annotated Tag | |
Lightweight Tag is used for requires only a quick and easy tag command | |
git tag v1.o |
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
How to add ssh in system and add in github | |
1. ssh-add -l | |
2.ssh-keygen -t rsa -b 4096 -C "joe@example.com" | |
3.Press Enter to accept the default file location | |
4.Enter a secure passphrase | |
5.cat .ssh/id_rsa.pub | |
Github | |
Settings -Select SSH and GPG keys - Click New SSH key -Enter a title in the field -Paste your public key into the Key field -Click Add SSH key |
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 Unix systems the end of a line is represented with a line feed (LF). In windows a line is represented with a carriage return (CR) and a line feed (LF) thus (CRLF). when you get code from git that was uploaded from a unix system they will only have an LF. | |
If you are a single developer working on a windows machine, and you don't care that git automatically replaces LFs to CRLFs, you can turn this warning off by typing the following in the git command line | |
git config core.autocrlf true | |
rm -f ./.git/index.lock |
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
PROGUARD | |
Generally ProGuard is a tool to help minify, obfuscate, and optimize your code. | |
It is not only especially useful for reducing the overall size of your Android application as well as removing unused classes and methods that contribute towards the intrinsic 64k method limit of Android applications. Because of the latter issue, ProGuard is often recommended to be used both in development and production especially for larger applications. | |
ProGuard can be enabled by using the minifyEnabled option for any build type. | |
If you intend to use it for production, it is highly recommended you also enable it on your development. | |
https://miro.medium.com/max/2640/1*J-9cAvm8kSn001rXGDtwxg.png | |
Generally retracing this kind of error log have two ways.Lets discuss one by one | |
Get the mapping.txt file and retrace the logs using proguardgui |
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 Activity getActivity(Context context) | |
{ | |
if (context == null) | |
{ | |
return null; | |
} | |
else if (context instanceof ContextWrapper) | |
{ | |
if (context instanceof Activity) | |
{ |
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
This crash is present on: | |
all Samsung devices 7.0 | |
all Nexus devices on 7.1.2 | |
When the device is being restarted, you cannot run an app. Any app, not just yours but any given app cannot run when the device is restarting. AFAIK it occurs when you try to do something when the system crashes. | |
Meaning if the system crashes and as it restarts your app starts a service or does something you get that error. |
NewerOlder