A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 102

Backtrace:

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 128

Backtrace:

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$benchmark is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$hooks is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$config is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$log is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$utf8 is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$uri is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$exceptions is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$router is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$output is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$security is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$input is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$lang is deprecated

Filename: core/Controller.php

Line Number: 83

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$db is deprecated

Filename: core/Loader.php

Line Number: 397

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_DB_mysqli_driver::$failover is deprecated

Filename: database/DB_driver.php

Line Number: 372

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 10
Function: __construct

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$session is deprecated

Filename: core/Loader.php

Line Number: 1284

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 11
Function: library

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 6
Function: __construct

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$dcphpmailer is deprecated

Filename: core/Loader.php

Line Number: 1284

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 11
Function: library

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$model is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 13
Function: model

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$categories is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 15
Function: model

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$postcat is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 19
Function: model

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$comment is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 23
Function: model

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$user is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 27
Function: model

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$coderunner is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 32
Function: model

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$toc is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 37
Function: model

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$data is deprecated

Filename: controllers/Blog.php

Line Number: 39

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 39
Function: _error_handler

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property blog::$meta is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 42
Function: model

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$load is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$state is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$userrole is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$user_id is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$benchmark is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$hooks is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$config is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$log is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$utf8 is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$uri is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$exceptions is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$router is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$output is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$security is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$input is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$lang is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$db is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$session is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$dcphpmailer is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$model is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$categories is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$postcat is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$comment is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$user is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$coderunner is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$toc is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$data is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$meta is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /home/u1494823/public_html/deretcode/application/core/DC_Controller.php
Line: 33
Function: view

File: /home/u1494823/public_html/deretcode/application/controllers/Blog.php
Line: 77
Function: view

File: /home/u1494823/public_html/deretcode/start.php
Line: 315
Function: require_once

Tutorial Membuat Push Notification Android Menggunakan Firebase
Mode Malam
| Mode Tampilan
Penulis : admin

Home » Programming » Tutorial Membuat Push Notification Android Menggunakan Firebase
Tutorial Membuat Push Notification Android Menggunakan Firebase

Tutorial Membuat Push Notification Android Menggunakan Firebase


Firebase adalah sebuah layanan dari google yang bisa kita gunakan untuk mengembangkan aplikasi realtime. Ada banyak sekali fitur-fitur yang disediakan untuk mempermudah proses pengembangan aplikasi salah satunya yang akan kita bahas pada artikel kali ini yaitu Push Notification. Untuk melakukan push notification kita akan menggunakan Fcm (Firebase Clous Messaging).

Kenapa Menggunakan Firebase

Sebenarnya ada banyak sekali layanan yang bisa kita gunakan untuk membuat realtime aplikasi android seperti rabbitmq. Tapi karena firebase adalah produk dari google sendiri dan tentu saja akan lebih mudah mengimplementasikannya di aplikasi android. Selain itu, menggunakan firebase tidak akan membuat aplikasi yang kita buat menjadi boros batrai dibanding kita membuat websocket sendiri secara manual, karena tidak membuat koneksi tcp baru di device android kita.

advertisement

Membuat Project Firebase

Untuk mengintegerasikan firebase dengan aplikasi android maka kita perlu SHA Key dan file json bernama google-service.json yang di dapat dari firebase project. Silahkan kalian ikut langkah-langkahnya.

  1. Buka firebase.google.com dan jika kalian belum punya akunnya silahkan daftar terlebih dahulu (gratis) dan jika sudah punya kalian bisa langsung login dasboard consolenya.
  2. Silahkan kalian buat project baru dengan nama bebas. Dan untuk sementara tidak perlu mengaktifkan google analyticnya
    Tutorial Membuat Push Notification Android Menggunakan Firebase
  3. Kemudian kalian klik logo icon android untuk menambahkan service firebase ke aplikasi android.
    Tutorial Membuat Push Notification Android Menggunakan Firebase
  4. Silahkan kalian isi nama paket android sesuai dengan package android project kita dan berikan aplikasinya. untuk kode SHA kita lewatkan dulu. Setalah itu silahkan klik daftarkan aplikasi
    Tutorial Membuat Push Notification Android Menggunakan Firebase
  5. Silahkan download file goog-service.json yang sudah di generate tadi dan tempatkan di dalam folder app project android kalian, seperti gambar berikut
    Tutorial Membuat Push Notification Android Menggunakan Firebase

Mengintegrasikan Firebase Dengan Aplikasi

Untuk mengintegrasikan firebase maka kita butuh beberapa library package dari google repositorie, seperti com.google.gms.google-services. Buka project android studio kalian dan lakukan step-step berikut,

  1. Buka build.gradle di level project kemudian tambahkan kode berikut
    buildscript {
      repositories {
        // Check that you have the following line (if not, add it):
        google()  // Google's Maven repository
      }
      dependencies {
        ...
        // Add this line
        classpath 'com.google.gms:google-services:4.3.3'
      }
    }
    
    allprojects {
      ...
      repositories {
        // Check that you have the following line (if not, add it):
        google()  // Google's Maven repository
        ...
      }
    }
  2. Kemudian buka build.grade level aplikasi (module) dan tambahkan kode berikut
    apply plugin: 'com.android.application'
    // Add this line
    apply plugin: 'com.google.gms.google-services'
    
    dependencies {
        implementation 'com.google.firebase:firebase-messaging:19.0.1'
    }

    Dan silahkan kalian klik Sync Now (Butuh koneksi internet).

Membuat Notification

  1. Buat sebuah class yang mengimplementasikan FirebaseMessagingService,
    package com.zain.tutorialgson
    import com.google.firebase.messaging.FirebaseMessagingService
    import com.google.firebase.messaging.RemoteMessage
    class MyFireBaseNotification : FirebaseMessagingService(){
        override fun onMessageReceived(p0: RemoteMessage?) {
            super.onMessageReceived(p0)
           
        }
        override fun onNewToken(p0: String?) {
            super.onNewToken(p0)
        }
    }
  2. Kemudian di dalam callback methode onMessageReceived tambahkan code untuk mencreate notifikasi, sehingga codenya menjadi seperti berikut,
    override fun onMessageReceived(p0: RemoteMessage?) {
            super.onMessageReceived(p0)
            val notificationIntent = PendingIntent.getActivity(this, 0,
                Intent(this, MainActivity::class.java), PendingIntent.FLAG_UPDATE_CURRENT)
            val notificationBuilder = NotificationCompat.Builder(this, "channel_id")
                .setContentTitle(p0?.notification?.title)
                .setContentIntent(notificationIntent)
                .setContentText(p0?.notification?.body)
                .setPriority(NotificationCompat.PRIORITY_DEFAULT)
                .setStyle(NotificationCompat.BigTextStyle())
                .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
                .setAutoCancel(true)
    
            val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
            notificationManager.notify(0, notificationBuilder.build())
        }
  3. Kemudian dibagian manifiest silahkan daftarkan servicenya
    <service android:name=".MyFireBaseNotification">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT"/>
        </intent-filter>
    </service>
  4. Berlangganan Topic(Opsional)
    Kalian bisa memfilter notifikasinya berdasarkan topik apa yang kalian subcribe. Tulis code berikut di activity kalian,
    FirebaseApp.initializeApp(this)
    FirebaseMessaging.getInstance().subscribeToTopic("deretcode") //THis for by topic
    	.addOnCompleteListener { task ->
    		var msg = "success"
    		if (!task.isSuccessful) {
    			msg = "gagal"
    		}
    		Log.d(TAG, msg)
    	}
    mPresenter.checkSessionStatus()

    Penjelasan: Code subscribeToTopic("deretcode") akan mebuat aplikasimu hanya akan menampilkan notifikasi dengan topic "deretcode" saja jika push notifaksinya berdasarkan topik tertentu.

Test Aplikasi

 Ada dua cara pengetesan yang bisa di lakukan apakah aplikasi android kita sudah bisa menampilkan notifikasi atau tidak, pertama langsung dari firebase dan yang kedua menggunkan aplikasi penguji api service seperti postman.

advertisement

1. Langsung dari firebase

  1. Klik Clud Messaging dan klik Send your first message
    Tutorial Membuat Push Notification Android Menggunakan Firebase
  2. Isi Judul dan isi notifikasi dan klik tombol berikutnya.
    Tutorial Membuat Push Notification Android Menggunakan Firebase
  3. Kemudian atur target clientnya, bisa berdasarkan Aplikasi atau topik
    Tutorial Membuat Push Notification Android Menggunakan Firebase
  4. Atur penjadwalan, kapan push notifikasi di lakukan
    Tutorial Membuat Push Notification Android Menggunakan Firebase
  5. Klik tinjau dan silahkan publikasi
    Tutorial Membuat Push Notification Android Menggunakan Firebase

2. Menggunakan Postman

  1. Silahkan kalian buka aplikasi postman atau jika belum install silahkan download dan install terlebih dahulu postman nya.
  2. Buat page request baru dan atur seperti berikut
    Url                  : https://fcm.googleapis.com/fcm/send
    Methode       : Post
    Header Key1 : Content-Type dan Value: application/json
    Header Key1 : Authorization dan Value: key=<server-key-fcm-mu>

    Cara mendapatkan api key, seperti gambar berikut
  3. Klik tab Body, pilih raw dan pilih Json type kemudin isi format jsonnya seperti berkut,
    {
     "to": "/topics/NAMA_TOPICNYA",
     "data": {
      "title": "Judul Notif",
      "message": "Isi Notifikasi",
      "sound": "default",
      "type": 1
     }
    }
  4. Kemudian kalian bisa klik tombol send.

Sampai disini harusnya aplikasi android kalian sudah bisa menampilkan notifikasinya. Kalo belum silahkan kalian periksa lagi step by step mungkin ada yang terlewatkan, atau bisa kalian tanyakan di kolom komentar.

advertisement

Sekian dulupostingan kali ini. Jangan lupa di share jika kalian merasa artikel ini bermanfaat, kalau ada pertanyaan silahkan tulis di kolom komentar. Good Luck! :)

Tags: #firebase #pushnotification
Bagikan :

Komentar:

Silahkan berkomentar dengan baik dan bijak!

Name * :
Email :
Website :
Comment :


This website uses cookies to ensure you get the best experience on our website

learn more