|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.accurisnetworks.accuroam.AccuROAMClient
public class AccuROAMClient
Provides a class to register with AccuROAM server and generate a username/password using exchanged credentials. Creating an instance of this class will create entries in your Android App's preferences to preserve data across multiple runs. An app using this class requires the following Android permissions: INTERNET, SEND_SMS, READ_PHONE_STATE
Constructor Summary | |
---|---|
AccuROAMClient()
|
Method Summary | |
---|---|
ResultMessages.CallHomeResult |
callHome(android.content.Context context)
Call home to the server, checking for updated credentials. |
ResultMessages.CallHomeResult |
callHome(android.content.Context context,
java.lang.String call_home_url)
Call home to the server, checking for updated credentials. |
boolean |
checkIfRegistered(android.content.Context context)
Check if we are already performed the registration procedure. |
UsernamePassword |
getUsernamePassword(android.content.Context context)
Generate UsernamePassword based on registered credentials. |
ResultMessages.RegistrationResult |
register(android.content.Context context)
Register with the server, exchanging credentials. |
ResultMessages.RegistrationResult |
register(android.content.Context context,
java.lang.String sms_shortcode,
java.lang.String registration_url,
java.lang.String realm)
Register with the server, exchanging credentials. |
ResultMessages.RegistrationResult |
register(android.content.Context context,
java.lang.String sms_shortcode,
java.lang.String registration_url,
java.lang.String realm,
java.lang.String user_agent)
Register with the server, exchanging credentials. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AccuROAMClient()
Method Detail |
---|
public boolean checkIfRegistered(android.content.Context context)
This does not validate the credentials. It merely checks that credentials have been stored on the device. For example, if application was restarted, not uninstalled.
Use checkIfRegistered(Context)
to check if credentials have already been exchanged and stored in internal device storage.
context
- Android application context so service can access resources
public ResultMessages.RegistrationResult register(android.content.Context context)
This method contacts a remote server and may take several seconds to execute. Do not call it from a thread that may affect user interaction.
Use register(Context)
to register.
context
- Android application context so service can access resources
public ResultMessages.RegistrationResult register(android.content.Context context, java.lang.String sms_shortcode, java.lang.String registration_url, java.lang.String realm) throws java.net.MalformedURLException
This method contacts a remote server and may take several seconds to execute. Do not call it from a thread that may affect user interaction.
Use register(Context, String, String, String)
to register.
context
- Android application context so service can access resourcessms_shortcode
- SMS destination address. If the device is CDMA and the shortcode is international you may need to prefix it with 011registration_url
- URL of registration serverrealm
- realm to use in UserName. This should be prefixed by '@' - e.g. '@abc.com'
java.net.MalformedURLException
public ResultMessages.RegistrationResult register(android.content.Context context, java.lang.String sms_shortcode, java.lang.String registration_url, java.lang.String realm, java.lang.String user_agent) throws java.net.MalformedURLException
This method contacts a remote server and may take several seconds to execute. Do not call it from a thread that may affect user interaction.
Use register(Context, String, String, String, String)
to register.
context
- Android application context so service can access resourcessms_shortcode
- SMS destination addressregistration_url
- URL of registration serverrealm
- realm to use in UserNameuser_agent
- UserAgent to use in HTTP requests to server
java.net.MalformedURLException
public ResultMessages.CallHomeResult callHome(android.content.Context context)
This method contacts a remote server and may take several seconds to execute. Do not call it from a thread that may affect user interaction.
Use callHome(Context)
to call home.
context
- Android application context so service can access resourcespublic ResultMessages.CallHomeResult callHome(android.content.Context context, java.lang.String call_home_url)
This method contacts a remote server and may take several seconds to execute. Do not call it from a thread that may affect user interaction.
Use callHome(Context, String)
to call home.
context
- Android application context so service can access resourcescall_home_url
- URL of call home serverpublic UsernamePassword getUsernamePassword(android.content.Context context) throws NotRegisteredException
getUsernamePassword(Context)
to retrieve username.
NotRegisteredException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |