This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
var fs = require('fs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.mynotificationsapp.android"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const app = require('express')(), | |
request = require('request'), | |
mongo = require('mongodb'), | |
bodyParser = require('body-parser') | |
app.use(bodyParser.json()) | |
app.use(bodyParser.urlencoded({ | |
extended: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RelativeLayout layout = (RelativeLayout) findViewById(R.id.rel); | |
GradientDrawable drawable = new GradientDrawable(); | |
drawable.setColors(new int[] { | |
Color.parseColor("#FFF6B7"), | |
Color.parseColor("#F6416C") | |
}); | |
drawable.setGradientType(GradientDrawable.LINEAR_GRADIENT); | |
drawable.setOrientation(GradientDrawable.Orientation.LEFT_RIGHT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest> | |
<application> | |
. . . | |
<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing" | |
android:value="true" /> | |
. . . | |
</application> | |
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CardView cardView = (CardView) findViewById(R.id.cardView); | |
cardView.setUseCompatPadding(true); | |
cardView.setContentPadding(30, 30, 30, 0); | |
cardView.setPreventCornerOverlap(true); | |
cardView.setCardBackgroundColor(Color.WHITE); | |
cardView.setCardElevation(2.1f); | |
cardView.setRadius(0); | |
cardView.setMaxCardElevation(3f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.mynotificationsapp.android"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mynotificationsapp.android; | |
import com.google.firebase.iid.FirebaseInstanceId; | |
import com.google.firebase.iid.FirebaseInstanceIdService; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import java.net.URL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mynotificationsapp.android; | |
import android.app.Notification; | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.content.Intent; | |
import android.support.v4.app.NotificationCompat; | |
import com.google.firebase.messaging.FirebaseMessagingService; | |
import com.google.firebase.messaging.RemoteMessage; |
OlderNewer