I'm working with Neura sdk in order to detect special events of my users( arriving/leaving home) I'm trying to initiate their authentication, as described below (fetchPermissions() and initNeuraConnection() are the same as in the documentations, and mAuthenticationRequest is initiated on fetchPermissions())
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
getMainActivity().initNeuraConnection();
fetchPermissions();
getMainActivity().getClient().authenticate(NEURA_AUTHENTICATION_REQUEST_CODE, mAuthenticateRequest);
}
My issue is that once i call authenticate - nothing happens and the neura login screen isn't opened
There are few things you can check :
Have you declared initNueraConnection() and fetchPermissions() as described in the Neura dev site ?
If so, I suspect you're sending authenticate(...) a nullable mAuthenticateRequest instance. Since fetchPermissions() is asynchronous(its a network call), you're calling authenticate(...) before the results are fetched from fetchPermissions(), so, mAuthenticateRequest is null, since it's not initiated yet. You should call authenticate(...) only after you recieve the data on fetchPermissions().
For example, you can do this :
Fyi, you can check your logcat for this error : authenticationRequest is nullable, couldn't create authenticate request.