jundayw/notification-umeng

v1.0.0 2020-06-18 10:51 UTC

This package is auto-updated.

Last update: 2024-05-18 19:59:24 UTC


README

1.What's this? This is a demo code for php developers who choose Umeng to push notifications to their apps. For more infomation about Umeng, please refer to http://www.umeng.com/.

2.What can I do with this demo? There's a 'src' sub-directory in which you can find a Demo.php. Yep, just fill in some fields in it and use php to run it. This code may be not the best, but it can work and help you develop fast at the beginning. Feel free to change the code, and we'll be much appreciated if you have any suggestion about the code.

3.What do I need to run the demo? We write the code following the standard of PHP 5.0+, so PHP version under 5.0 should not be preferred.

4.No step 4, just run it.

Notes: We build this project on Mac with Sublime Text 2, so sometimes it doesn't look beautiful when switching to other platforms such as Ubuntu. But it doesn't hurt much except the beauty. Forgive us for this, and we are sure to do better.

use Jundayw\NotificationUmeng\Example\Umeng;

// Set your appkey and master secret here
$demo = new Umeng("your appkey", "your app master secret");
$demo->sendAndroidUnicast();
$demo->sendAndroidBroadcast();
$demo->sendAndroidFilecast();
$demo->sendAndroidGroupcast();
$demo->sendAndroidCustomizedcast();
$demo->sendAndroidCustomizedcastFileId();
$demo->sendIOSBroadcast();
$demo->sendIOSUnicast();
$demo->sendIOSFilecast();
$demo->sendIOSGroupcast();
$demo->sendIOSCustomizedcast();