question

Zac Bragg avatar image
Zac Bragg Deactivated asked

Having trouble accessing Cached Data on Push Notifications

I'm having trouble with getting cached data from OnApplicationPause.

09-24 16:28:28.311 26187 26218 I Unity : AndroidJavaException: java.lang.NoSuchMethodError: no non-static method with name='getPushCacheData' signature='()Ljava/lang/String;' in class Lcom.playfab.unityplugin.GCM.PlayFabPushCache; 

09-24 16:28:28.311 26187 26218 I Unity : java.lang.NoSuchMethodError: no non-static method with name='getPushCacheData' signature='()Ljava/lang/String;' in class Lcom.playfab.unityplugin.GCM.PlayFabPushCache;
void OnApplicationPause(bool paused) 
{ 
    #if UNITY_ANDROID && !UNITY_EDITOR 
    PlayFabAndroidPlugin.UpdateRouting(paused);
    string cached = PlayFabGoogleCloudMessaging.GetPushCacheData(); 
    GameManagerScript.Instance.Toast(cached); 
    #endif
}

also when trying to use the other function `GetPushCache` i get this error:

09-24 16:44:43.641  9023  9078 I Unity   : Exception: JNI: Unknown signature for type 'System.Collections.Generic.List`1[UnityEngine.AndroidJavaObject]' (obj = System.Collections.Generic.List`1[UnityEngine.AndroidJavaObject]) equal

09-24 16:44:43.641  9023  9078 I Unity   :   at UnityEngine._AndroidJNIHelper.GetSignature (System.Object obj) [0x00270] in /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:1202
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hamza Lazaar avatar image Hamza Lazaar commented ·

Also, IMO, the plugin should handle the platform defines internally.

Also the "UpdateRounting" method now throws exception if called before "Init".

0 Likes 0 ·
Zac Bragg avatar image
Zac Bragg Deactivated answered

Hello we have recently rebuilt our Plug-in and this issue should be resolved. Take a look here and let us know if you have any further issues.

-Zac

9 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Koen avatar image Koen commented ·

Has the Unity package been rebuilt in the meantime? We're currently experiencing the same issue.

,

Has the Unity package been rebuilt in the meantime? If so, where can we find it? We're currently experiencing the same problem.

1 Like 1 ·
brendan avatar image brendan Koen commented ·

We rebuild the packages with each SDK release, so yes, it is rebuilt about once a week. You can always get the latest version from the Unity SDK repo in GitHub: https://github.com/PlayFab/UnitySDK

0 Likes 0 ·
marius avatar image marius brendan commented ·

Brendan could you please also update the AndroidPushPackage?

https://github.com/PlayFab/UnitySDK/tree/master/Packages/PushNotification_Unity5_0

0 Likes 0 ·
Show more comments
marius avatar image marius commented ·

Hello Zac

Why does it say its updated a month ago, when you "recently" rebuild your plugin?

0 Likes 0 ·
brendan avatar image brendan marius commented ·

Can you point us to what you're looking at? The https://github.com/PlayFab/PlayFab-Samples project is the one Zac is referencing, and it shows his merge as being 3 days ago.

0 Likes 0 ·
marius avatar image marius brendan commented ·

Refering to his link "rebuild out Plug-in". This link has not been updated for 1 month.

0 Likes 0 ·
Show more comments
Show more comments
Zac Bragg avatar image
Zac Bragg Deactivated answered

We are looking into this issue and should have an update out this week.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.