This file contains hidden or 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
| public static void createNotification(String title, String body,String image_url, Context context, int notificationsId, String single_id) { | |
| Intent notificationIntent; | |
| long when = System.currentTimeMillis(); | |
| int id = (int) System.currentTimeMillis(); | |
| Bitmap bitmap = getBitmapFromURL(image_url); | |
| NotificationCompat.BigPictureStyle notifystyle = new NotificationCompat.BigPictureStyle(); | |
| notifystyle.bigPicture(bitmap); | |
| RemoteViews contentView = new RemoteViews(context.getPackageName(), R.layout.custom_notification_layout); |
This file contains hidden or 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
| private String getMonth(String date) throws ParseException { | |
| Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH).parse(date); | |
| Calendar cal = Calendar.getInstance(); | |
| cal.setTime(d); | |
| String monthName = new SimpleDateFormat("MMM").format(cal.getTime()); | |
| return monthName; | |
| } | |
| private String getDate(String date) throws ParseException{ | |
| Date d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH).parse(date); | |
| Calendar cal = Calendar.getInstance(); |
This file contains hidden or 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
| For Android | |
| Icons Resolution (Curved Edges): | |
| 48 × 48 (mdpi) | |
| 72 × 72 (hdpi) | |
| 96 × 96 (xhdpi) | |
| 144 × 144 (xxhdpi) | |
| 192 × 192 (xxxhdpi) | |
| 512 × 512 (Google Play store) |
This file contains hidden or 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
| #built application files | |
| *.apk | |
| *.ap_ | |
| # files for the dex VM | |
| *.dex | |
| # Java class files | |
| *.class |
This file contains hidden or 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
| import android.util.Log; | |
| import com.google.firebase.iid.FirebaseInstanceId; | |
| import com.google.firebase.iid.FirebaseInstanceIdService; | |
| public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService { | |
| private static final String TAG = MyFirebaseInstanceIDService.class.getSimpleName(); | |
| @Override | |
| public void onTokenRefresh() { |