Skip to content

Instantly share code, notes, and snippets.

Rehan Kodekar mkodekar

Block or report user

Report or block mkodekar

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
@mkodekar
mkodekar / LoginActivity.java
Created Nov 21, 2015
Registration and login through php and mysql only with volley, fastintent and butterknife.
View LoginActivity.java
package com.emagic.newproject;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.net.nsd.NsdManager.RegistrationListener;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
View auth_actions.dart
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:redux/redux.dart';
import 'package:chatmetricsproject/models/models.dart' show Login, AppState;
import 'package:chatmetricsproject/widgetutils/widgetutils.dart' show WidgetUtils;
class LoginRequest {
@mkodekar
mkodekar / NetworkModule.kt
Created Aug 25, 2017
a crossline function at the end
View NetworkModule.kt
package co.kodparadise.khabarsamachar.application
import android.content.Context
import co.kodparadise.khabarsamachar.annotations.AppScope
import co.kodparadise.khabarsamachar.dependencies.ContextModule
import com.github.ajalt.timberkt.Timber
import dagger.Module
import dagger.Provides
import okhttp3.Cache
import okhttp3.OkHttpClient
@mkodekar
mkodekar / Functions.kt
Created Aug 20, 2017
Various possible functions possible with kotlin
View Functions.kt
package co.kodparadise.mausam.utils
import android.app.Notification
import android.content.Context
import android.content.SharedPreferences
import co.kodparadise.mausam.R
import com.afollestad.materialdialogs.MaterialDialog
/**
* Created by rkodekar on 8/19/17.
@mkodekar
mkodekar / Functions.kt
Created Aug 20, 2017
Various possible functions possible with kotlin
View Functions.kt
package co.kodparadise.mausam.utils
import android.app.Notification
import android.content.Context
import android.content.SharedPreferences
import co.kodparadise.mausam.R
import com.afollestad.materialdialogs.MaterialDialog
/**
* Created by rkodekar on 8/19/17.
@mkodekar
mkodekar / gist:203b40157bd3e790ecca5a4832ccf051
Created Dec 14, 2016 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
View gist:203b40157bd3e790ecca5a4832ccf051
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@mkodekar
mkodekar / gist:a7da00292a6f2b133329f1a607b60368
Created Oct 19, 2016 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1
View gist:a7da00292a6f2b133329f1a607b60368

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@mkodekar
mkodekar / RxJava.md
Created Sep 20, 2016 — forked from cesarferreira/RxJava.md
Party tricks with RxJava, RxAndroid & Retrolambda
View RxJava.md

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
@mkodekar
mkodekar / MainActivity.java
Created Nov 9, 2015
Material Drawer with dynamically adding categories to the nav drawer -mike penz method
View MainActivity.java
package com.emagic.newproject;
import java.util.ArrayList;
import org.apache.http.NameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONStringer;
You can’t perform that action at this time.