Android Mobile Physical Therapy Exercise Documenter

com.communipatient.amptedapp.ui
Class Eula

java.lang.Object
  extended by com.communipatient.amptedapp.ui.Eula

 class Eula
extends java.lang.Object

Displays an EULA ("End User License Agreement") that the user has to accept before using the application. Your application should call show(android.app.Activity) in the onCreate() method of the first activity. If the user accepts the EULA, it will never be shown again. If the user refuses, Activity.finish() is invoked on your activity.


Nested Class Summary
(package private) static interface Eula.OnEulaAgreedTo
          callback to let the activity know when the user has accepted the EULA.
 
Field Summary
private static java.lang.String ASSET_EULA
           
private static java.lang.String PREFERENCE_EULA_ACCEPTED
           
private static java.lang.String PREFERENCES_EULA
           
 
Constructor Summary
Eula()
           
 
Method Summary
private static void accept(android.content.SharedPreferences preferences)
           
private static void closeStream(java.io.Closeable stream)
          Closes the specified stream.
private static java.lang.CharSequence readEula(android.app.Activity activity)
           
private static void refuse(android.app.Activity activity)
           
(package private) static boolean show(android.app.Activity activity)
          Displays the EULA if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASSET_EULA

private static final java.lang.String ASSET_EULA
See Also:
Constant Field Values

PREFERENCE_EULA_ACCEPTED

private static final java.lang.String PREFERENCE_EULA_ACCEPTED
See Also:
Constant Field Values

PREFERENCES_EULA

private static final java.lang.String PREFERENCES_EULA
See Also:
Constant Field Values
Constructor Detail

Eula

Eula()
Method Detail

show

static boolean show(android.app.Activity activity)
Displays the EULA if necessary. This method should be called from the onCreate() method of your main Activity.

Parameters:
activity - The Activity to finish if the user rejects the EULA.
Returns:
Whether the user has agreed already.

accept

private static void accept(android.content.SharedPreferences preferences)

refuse

private static void refuse(android.app.Activity activity)

readEula

private static java.lang.CharSequence readEula(android.app.Activity activity)

closeStream

private static void closeStream(java.io.Closeable stream)
Closes the specified stream.

Parameters:
stream - The stream to close.

Revision: 109 Generated on Sat Dec 10 07:00:03 UTC 2011