Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by fiveampsoftware · Jul 11, 2017 at 04:55 PM · Push Notificationsandroid

Confirmation that PlayFab Push for Android is Asynchronous?

Hello,

We've been testing the latest Android Push plugin in our Beta channel (Google Play) and have noticed a few users have been seeing a hang when launching the game. We have a couple of reports that look like this (ANR), the crash reporter highlights the suspicious calls seen here: http://imgur.com/a/VAOil

"UnityMain" prio=5 tid=10 TIMED_WAIT
  | group="main" sCount=1 dsCount=0 obj=0x41cb0e48 self=0x5137c6a8
  | sysTid=9158 nice=0 sched=0/0 cgrp=apps handle=1362608624
  | state=S schedstat=( 0 0 0 ) utm=970 stm=159 core=1
  at java.lang.Object.wait (Native Method)
- waiting on <0x42153ac0> (a android.os.ConditionVariable)
  at java.lang.Object.wait (Object.java:401)
  at android.os.ConditionVariable.block (ConditionVariable.java:128)
  at com.playfab.unityplugin.GCM.PlayFabGoogleCloudMessaging.getToken (PlayFabGoogleCloudMessaging.java:33)
  at com.unity3d.player.UnityPlayer.nativeRender (Native Method)
  at com.unity3d.

Does the push notification plugin make calls asynchronously? I wanted to confirm before investigating further.

Thanks,

Kevin

Comment
Hamza Lazaar

People who like this

1 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by MarcoWilliamsPF · Jul 14, 2017 at 03:49 PM

It is not an async call at the java level. That is interesting that calling to getToken() is blocking the main thread in Unity because it is a static void. It calls that code in Java and does not have a return value. We use UnityPlayer.UnitySendMessage to return the result. This should never block the main thread.

My guess is yes, you are having an error getting your token ( needs to be looked at further ), but you probably have something else that is actually blocking your main thread.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Playfab android notification error,Playfab android notifications error 1 Answer

    How to scheduled push notification ? 1 Answer

    ailed to import package with error: Couldn't decompress package 1 Answer

    There is no way of unregistering users from push notifications 1 Answer

    Push notification scheduling not working? 3 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges