com.parse

## Class Parse

- java.lang.Object
- - com.parse.Parse

    public class Parse
    extends Object

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

### Field Summary

Fields
`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

Methods
`static void` `addParseNetworkInterceptor(ParseNetworkInterceptor interceptor)` Add a `ParseNetworkInterceptor`.
`static void` `enableLocalDatastore(Context context)` Enable pinning in your application.
`static int` `getLogLevel()` Returns the level of logging that will be displayed.
`static void` `initialize(Context context)` Authenticates this client as belonging to your application.
`static void` `initialize(Context context, String applicationId, String clientKey)` Authenticates this client as belonging to your application.
`static void` `removeParseNetworkInterceptor(ParseNetworkInterceptor interceptor)` Remove a given `ParseNetworkInterceptor`.
`static void` `setLogLevel(int logLevel)` Sets the level of logging to display, where each level includes all those below it.

### Methods inherited from class java.lang.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

#### enableLocalDatastore

    public static void enableLocalDatastore(Context context)

Enable pinning in your application. This must be called before your application can use pinning. You must invoke `enableLocalDatastore(Context)` before `Parse.initialize(Context)` :

     public class MyApplication extends Application {
       public void onCreate() {
         Parse.enableLocalDatastore(this);
         Parse.initialize(this);
       }
     }

Parameters:
  `context` - The active `Context` for your application.

#### initialize

    public static void initialize(Context context)

Authenticates this client as belonging to your application.

You must define `com.parse.APPLICATION_ID` and `com.parse.CLIENT_KEY` `meta-data` in your `AndroidManifest.xml`:

     <manifest ...>

     ...

       <application ...>
         <meta-data
           android:name="com.parse.APPLICATION_ID"
           android:value="@string/parse_app_id" />
         <meta-data
           android:name="com.parse.CLIENT_KEY"
           android:value="@string/parse_client_key" />

           ...

       </application>
     </manifest>

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:

     public class MyApplication extends Application {
       public void onCreate() {
         Parse.initialize(this);
       }
     }

Parameters:
  `context` - The active `Context` for your application.

#### initialize

    public static void initialize(Context context,
                  String applicationId,
                  String clientKey)

Authenticates this client as belonging to your application.

This method is only required if you intend to use a different `applicationId` or `clientKey` than is defined by `com.parse.APPLICATION_ID` or `com.parse.CLIENT_KEY` in your `AndroidManifest.xml`.

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:

     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.

#### 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_NONE`. 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:

- `Parse.LOG_LEVEL_VERBOSE`
- `Parse.LOG_LEVEL_DEBUG`
- `Parse.LOG_LEVEL_INFO`
- `Parse.LOG_LEVEL_WARNING`
- `Parse.LOG_LEVEL_ERROR`
- `Parse.LOG_LEVEL_NONE`

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

#### getLogLevel

    public static int getLogLevel()

Returns the level of logging that will be displayed.

#### addParseNetworkInterceptor

    public static void addParseNetworkInterceptor(ParseNetworkInterceptor interceptor)

Add a `ParseNetworkInterceptor`. You must invoke `addParseNetworkInterceptor(ParseNetworkInterceptor)` before `Parse.initialize(Context)`. You can add multiple `ParseNetworkInterceptor`.

Parameters:
  `interceptor` - `ParseNetworkInterceptor` to be added.

#### removeParseNetworkInterceptor

    public static void removeParseNetworkInterceptor(ParseNetworkInterceptor interceptor)

Remove a given `ParseNetworkInterceptor`. You must invoke `removeParseNetworkInterceptor(ParseNetworkInterceptor)` before `Parse.initialize(Context)`.

Parameters:
  `interceptor` - `ParseNetworkInterceptor` to be removed.