diff --git a/app/src/main/java/com/mpesaandroidintegration/mpesaintegrationandroid/MPESAMessagingService.java b/app/src/main/java/com/mpesaandroidintegration/mpesaintegrationandroid/MPESAMessagingService.java index a60b6bc..b6b6f97 100644 --- a/app/src/main/java/com/mpesaandroidintegration/mpesaintegrationandroid/MPESAMessagingService.java +++ b/app/src/main/java/com/mpesaandroidintegration/mpesaintegrationandroid/MPESAMessagingService.java @@ -11,13 +11,8 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; - import org.json.JSONObject; -/** - * Created by miles on 20/11/2017. - */ - public class MPESAMessagingService extends FirebaseMessagingService { private static final String TAG = "MPESAMessagingService"; @@ -95,7 +90,7 @@ private void sendNotification(String title, String message) { Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent, - PendingIntent.FLAG_ONE_SHOT); + PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE); Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder notificationBuilder =