Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

Logo

Send Firebase Push Notifications to allDevices from Server using the new FCM HTTP v1 API

Step 1: change to firebase.php code.

$arrayToSend = array('topic' => 'allDevices','data' => $datamsg);

Step 2: change to java code.

     FirebaseMessaging.getInstance().subscribeToTopic("allDevices")
                .addOnCompleteListener(new OnCompleteListener<Void>() {
                    @Override
                    public void onComplete(@NonNull Task<Void> task) {
                        String msg = "Subscribed to topic";
                        if (!task.isSuccessful()) {
                            msg = "Subscription failed";
                        }
                        Log.d("token", msg);
                    }
                });

Authors

MD YEAMIN - Android Software Developer (Learn With Yeamin)

Thank You ❤️

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors