0

So I'm not sure what programming language that would be good for this specific scenario but here is a more detailed information about it.

Example: I receive a notification from this gaming app, the notification consists of "you're being attacked!...."

So my idea was to be able to read the phones notifications characters right after its sent to my screen and is stored temporarily say maybe 10 minutes max. After the characters are read, it would compare if it actually contains those specific characters in the first place. If it does contain those characters "you're being attacked", it would then spam you with emails maybe 30 times witha delay of 5-10 seconds each. Im assuming Id have to use the smtp client for this purpose of sending emails but Im not sure about how to actually connect my phones notifications to my code. Maybe through some sql data or something. Im not sure. If anyone has any idea or some code that can help me with this process it would be greatly appreciated.

I think I'd have my task scheduler run every 20 minutes even when my laptop is asleep to check if I have received any of those notifications rececently.

luk2302
  • 55,258
  • 23
  • 97
  • 137

1 Answers1

0

Don't mix the display message with your app data. A push notification can contain various types of data. So you can send a notification like

{ 
    "displayMessage" : "Your are being attacked",
    "notificationCode" : "ReceivingAttack",
    "attackerId" : 3 
    etc......
}

Then you need to use a push service in order to be able send push messages to your phone clients like Firebase

You can integrate Firebase into your C# server code see these examples.

Using Firebase in .NET

Send push to Android by C# using FCM (Firebase Cloud Messaging)

https://www.youtube.com/watch?v=PsjrxHAin0I

Finally i am not sure what you want to achieve with the email spam functionality but you can just use again the Push Notification Messages to spam the user for attack reminders.

Anestis Kivranoglou
  • 7,728
  • 5
  • 44
  • 47