public interface WonderPushInitializer
You must implement this interface in a class named WonderPushInitializerImpl
and placed directly in your Android application package.
You can actually customize the name and location of the implementation by adding the
following in your AndroidManifest.xml
:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="COM.YOUR.PACKAGE">
<application>
<!-- Permits the SDK to initialize itself whenever needed, without need for your application to launch -->
<meta-data
tools:node="replace"
android:name="wonderpushInitializerClass"
android:value="COM.SOME.OTHER.PACKAGE.MyWonderPushInitializerCustomClassName" />
</application>
</manifest>
Modifier and Type | Method and Description |
---|---|
void |
initialize(android.content.Context context)
Initialize the
WonderPush SDK with your client id and client secret. |
void initialize(android.content.Context context)
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)
}
context
- The Context
you must pass on to WonderPush.initialize(Context, String, String)
.