Error in CDVBMSClient: BMSClient cannot use inherited methods from MFPClient.
Closed this issue · 8 comments
Hi
I believe there is some mistake in the code, considering that BMSClient
is a subclass of MFPClient
which has the functions registerAuthenticationListener
and unregisterAuthenticationListener
, but when you call BMSClient.getInstance()
, and get a BMSClient
object, you cannot call any of the inherited functions..
Example from the CDVBMSClient:
So in conclusion, I cannot even run my code.
Yes it seemed to be version 2.1.1. I installed via the command prompt "cordova plugin add ibm-mfp-core"
Hi,
Do you added any configuration to the Gradle file?
What authentication you are trying to configure (google/facebook/custom)?
I tried with both Google and Facebook. And I followed a guide: https://console.ng.bluemix.net/docs/services/mobileaccess/facebook-auth-cordova.html
But i guess I may have added 2.+ in the gradle configuration as the guide tells me to. But what I don't get is that I followed the IBM guide i linked to above completely, and yet it does not work :)
Here is the configuration added:
dependencies { compile group: 'com.ibm.mobilefirstplatform.clientsdk.android', name:'facebookauthentication', version: '2.+', ext: 'aar', transitive: true // other dependencies }
Please change it to 1.+ (instead of 2.+) in the Gradle file, for example with google:
compile group: 'com.ibm.mobilefirstplatform.clientsdk.android',
name:'googleauthentication',
version: '1.+',
ext: 'aar',
transitive: true
We are working to fix this doc.
Alright, done that now.
According to
The only difference when you are configuring Cordova applications is that you must initialize the Mobile Client Access client SDK in your JavaScript code instead of in the Java code (see Testing the Authentication). The FacebookAuthenticationManager API must still be registered in your native code
There is no register
method on the FacebookAuthenticationManager API in 1.+ though - should i just call FacebookAuthenticationManager.getInstance().registerDefaultAuthenticationListener(this);
instead of FacebookAuthenticationManager.getInstance().register(this);
then?
As of now, it does not seem to work, although I can build the project now. The Ping test on the app shows "Bummer - unauthorized client"
Yes , that is current.
(updated doc will be available tomorrow)
Thank you! I think it is working now actually!