KubixSoftware
KubixSoftware

Reputation: 44

Xamarin Android GCM instanceID.GetToken throws TIMEOUT Exception

I have an issue for xamarin gcm implementation

here is my code sample

var instanceID = InstanceID.GetInstance(context.ApplicationContext);
token = instanceID.GetToken("MYSENDERID", GoogleCloudMessaging.InstanceIdScope, null);

It's working on another thread (not main thread) instanceID.GetToken throws error (I gave all permissions)

Error:

Java.IO.IOException: TIMEOUT
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3053/a94a03b5/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00064] in /Users/builder/data/lanes/3053/a94a03b5/source/monodroid/src/Mono.

Upvotes: 0

Views: 147

Answers (1)

KubixSoftware
KubixSoftware

Reputation: 44

I fixed.

Reason is i forget the create service. It's working only services

Upvotes: 1

Related Questions