A. Schwartz
A. Schwartz

Reputation: 71

NoSuchMethodError using Twilio IPMessaging

I'm trying to use Twilio IP Messaging in a simple Xamarin Android project, but unfortunately running into issues with the latest Nuget libraries: Twilio.Common (v. 0.3.4.2) and Twilio.IPMessaging (I tried both 0.15.0.4 and 0.15.0.6).

My setup is complicated by the fact that the online Xamarin samples are obsoleted within the recent library releases --- so instead of calling methods to Initialize the Twilio SDK, my code simply invokes Twilio.IPMessaging.IPMessagingClient.Create. The input parameters are a bit unclear, but reading elsewhere I'm trying to bind using a signature:

IPMessagingClient IPMessagingClient.create(
   Context context, 
   AccessManager accessManager, 
   IPMessagingClient.Properties clientProperties, 
   Constants.CallbackListener<IPMessagingClient> listener)

Invoking it this way, I invariably receive an error message: NoSuchMethodError with details:

"no static method \"Lcom/twilio/ipmessaging/IPMessagingClient;.create(Landroid/content/Context;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/twilio/ipmessaging/IPMessagingClient;\"

Any ideas? I like the idea of using Twilio, but between the outdated documentation and unfortunate crashes it's looking simpler to just implement messaging myself.

Upvotes: 7

Views: 171

Answers (1)

moljac
moljac

Reputation: 1020

While I check nugets can you provide more insights

  1. why IPMessagingClient.create(...) and not IPMessagingClient.Create(...)?
  2. Is linker turned on? Turn it off please. Then check.

Signature is

public static IPMessagingClient Create (Context context, Object acess_manager, Object properties, Object listener);

Upvotes: 1

Related Questions