Skip to content

Instantly share code, notes, and snippets.

View Ahmedbadereldin's full-sized avatar
🏠
Working from home

Ahmed M Bader El-Din Ahmedbadereldin

🏠
Working from home
View GitHub Profile
@Ahmedbadereldin
Ahmedbadereldin / Send Notification Firbase Android Java
Last active August 6, 2019 08:57
Working easily with FCM push notifications in Android ,
final private String FCM_API = "https://fcm.googleapis.com/fcm/send";
//server Key => get From Your Firbase account
final private String serverKey = "key=" + "AAAA.......";
final private String contentType = "application/json";
final String TAG = "NOTIFICATION TAG";
------------------------------------------------------------------------------------
newMessageDoc.set(newChatMessage).addOnCompleteListener(task -> {
if (task.isSuccessful()) {
@Ahmedbadereldin
Ahmedbadereldin / BaseActivity.java
Created February 7, 2018 22:29 — forked from himanshu-soni/BaseActivity.java
Base Activity to detect internet connection GPS disabled. It shows dialog to enable them too :)
package com.djhs16.location;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.location.Location;