Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

Re: Obtain Login Information from SUP

$
0
0

Hi Daniel,

 

You can use the offlineLogin API if you want to login to app when there is no connectivity.

For the first time the user should log in with internet connectivity, thereafter if there is no network you can call offline login API.

 

Ex.

 

//If there is no connectivity

try {

 

  ConnectionProperties connProps = app.getConnectionProperties();

  connProps.setFarmId("0");

  connProps.setServerName("10.10.10.10");

  connProps.setPortNumber(5001);// MBS

  ReaderDB.setApplication(app);

  LoginCredentials loginCredentials = new LoginCredentials(

  "Midhun","123456");

  connProps.setLoginCredentials(loginCredentials);

  ReaderDB.offlineLogin(ReaderDB.getPersonalizationParameters().getUsername(), ReaderDB.getPersonalizationParameters().getPassword());

 

  } catch (Exception e) {

  returnMsg = e.getMessage();

  }

 

After first Login you can save the credentials in Android sharedpreference.

 

Regards,

Midhun VP


Viewing all articles
Browse latest Browse all 8581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>