简体   繁体   中英

How can I send onesignal notification between two devices

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM