0

When i did try to pass my MainActivity it gives me error. So, tell me what to pass in this method parameter.

  • please edit the question so that the main text contains the problem. also please add what error you get and add the example you are referencing. thanks. – saeed foroughi Jan 19 '20 at 10:25

2 Answers2

0

TrueSDK.getInstance().getUserProfile() does not require a parameter! you should call it without any paramter. here is the documentation.

saeed foroughi
  • 1,662
  • 1
  • 13
  • 25
  • 1
    There are only two types of getUserProfile method those showing as getUserProfile(Activity) or getUserProfile(Fragment) – gautam singh rathore Jan 19 '20 at 10:30
  • based on the documentation (there is a link in answer) the getUserProfile does not take any parameter. can you test it this way? – saeed foroughi Jan 19 '20 at 10:33
  • 1
    error: no suitable method found for getUserProfile(no arguments) method TrueSDK.getUserProfile(Activity) is not applicable (actual and formal argument lists differ in length) method TrueSDK.getUserProfile(Fragment) is not applicable (actual and formal argument lists differ in length) – gautam singh rathore Jan 19 '20 at 10:37
  • (https://docs.truecaller.com/truecaller-sdk/android/integrating-with-your-app/initialisation) I'm learning from here but i havn't got getUserProfile() method.In my android project – gautam singh rathore Jan 19 '20 at 12:08
  • this is the same link as I mentioned. ok so is it possible that your android studio is not got the builds right. can you try clean your project fist and then rebuild it. if it didn't workout, try to invalidate cache and restart option and see if it helps. – saeed foroughi Jan 19 '20 at 12:25
  • can you share me your code if you did use it. It would be very helpful – gautam singh rathore Jan 22 '20 at 06:16
0

in Kotlin just pass

TruecallerSDK.getInstance().getUserProfile(this)