I want to send a onesignal notification from a button in android studio to another device using device tokens. But I am not getting it. What is the proper way of doing?
I want event to be trigger by the button not by onesignal dashboard
SendNotificationBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//code to send notification to another device.
}
});
Use OneSignal REST API (see Send to Specific Devices in the documentation)
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.