Search code examples
glympse

Glympse API - Prefil the Name of the Receivers in the Send Wizard


As there is a way to preset the Duration, Destination, Invitee Message, So Can we preset the Recipients of the Glympse too ?

One more thing I would like to ask is that I want to make Time Duration Wheel as Non Editable for that I am using following configuration:

final int WIZARD_FLAGS = LC.SEND_WIZARD_INVITES_EDITABLE | LC.SEND_WIZARD_MESSAGE_READONLY | LC.SEND_WIZARD_DESTINATION_READONLY | LC.SEND_WIZARD_TIME_READONLY; // Launches the wizard which will send the Glympse glympse.sendTicket(ticket, WIZARD_FLAGS);

But the Time Duration Field is still showing as EDITABLE, I just donot want to make it EDITABLE

Please tell me


Solution

  • The way to preset a recipient is to add an invite to the ticket before calling sendTicket like this:

    _activeTicket = LiteFactory.createTicket(DURATION, MESSAGE, DESTINATION);
    _activeTicket.addInvite(GC.INVITE_TYPE_SMS, "My friend", "555-555-5555");
    
    // Launch the wizard with these pre-populated values and settings
    GlympseLiteWrapper.instance().getGlympse().sendTicket(_activeTicket, 0);
    

    As for setting the timer as read only, you have the correct flag set, but I see a bug that causes that flag to not work as intended. Currently the wheel can be edited even though it has no effect on the actual duration of the ticket (notice the time in the center goes up but the expire time above the wheel stays the same).

    We'll make sure this is fixed in the next SDK release. For now even though it looks like the duration can be changed, the ticket that is sent will be the duration that you specify as a preset.