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/'
)
)
)
);
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.