com.parse
Class Parse

Object
  extended by com.parse.Parse

public class Parse
extends Object

The Parse class contains static functions that handle global configuration for the Parse library.


Field Summary
static int LOG_LEVEL_DEBUG
           
static int LOG_LEVEL_ERROR
           
static int LOG_LEVEL_INFO
           
static int LOG_LEVEL_NONE
           
static int LOG_LEVEL_VERBOSE
           
static int LOG_LEVEL_WARNING
           
 
Method Summary
static void enableLocalDatastore(Context context)
          Enable pinning in your application.
static int getLogLevel()
          Gets the level of logging that will be displayed.
static void initialize(Context context, String applicationId, String clientKey)
          Authenticates this client as belonging to your application.
static void setLogLevel(int logLevel)
          Sets the level of logging to display, where each level includes all those below it.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_LEVEL_VERBOSE

public static final int LOG_LEVEL_VERBOSE
See Also:
Constant Field Values

LOG_LEVEL_DEBUG

public static final int LOG_LEVEL_DEBUG
See Also:
Constant Field Values

LOG_LEVEL_INFO

public static final int LOG_LEVEL_INFO
See Also:
Constant Field Values

LOG_LEVEL_WARNING

public static final int LOG_LEVEL_WARNING
See Also:
Constant Field Values

LOG_LEVEL_ERROR

public static final int LOG_LEVEL_ERROR
See Also:
Constant Field Values

LOG_LEVEL_NONE

public static final int LOG_LEVEL_NONE
See Also:
Constant Field Values
Method Detail

initialize

public static void initialize(Context context,
                              String applicationId,
                              String clientKey)
Authenticates this client as belonging to your application. This must be called before your application can use the Parse library. The recommended way is to put a call to Parse.initialize in your Application's onCreate method. An example:
 import android.app.Application;
 import com.parse.Parse;
 
 public class MyApplication extends Application {
 
   public void onCreate() {
     Parse.initialize(this, "your application id", "your client key");
   }
 
 }
 

Parameters:
context - The active Context for your application.
applicationId - The application id provided in the Parse dashboard.
clientKey - The client key provided in the Parse dashboard.

enableLocalDatastore

public static void enableLocalDatastore(Context context)
Enable pinning in your application. This must be called before your application can use pinning. The recommended way is to put a call to Parse.enableLocalDatastore in your Application's onCreate method before Parse.initialize. An example:
 public class MyApplication extends Application {
   public void onCreate() {
     Parse.enableLocalDatastore(this);
     Parse.initialize(this, "your application id", "your client key");
   }
 }
 

Parameters:
context - The active Context for your application.

setLogLevel

public static void setLogLevel(int logLevel)
Sets the level of logging to display, where each level includes all those below it. The default level is Parse.LOG_LEVEL_ERROR. Please ensure this is set to Parse.LOG_LEVEL_ERROR or Parse.LOG_LEVEL_NONE before deploying your app to ensure no sensitive information is logged. The levels are:

Parameters:
logLevel - The level of logcat logging that Parse should do.

getLogLevel

public static int getLogLevel()
Gets the level of logging that will be displayed.

Returns:
the log level.