This is simple guide to teach you about sending push notifications from app using OneSignal API without using any extention.
- Web server (Any free webserver like https://www.000webhost.com)
- File editor or IDE.
- Basic programming knowledge (PHP)
- Kodular account
Download this PHP files
Download both classes.php and sendpush.php and store it in your computer.
Step 1: Open sendpush.php in any file editor and enter your OneSignal APP_ID and API_KEY and save the file.
Step 2: Upload both classes.php and sendpush.php into your 000webhost FileManager make sure your uploaded both file in same directory.
Now we are done with server side. Next we need to create a kodular project to send push notification from the app. Look at the App User Interface and Blocks
1 . heading (required) (text) - Title of your notification
2 . Content (required) (text) - content of notification
3 . url (optional) (text) - URL will be opened when notification opened. If not specified app will be opened.
4 . largeIcon (optional) (text) - An icon will be visible on right of the notification (see output). Pass direct image URL or type “ya” to show your app icon.
5 . bigpicture (optional) (text) - A big banner image will be appear in notification (see output). Pass direct image URL.