device-instance-id

Change/update Firebase notification token or instance id forcefully via code?

旧街凉风 提交于 2019-11-28 20:51:31
What should I do that for changing or requesting the token in firebase? the unique token generated by firebase on the basis of device information. Now i got my answer after facing many troubles for generating new or change token of firebase for push notification. 1) Delete old Firebase token let instance = FIRInstanceID.instanceID() _ = FIRInstanceID.delete(instance) FIRInstanceID.instanceID().delete { (err:Error?) in if err != nil{ print(err.debugDescription); } else { print("Token Deleted"); } } 2) Request new Firebase token if let token = FIRInstanceID.instanceID().token() { print("Token \

How to get friendly device name from DEV_BROADCAST_DEVICEINTERFACE and Device Instance ID

拈花ヽ惹草 提交于 2019-11-28 09:15:40
I've registered a window with RegisterDeviceNotification and can successfully recieve DEV_BROADCAST_DEVICEINTERFACE messages. However, the dbcc_name field in the returned struct is always empty. The struct I have is defined as such: [StructLayout(LayoutKind.Sequential)] public struct DEV_BROADCAST_DEVICEINTERFACE { public int dbcc_size; public int dbcc_devicetype; public int dbcc_reserved; public Guid dbcc_classguid; [MarshalAs(UnmanagedType.LPStr)] public string dbcc_name; } And I'm using Marshal.PtrToStructure on the LParam of the WM_DEVICECHANGE message. Should this be working? Or even

Change/update Firebase notification token or instance id forcefully via code?

岁酱吖の 提交于 2019-11-27 11:44:48
问题 What should I do that for changing or requesting the token in firebase? the unique token generated by firebase on the basis of device information. 回答1: Now i got my answer after facing many troubles for generating new or change token of firebase for push notification. 1) Delete old Firebase token let instance = FIRInstanceID.instanceID() _ = FIRInstanceID.delete(instance) FIRInstanceID.instanceID().delete { (err:Error?) in if err != nil{ print(err.debugDescription); } else { print("Token