In my app users do not have an option use social services to register and login. They have their logins and passwords. How to perform login via GIGYA without using any social service using Android SDK? Documentation only explains login using social services and Gigya's UI.
Login using GIGYA without any social service provider
1.4k Views Asked by Booyaches At
2
There are 2 best solutions below
0

I finally figure out how to use the gigya plugin fragment with the screensets.
private void gigyaLogin() {
GSObject params = new GSObject();
params.put("screenSet", "Default-RegistrationLogin");
GSPluginFragment pluginFragment = GSPluginFragment.newInstance("accounts.screenSet", params);
pluginFragment.setPluginListener(new GSPluginListener() {
@Override
public void onLoad(GSPluginFragment pluginFragment, GSObject event) {
Log.d(TAG, "accounts.screenSet has finished loading");
}
@Override
public void onEvent(GSPluginFragment pluginFragment, GSObject event) {
Log.d(TAG, "Received plugin event from accounts.screenSet - " + event.getString("eventName", ""));
}
@Override
public void onError(GSPluginFragment pluginFragment, GSObject error) {
Log.d(TAG, "Error in accounts.ScreenSet - " + error.getInt("errorCode", -1));
Log.d(TAG, "Error in accounts.ScreenSet - " + error.getString("errorMessage", "Error Message"));
}
});
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.add(R.id.activity_login_layout, pluginFragment);
transaction.commit();
}
This will set the GSPluginFragment and show the login screen. You can create our own screen set that removes the social login and only has the gigya login.
Here is an example of what it will look like.
In order to perform login via Gigya without using social service you'd need to use the Gigya RAAS (registration as a service).
In android SDK documentation look for GSPluginFragment.
Now you can use the RAAS Screen-Sets.
HTH