Skip to content

Instantly share code, notes, and snippets.

View mhrpatel12's full-sized avatar
🇮🇳

Mihir Patel mhrpatel12

🇮🇳
View GitHub Profile
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
import android.content.Context;
import java.util.ArrayList;
import io.realm.Realm;
import io.realm.RealmResults;
import io.realm.Sort;
import io.realm.exceptions.RealmException;
@mhrpatel12
mhrpatel12 / ServiceCallHelper_NetworkUtil.java
Last active April 3, 2017 06:07
Helper files for web service call using volley
/**
* Created by Mihir on 25-04-2016.
*/
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
public class NetworkUtil {
public static int TYPE_WIFI = 1;
@mhrpatel12
mhrpatel12 / DatabaseBLL.java
Last active April 2, 2017 20:31
BLL with insert/update/delete/fetch operations.
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
@mhrpatel12
mhrpatel12 / ParseAndStoreAsyncTask.java
Last active April 2, 2017 20:08
parse json resoibse and store in database
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.support.design.widget.Snackbar;
import android.support.v4.content.LocalBroadcastManager;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@mhrpatel12
mhrpatel12 / ListAdapter.java
Last active April 2, 2017 19:20
Functional adapter class with no issues.
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Color;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextWatcher;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.DatabaseUtils;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DBHelper extends SQLiteOpenHelper {
public DBHelper(Context context) {