Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

How to make GCM show alert automatically ios #602

Closed
turbobuilt opened this issue Feb 10, 2016 · 4 comments
Closed

How to make GCM show alert automatically ios #602

turbobuilt opened this issue Feb 10, 2016 · 4 comments

Comments

@turbobuilt
Copy link

Hello,

Thanks for your work on this plugin!

I want my app to show a GCM alert just like an ios alert. For some reason, it is not actually doing the alert. It is just calling the GCM notification function, where I can show an alert. I don't really want that function to be called. I just want the standard ios notification alert to be called. When a notification comes in the background, I just want it to be handled the standard ios way, and shown without ever needing to contact my app. Is there any way to do this, or do I always have to do all that manually when using GCM?

Thank you!

@macdonst
Copy link
Member

@dtruel what are you sending to the iOS device?

@turbobuilt
Copy link
Author

I'm doing this right now in php. Is it supposed to have the functionality I was looking for?

$data = [
  "to" => $gcm_id,
  "content_available" => true,
  "notification" => [
    "title" => "Alert",
    "alert" => "this is an alert",
    "body" => "Tornado Coming!!",
    "sound" => "siren.mp3"
  ] 
];

@turbobuilt
Copy link
Author

Hey I just added priority => high and it's working! thank you!

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants