Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

263
Views
¿Cómo agregar Título en las notificaciones automáticas de One Signal para la aplicación web?

El siguiente código PHP para la notificación push de Onesignal funciona bien,

Pero, ¿cómo agrego Título a la notificación junto con un ícono personalizado definido en lugar de la campana predeterminada?

 //Push Notifications Starts User -------------------------------------------------------------- notify("Alert","Your Order status has been changed to '$order_status'."); $content = array("en" => "Your Order status has been changed to '$order_status'."); $fields = array( 'app_id' => "fa0e5f20-xxxxxxxxxxxxxxxxxxxx", 'included_segments' => array('All'), 'contents' => $content, 'data' => array("en" => "bar"), 'large_icon' =>"ic_launcher_round.png", ); $fields = json_encode($fields); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://onesignal.com/api/v1/notifications"); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json; charset=utf-8', 'Authorization: Basic NTBjNDExxxxxxxxxxxxxxxxxxxxxxxxxxxxx' )); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); $response = curl_exec($ch); curl_close($ch); //Push Notifications Ends --------------------------------------------------------------

Tenga en cuenta que "ic_launcher_round.png" está en mi SDK de estudio dentro de las carpetas "res->mipmap->ic_launcher_round"

El impulso está funcionando, pero necesito el título en la parte superior del contenido junto con 'ic_launcher_round.png' como ícono personalizado.

Cualquier ayuda es muy apreciada.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!