Interface WonderPushInitializer


public interface WonderPushInitializer
Interface for the self-initialization of the SDK, if automatic initialization is not used.

You can implement this interface to control the initialization of the SDK using code. This should hardly be necessary and using automatic initialization if easier and recommended.

Reference your implementation by adding the following in your AndroidManifest.xml, inside your <application> tag with the actual class name:

<meta-data
        android:name="wonderpushInitializerClass"
        android:value=".MyWonderPushInitializer" />
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initialize(android.content.Context context)
    Initialize the WonderPush SDK with your client id and client secret.
  • Method Details

    • initialize

      void initialize(android.content.Context context)
      Initialize the WonderPush SDK with your client id and client secret.

      This method should retrieve the client id and client secret that you took care to hide securely in your application.

      It must then call WonderPush.initialize(Context, String, String) with the Context given in argument, and the retrieved credentials.

      @Override
      public void initialize(Context context) {
          String clientId;     // retrieve these credentials
          String clientSecret; // from a protected storage
          WonderPush.initialize(context, clientId, clientSecret)
      }
      Parameters:
      context - The Context you must pass on to WonderPush.initialize(Context, String, String).