Search code examples
androidglympse

glympse client sdk sample - failed to create error message


I am using the examples from https://developer.glympse.com/docs/core/client-sdk/downloads link.

I tried the GlympseSendDemo and GlympseCreateDemo using Android Studio(without any changes apart from editing the temporary developer API key that I created by creating an account online).

When I run both examples, I get a

"Failed to create"

message. What could be wrong with this?


EDIT 1

Debugging both the samples, the _glympse member is null when it hits the breakpoint i set at createGlympse() method of GlympseWrapper class.

EDIT 2

The GE.PLATFORM_STOPPED event from the Glympse SDK is getting fired that causes the _glympse variable to be set to null through the call GlympseWrapper.instance().clear();.

So my question is why is this event getting fired within a few seconds of the app starting up?


Solution

  • Try setting a breakpoint in GlympseWrapper.clear(). I suspect the platform is stopping after starting causing _glympse to be set to null. If that's happening, double check the api key is entered correctly.

    _glympse = GlympseFactory.createGlympse(context, BASE_URL, API_KEY);
    
    // Also try adding this line here to get some additional log information
    _glympse.overrideLoggingLevels(CoreConstants.INFO, CoreConstants.INFO);