last day (360 days later) » 

8:21 AM
Peter Haddad has made a change to the feeds posted into this room
 
room topic changed to Firebase: Room dedicated to the Firebase Service, it can be used in all 3 platforms, IOS, android, and web [firebase]
room topic changed to Firebase: Room dedicated to the Firebase Service, it can be used in all 3 platforms, IOS, android, and web [firebase] [firebase-database]
room topic changed to Firebase: Room dedicated to the Firebase Service, it can be used in all 3 platforms, IOS, android, and web [android] [firebase] [firebase-authentication] [firebase-cloud-messaging] [firebase-database] [javascript] [swift]
 
Peter Haddad has made a change to the feeds posted into this room
 
9:31 AM
Peter Haddad has made a change to the feeds posted into this room
Peter Haddad has made a change to the feeds posted into this room
Peter Haddad has made a change to the feeds posted into this room
 
9:45 AM
Peter Haddad has made a change to the feeds posted into this room
 
Hi
I have trouble in firebase messaging server-side code
 
how did you find this room?
 
0
Q: Server returned HTTP response code: 400 for URL: https://fcm.googleapis.com/fcm/send

shreyaCode deviceIds = mbln.getGCMId(); //getting arraylist String[] s = new String[deviceIds.size()]; for (int i =0; i < deviceIds.size(); i++) s[i] = deviceIds.get(i); //converting to array logger.debug(s); JSONObject info = new JSONObject(); info.put("registra...

@PeterHaddad What?
Hi Peter, you there?
 
10:01 AM
yes
Im not sure why you got that error, better wait for someone else to check it. But 400 Bad Request error usually means something like a request to load a web page, was somehow incorrect or corrupted and the server couldn't understand it.
 
Peter Haddad has stopped a feed from being posted into this room
Peter Haddad has stopped a feed from being posted into this room
Peter Haddad has stopped a feed from being posted into this room
Peter Haddad has stopped a feed from being posted into this room
 
10:26 AM
hi @shreya
 
10:53 AM
Hello
 
im not sure about your problem, so better wait until someone else who know checks it
did you follow the tutorial?
 
11:29 AM
actually, here m using registartion_ids. It worked with "to" (when i sent message to single device). But if I want to send to multiple devices I need to use "registartion_ids" so theres something wrong there.
 
11:46 AM
u can use topics
 
hi
admin.database().ref('/users/'+event.params.id+'/NotificationToken/IOS').once('value').then((snapshot) => {

// var token = snapshot.val().IOS;
// console.log('token',token)
var array = [];
var datas = snapshot.val();

console.log("object is:", datas);
console.log("snapshot:", snapshot.val());

array.push(snapshot.val());

console.log("Array - ", array)

const payload = {
notification: {
title: 'FoodKonnect',
body: 'Live',
sound: "default"
}

}

admin.messaging().sendToDevice(array, payload);
return snapshot.val();
this code I am using for sending push notification
 
hey
this room is dedicated for firebase
 
but I am not getting push notification
 
and also for chatting
 
 
3 hours later…
2:52 PM
hello
 
 
2 hours later…
4:40 PM
ur still here
 
 
5 hours later…
9:21 PM
hey
which macbook do you have?
 

  last day (360 days later) »