public PasswordAuthentication getCredentials() {
   MobiComUserPreference userPreferences = MobiComUserPreference.getInstance(context);
   if (!userPreferences.isRegistered()) {
     return null;
   }
   return new PasswordAuthentication(
       userPreferences.getUserId(), userPreferences.getDeviceKeyString().toCharArray());
 }