diff --git a/src/particle.android.ts b/src/particle.android.ts index 3df32ea..2f7f80d 100644 --- a/src/particle.android.ts +++ b/src/particle.android.ts @@ -175,7 +175,7 @@ export class Particle implements TNSParticleAPI { return io.particle.android.sdk.cloud.ParticleCloudSDK.getCloud().getAccessToken(); } - public startDeviceSetupWizard(): Promise { + public startDeviceSetupWizard(o?: { setupOnly: boolean; }): Promise { return new Promise((resolve, reject) => { // note that since we _have_ to return an intent, the activity is relaunched, so there's some state juggling required in the app const intent = AndroidApp.foregroundActivity.getIntent(); @@ -191,6 +191,7 @@ export class Particle implements TNSParticleAPI { }); } + public getDeviceSetupCustomizer(): any { // stub for getDeviceSetupCustomizer } diff --git a/src/particle.common.ts b/src/particle.common.ts index 0dd1236..e1e95ee 100644 --- a/src/particle.common.ts +++ b/src/particle.common.ts @@ -87,7 +87,7 @@ export interface TNSParticleAPI { listDevices(): Promise>; - startDeviceSetupWizard(): Promise; + startDeviceSetupWizard(o?: { setupOnly: boolean; }): Promise; getDeviceSetupCustomizer(): any; diff --git a/src/particle.ios.ts b/src/particle.ios.ts index 4e33184..e911fb7 100644 --- a/src/particle.ios.ts +++ b/src/particle.ios.ts @@ -234,9 +234,12 @@ export class Particle implements TNSParticleAPI { this.eventIds.delete(prefix); } - public startDeviceSetupWizard(): Promise { + public startDeviceSetupWizard(o?: { setupOnly: boolean; }): Promise { + if (!o) { + o = { setupOnly: false }; + } return new Promise((resolve, reject) => { - const setupController = ParticleSetupMainController.new(); + const setupController = new ParticleSetupMainController({setupOnly: true}); this.wizardDelegate = ParticleSetupControllerDelegateImpl.createWithOwnerAndCallback(new WeakRef(this), (result: boolean) => resolve(result)); setupController.delegate = this.wizardDelegate; UIApplication.sharedApplication.keyWindow.rootViewController.presentViewControllerAnimatedCompletion(setupController, true, null);