Authorizing Additional User Records in Android

May 18, 2012 at 12:43 AM
Edited May 18, 2012 at 1:04 AM

In the Android code how can a user be directed to HealthVault so that she can authorize additional HealthVault users. The following code returns the intent first time, but subsequent attempts to call the same code return null intent -

HealthVaultSettings settings = new HealthVaultFileSettings(context);
settings.setMasterAppId("c6ba979f-c342-4408-a2bc-0dfb43b2bf8d");
settings.setServiceUrl("https://platform.healthvault-ppe.com/platform/wildcat.ashx");
settings.setShellUrl("https://account.healthvault-ppe.com");
HealthVaultService.initialize(settings);
HealthVaultService service = HealthVaultService.getInstance();


Intent intent = service.connect(context);
//intent is non null only the first time service.connect is called
//After that intent is always null

if (intent != null)
    context.startActivity(intent);


 





Coordinator
May 19, 2012 at 1:16 AM
Edited May 19, 2012 at 1:17 AM

Hi ihs,

Does this method on ShellActivity work for you?

public static Intent createAppAuthIntent(Activity ctx, String appId) 

May 24, 2012 at 10:39 PM

Hi robmay

Yes, that worked. Thanks.