Skip to content

Instantly share code, notes, and snippets.

View fida1989's full-sized avatar
๐Ÿ˜€
Hello World!

Fida Muntaseer fida1989

๐Ÿ˜€
Hello World!
  • Dhaka, Bangladesh
  • 01:43 (UTC +06:00)
  • X @fida1989
View GitHub Profile
@fida1989
fida1989 / flutter-ci.yml
Created September 22, 2024 19:46 — forked from abdullahnettoor/flutter-ci.yml
Flutter - Build APK through GitHub Actions
name: Flutter CI
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- master
@fida1989
fida1989 / jwt-payload-parse.dart
Created February 2, 2020 11:30 — forked from hjJunior/jwt-payload-parse.dart
Get payload of JWT token in Dart language
import 'dart:convert';
Map<String, dynamic> parseJwt(String token) {
final parts = token.split('.');
if (parts.length != 3) {
throw Exception('invalid token');
}
final payload = _decodeBase64(parts[1]);
final payloadMap = json.decode(payload);
@fida1989
fida1989 / australian-postcodes.sql
Created March 18, 2019 19:39 — forked from randomecho/australian-postcodes.sql
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;
@fida1989
fida1989 / KotlinAndroidMainApplication
Created November 8, 2018 08:24 — forked from paraya3636/KotlinAndroidMainApplication
Kotlin Android MainApplication class for global applicationContext.
// Not object class. AndroidManifest.xml error happen.
class MainApplication : Application() {
init {
instance = this
}
companion object {
private var instance: MainApplication? = null
@fida1989
fida1989 / PhonecallReceiver.java
Created September 26, 2018 09:22 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
@fida1989
fida1989 / ActivityEventListener.md
Created July 31, 2018 04:56 — forked from blackcj/ActivityEventListener.md
Demonstrates how to call a function in the parent Activity from within a Fragment.

Step 1: Add any functions you want to call into the interface (EventListener).

Step 2: Implement those functions in your MainActivity.

Step 3: Create the listener in your Fragment and attach it to the Activity.

Step 4: Call any functions on the listener.

@fida1989
fida1989 / post.md
Created June 5, 2018 05:54 — forked from grantland/post.md
RecyclerView item onClick

RecyclerView item onClick

RecyclerView does not have an OnItemClickListener like it's predecessor, ListView. However, detecting item clicks is pretty simple.

Set an OnClickListener in your ViewHolder creation:

private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder>  {

    public static class ViewHolder extends RecyclerView.ViewHolder
@fida1989
fida1989 / MainActivity.java
Created February 4, 2018 08:38 — forked from mksantoki/MainActivity.java
FileChooser in Android webview
/*
reference link ->https://www.opengeeks.me/2015/08/filechooser-and-android-webview/
https://github.com/OpenGeeksMe/Android-File-Chooser
*/
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
@fida1989
fida1989 / shadow.xml
Created January 14, 2018 06:10 — forked from lecho/shadow.xml
Android shadow drawable xml.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
@fida1989
fida1989 / README
Created August 10, 2017 13:32 — forked from MarsVard/README
android drawable to imitate google cards.
put card.xml in your drawables directory, put colors.xml in your values directory or add the colors to your colors.xml file.
set the background of a view to card,
as you can see in card.xml the drawable handles the card margin, so you don't have to add a margin to your view
``` xml
<View
android:layout_width="fill_parent"