B4X FEED [SOLVED] FCM token availability

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: [SOLVED] FCM token availability است. این موضوع تا کنون 55 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع [SOLVED] FCM token availability
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
55
پسندها
0
آخرین ارسال توسط PracticalSoft
وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.
Jun 6, 2020
11,593
4,507
Hi all,
in the past I sucessfully used FCM for messages destined to group of users (i.e. topics). Today I'm experimenting with messages intended for a single user (i.e. token).
What I'm experiencing is that the token seems to become available only on a second launch of the application (or anyway not soon after the app is started).
Once the token becomes available, it suffice to disinstall the app and then istall it again to go back to square one where no token is available.
My code (in FirebaseMessaging service) is as follows:
B4X:

کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
Should I introduce a wait for fm.Isinitialized in service start, rely on some event (not TokenRefresh, since it doesn't raise at this time) or simply buy a new phone (mine is Android 4.4)?
Any other idea? TIA

 

وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.
عقب
بالا