Search code examples
androidglympse

Issue with GGlympseLite.start()


When creating a glympse for the first time in an Activity, I call

start()

which is required before

sendTicket()

The glympse doesn't show up in notifications until after I hit send in the glympse wizard. Great, that works.

After stopping a glympse using the normal code given in the wrapper class

_glympse.stop()
_glympse = null

it stops. Great, that works too.

Now when I want to show the wizard again to create a new glympse, I have to call

start()

before I call

sendTicket()

The problem is that after I call start() and before I hit "send" in the glympse wizard, a notification shows up in android with the time remaining on the previously stopped glympse. I don't want that notification to be there.

How do I make sure the previously stopped glympse does not show up in Android's notifications when I am creating a new one?


Solution

  • I think the trouble is just the terminology is slightly off.

    The Glympse object that is started and stopped is the Glympse platform (the services which manage all the location gathering, uploading, etc.)

    The ticket object is the what gets created and sent out so that the user's location can be shared for a specific period of time. Tickets have an expire method that can be used to end the ticket and stop sharing location until a new ticket is created and sent.