2

Now the pushwoosh works without problem. I can see the notification on the upper left corner of the Android phone. How can I set the notification to be pop-up onto screen rather than the notification on upper left only, even the phone is in silence mode!

Which way should I go for the customization? Thx

function pwCall( $action, $data = array() ) {        
$url = 'https://cp.pushwoosh.com/json/1.3/' . $action;        
$json = json_encode( array( 'request' => $data ) );        
$res = doPostRequest( $url, $json, 'Content-Type: application/json' );        
print_r( @json_decode( $res, true ) );    }     
pwCall( 'createMessage', array(        '
application' => PW_APPLICATION,        
'auth' => PW_AUTH,        
'notifications' => array(                    
array(                        
'send_date' => 'now',                        
'content' => 'test',                        
'ios_badges' => 3,                        
'data' => array( 'custom' => 'json data' ),                        
'link' => 'http://pushwoosh.com/'                    
)                
)            
)        
);
wing suet cheung
  • 205
  • 2
  • 5
  • 10

1 Answers1

0

To configure how to display the incoming push notification, you should write your own logic in the receiver in Android app, as specified in this page.

Currently, the tutorial currently uses the following the show the message:

private void showMessage(String message)
{
    Toast.makeText(this, message, Toast.LENGTH_LONG).show();
}

Try to create your own logic (user interface, popup method & timing, etc) in the function.

Raptor
  • 53,206
  • 45
  • 230
  • 366