var request = require('request'); // 둘다 사용가능 //var url = 'https://gcm-http.googleapis.com/gcm/send';var url = 'https://android.googleapis.com/gcm/send'; var apikey = 'AIzaSyAIwJr4nbF7jcDu9DUt4OdyTB_vEW3j???'; // project server key 1 (OK)var regId='cTUTljnS8XQ:APA91bF-Cv2MWOXHWF2nTBR8UdyxSMcWw6CJceEb7dVEj1r9MaevYbExzPkXDZLUDYuIJKXk-N83BN9x6yt6ZXEFGRJNEh7OW6qm4mw4jx-O9khNevsnPL71cOsiedqWdYmnux_rp?..
안드로이드 8.0에서는 제약사항으로 인해 notification channel을 생성하여야만 notification을 보낼수가 있다.아래는 channel 생성 예제이다. class MainActivity : AppCompatActivity() { private fun createChannel() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as android.app.NotificationManager val channelMessage = NotificationChannel("channel_id", "channel_name..
- Total
- Today
- Yesterday