Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 305
A. Schwartz Avatar asked Mar 17 '17 23:03

A. Schwartz


People also ask

How can I send WhatsApp messages using Twilio?

Sign up for (or log in to) your Twilio Account and activate the Sandbox. Before you can send a WhatsApp message from your web language, you'll need to sign up for a Twilio account or sign into your existing account and activate the Twilio Sandbox for WhatsApp.

What do companies use Twilio for?

The short answer: Twilio is a customer engagement platform used by hundreds of thousands of businesses and more than ten million developers worldwide to build unique, personalized experiences for their customers.


1 Answers

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);

like image 68
moljac Avatar answered Oct 07 '22 06:10

moljac