Skip to content

Instantly share code, notes, and snippets.

S.Shahini saeedsh92

Block or report user

Report or block saeedsh92

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
saeedsh92 / NetworkUtil
Last active Apr 9, 2020
Check internet connectivity
View NetworkUtil
package com.sevenlearn.broadcastreceivertutorial;
import android.content.Context;
import android.os.Build;
public class NetworkUtil {
saeedsh92 / MetricsUtil.kt
Created Sep 23, 2019 — forked from kevinhaitsma/MetricsUtil.kt
Convert dp to px and px to dp in Kotlin for Android
View MetricsUtil.kt
import android.content.Context
import android.content.res.Resources
import android.util.DisplayMetrics
* Provides utilities for metrics.
* Original at:
* @see <a href="">stack overflow answer</a>
public class DirectionsJSONParser {
/** Receives a JSONObject and returns a list of lists containing latitude and longitude */
public List<List<HashMap<String,String>>> parse(JSONObject jObject){
List<List<HashMap<String, String>>> routes = new ArrayList<List<HashMap<String,String>>>() ;
JSONArray jRoutes = null;
JSONArray jLegs = null;
JSONArray jSteps = null;
You can’t perform that action at this time.