Java Code Examples for io.particle.android.sdk.cloud.ParticleCloudSDK#init()

The following examples show how to use io.particle.android.sdk.cloud.ParticleCloudSDK#init() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ParticleDeviceSetupLibrary.java    From particle-android with Apache License 2.0 5 votes vote down vote up
private static void init(Context ctx, boolean setupOnly) {
    BaseActivity.setupOnly = setupOnly;
    if (instance == null) {
        // ensure the cloud SDK is initialized
        ParticleCloudSDK.init(ctx);
        instance = new ParticleDeviceSetupLibrary();
        instance.setComponent(DaggerApplicationComponent
                .builder()
                .applicationModule(new ApplicationModule((Application) ctx.getApplicationContext()))
                .build());
    }
}
 
Example 2
Source File: ParticleDeviceSetupLibrary.java    From spark-setup-android with Apache License 2.0 5 votes vote down vote up
private static void init(Context ctx, boolean setupOnly) {
    BaseActivity.setupOnly = setupOnly;
    if (instance == null) {
        // ensure the cloud SDK is initialized
        ParticleCloudSDK.init(ctx);
        instance = new ParticleDeviceSetupLibrary();
        instance.setComponent(DaggerApplicationComponent
                .builder()
                .applicationModule(new ApplicationModule((Application) ctx.getApplicationContext()))
                .build());
    }
}
 
Example 3
Source File: CustomApplication.java    From particle-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    ParticleCloudSDK.init(this);
}
 
Example 4
Source File: CustomApplication.java    From spark-setup-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    ParticleCloudSDK.init(this);
}