INNER CODE UNIT · Java

showNotification

nic-delhi/AarogyaSetu_Android · app/src/main/java/nic/goi/aarogyasetu/FcmMessagingService.java:71

    private void showNotification(Map<String, String> remoteMessageData) {


        String target = (remoteMessageData.containsKey(Constants.TARGET) && !TextUtils.isEmpty(remoteMessageData.get(Constants.TARGET)))
                ? remoteMessageData.get(Constants.TARGET) : BuildConfig.WEB_URL;

        if (!TextUtils.isEmpty(target)) {
            Intent notificationIntent = new Intent(this, SplashActivity.class);
            notificationIntent.putExtra(Constants.TARGET,target);
            if (remoteMessageData.containsKey(Constants.PUSH) && "1".equals(remoteMessageData.get(Constants.PUSH))) {
                String uploadType = (remoteMessageData.containsKey(Constants.UPLOAD_TYPE) && !TextUtils.isEmpty(remoteMessageData.get(Constants.UPLOAD_TYPE))) ? remoteMessageData.get(Constants.UPLOAD_TYPE) : Constants.UPLOAD_TYPES.PUSH_CONSENT;
                notificationIntent.putExtra(Constants.UPLOAD_TYPE,uploadType);
                notificationIntent.putExtra(Constants.PUSH,true);
            }

            if(remoteMessageData.containsKey(Constants.DEEPLINK_TAG))
            {
                notificationIntent.putExtra(Constants.DEEPLINK_TAG,remoteMessageData.get(Constants.DEEPLINK_TAG));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…