Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Krupal mkrupal09

🎯
Focusing
Block or report user

Report or block mkrupal09

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View DeviceInfoExtension.kt
package com.dc.app
import android.app.ActivityManager
import android.content.Context
import android.content.Context.ACTIVITY_SERVICE
import android.content.Intent
import android.content.IntentFilter
import android.os.BatteryManager.EXTRA_LEVEL
import android.os.BatteryManager.EXTRA_SCALE
import android.os.Build
View test
const val VOUCHER_TYPE = "voucher_type"
const val INVOICE_TYPE = "invoice_type"
const val VENDOR_TYPE = "vendor_type"
const val GENERAL_LEDGER_TYPE = "general_ledger_type"
const val BANK_BOOK_TYPE = "bankbook_type"
View Android Interview Question
1.How many type of process in android?
- Foreground Process
- Visible Process
- Service Process
- Cached Process
https://developer.android.com/guide/components/activities/process-lifecycle
2.Activity lifecycle key loops
There are three key loops you may be interested in monitoring within your activity
View ubuntu
to give full permission
sudo chmod a+rwx /var/szDirectoryName
View AndroidBug5497Workaround.java
public class AndroidBug5497Workaround {
// For more information, see https://issuetracker.google.com/issues/36911528
// To use this class, simply invoke assistActivity() on an Activity that already has its content view set.
public static void assistActivity (Activity activity) {
new AndroidBug5497Workaround(activity);
}
private View mChildOfContent;
View GitUtils.md

Rename Branch

git branch -m git branch -m

Delete Branch git branch -D <branch_name>

Remove Cache git rm -r --cached ./

View SelectorImageView.java
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.util.AttributeSet;
import android.util.StateSet;
public class SelectorImageView extends android.support.v7.widget.AppCompatImageView {
public SelectorImageView(Context context) {
View LocalTimeToUtc.java
int offset = TimeZone.getDefault().getRawOffset() + TimeZone.getDefault().getDSTSavings();
long now = System.currentTimeMillis() + offset;
View Unzip.java
package com.dc.myapplication;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
You can’t perform that action at this time.