Skip to content

Instantly share code, notes, and snippets.

🎯
Exploring things

Pratik Butani pratikbutani

🎯
Exploring things
Block or report user

Report or block pratikbutani

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
@pratikbutani
pratikbutani / README.md
Last active Oct 5, 2019 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻
View README.md

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@pratikbutani
pratikbutani / PathUtils.java
Created Sep 9, 2019
Get Path from URI or URI from Path Utils.
View PathUtils.java
public class PathUtils {
/**
* To get URI from Path
*
* @param context context
* @param file file
* @return Uri
*/
public static Uri getUriFromPath(Context context, File file) {
String filePath = file.getAbsolutePath();
@pratikbutani
pratikbutani / DatePickerUniversal.java
Last active Nov 11, 2019
Using that Date Picker Universal for any view you can pick date very easily.
View DatePickerUniversal.java
/**
* @author Pratik Butani
*
* Main file for Date Picker.
*/
public class DatePickerUniversal implements View.OnFocusChangeListener, DatePickerDialog.OnDateSetListener, View.OnClickListener {
private EditText mEditText;
private Calendar mCalendar;
private SimpleDateFormat mFormat;
@pratikbutani
pratikbutani / LocationHelperActivity.java
Created Jun 14, 2019
Location Helper Activity to get continuously updates of location in your child activity. Just extend this activity in your every child activity where you want to get updates.
View LocationHelperActivity.java
public abstract class LocationHelperActivity extends AppCompatActivity {
private static final String TAG = "LocationHelperActivity";
private static final int PERMISSION_REQUEST_CODE = 200;
public static final long INTERVAL = 1000 * 3 * 60; // 3 = 3 minutes
public static final long FASTEST_INTERVAL = 1000 * 60; // 60 = 60 seconds = 1 minutes
public String mCurrentLatitude = "";
public String mCurrentLongitude = "";
View MyFirebaseMessagingService.java
public class MyFirebaseMessagingService extends FirebaseMessagingService {
private static final String TAG = "MyFirebaseMessagingServ";
private static int NOTIFICATION_ID = 1;
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
// Check if message contains a data payload.
@pratikbutani
pratikbutani / BaseFragment.java
Created Feb 26, 2019
Common Fragment for all Fragments (using DataBinding)
View BaseFragment.java
public abstract class BaseFragment extends Fragment {
/**
* DataBinding Object
*/
private ViewDataBinding mBindingObject;
/**
* Context common
*/
@pratikbutani
pratikbutani / BaseActivity.java
Last active Feb 26, 2019
Common Activity for all Activities (using DataBinding)
View BaseActivity.java
public abstract class BaseActivity extends AppCompatActivity {
/**
* DataBinding Object
*/
private ViewDataBinding mBindingObject;
/**
* Context common
*/
@pratikbutani
pratikbutani / TimePickerUniversal.java
Last active Dec 17, 2018
Android TimePicker to set time with/without AM/PM.
View TimePickerUniversal.java
/**
* Main file for Time Picker.
*/
public class TimePickerUniversal implements View.OnFocusChangeListener, TimePickerDialog.OnTimeSetListener, View.OnClickListener {
private EditText mEditText;
private Calendar mCalendar;
private SimpleDateFormat mFormat;
private boolean withAMPM;
@pratikbutani
pratikbutani / send_firebase_notification.php
Created Oct 24, 2018
Send Firebase Notification to more than 1000 users at a time from PHP
View send_firebase_notification.php
<?php
/**
* Created By : Pratik Butani
* Created Date : 24/10/2018
*/
// Database Connection
include "conn.php";
// Get Records from Table
$sql = "SELECT * from fcm";
@pratikbutani
pratikbutani / NetworkUtils.java
Last active May 3, 2017
NetworkUtils is useful to check the internet connection and it will be called when internet connection goes on/off using BroadcaseReceiver.
View NetworkUtils.java
/**
* @author Pratik Butani
*/
public class NetworkUtils extends BroadcastReceiver {
/**
* Context Variable
*/
Context context;
You can’t perform that action at this time.